added workflows for claude commands and skills
This commit is contained in:
+21
-6
@@ -1,17 +1,32 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="60" height="20" role="img" aria-label="Official">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="40" role="img" aria-label="Official">
|
||||
<title>Official</title>
|
||||
<style>
|
||||
@keyframes shimmer {
|
||||
0% { transform: translateX(-120px); }
|
||||
100% { transform: translateX(120px); }
|
||||
}
|
||||
.shine { animation: shimmer 2.5s ease-in-out infinite; }
|
||||
</style>
|
||||
<linearGradient id="s" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="shimmer" x1="0" y1="0" x2="1" y2="0">
|
||||
<stop offset="0" stop-color="#fff" stop-opacity="0"/>
|
||||
<stop offset="0.4" stop-color="#fff" stop-opacity="0"/>
|
||||
<stop offset="0.5" stop-color="#fff" stop-opacity=".3"/>
|
||||
<stop offset="0.6" stop-color="#fff" stop-opacity="0"/>
|
||||
<stop offset="1" stop-color="#fff" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<clipPath id="r">
|
||||
<rect width="60" height="20" rx="3" fill="#fff"/>
|
||||
<rect width="120" height="40" rx="5" fill="#fff"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#r)">
|
||||
<rect width="60" height="20" fill="#2ea44f"/>
|
||||
<rect width="60" height="20" fill="url(#s)"/>
|
||||
<rect width="120" height="40" fill="#2ea44f"/>
|
||||
<rect width="120" height="40" fill="url(#s)"/>
|
||||
<rect class="shine" width="120" height="40" fill="url(#shimmer)"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="11">
|
||||
<text x="30" y="14">Official</text>
|
||||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="18">
|
||||
<text x="60" y="26">Official</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 702 B After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,74 @@
|
||||
---
|
||||
name: workflow-claude-commands-agent
|
||||
description: Research agent that fetches Claude Code docs, reads the local commands report, and analyzes drift
|
||||
model: opus
|
||||
color: green
|
||||
---
|
||||
|
||||
# Workflow Changelog — Commands Research Agent
|
||||
|
||||
You are a documentation drift detector for the claude-code-best-practice project. Your job is to fetch external sources, read the local report, and check for exactly **two types of drift**:
|
||||
|
||||
1. **Frontmatter fields** — any field added or removed
|
||||
2. **Official commands** — any built-in slash command added or removed
|
||||
|
||||
**Versions to check:** Use the number provided in the prompt (default: 10).
|
||||
|
||||
This is a **read-only research** workflow. Fetch sources, read local files, compare, and return findings. Do NOT modify any files.
|
||||
|
||||
---
|
||||
|
||||
## Phase 1: Fetch External Data (in parallel)
|
||||
|
||||
Fetch both sources using WebFetch simultaneously:
|
||||
|
||||
1. **Slash Commands Reference** — `https://code.claude.com/docs/en/slash-commands` — Extract the complete list of supported command frontmatter fields (name, type, required, description) and all built-in slash commands (command name, description, and any categorization/tags).
|
||||
2. **Changelog** — `https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md` — Extract the last N version entries. Look specifically for command-related changes: new or removed frontmatter fields, new or removed built-in slash commands, renamed commands.
|
||||
|
||||
---
|
||||
|
||||
## Phase 2: Read Local Report
|
||||
|
||||
Read `best-practice/claude-commands.md`. Extract:
|
||||
- The **Frontmatter Fields** table — all field names listed
|
||||
- The **official commands** table — all command names, tags, and descriptions listed
|
||||
|
||||
---
|
||||
|
||||
## Phase 3: Analysis
|
||||
|
||||
### Frontmatter Field Drift
|
||||
|
||||
Compare the official docs' supported frontmatter fields against the report's Frontmatter Fields table:
|
||||
- **Added fields**: Fields in official docs but missing from our table (include version introduced if found in changelog)
|
||||
- **Removed fields**: Fields in our table but no longer in official docs
|
||||
|
||||
### Official Command Drift
|
||||
|
||||
Compare the official docs' built-in slash commands against the report's official commands table:
|
||||
- **Added commands**: Commands in official docs but missing from our table (include description and suggested tag)
|
||||
- **Removed commands**: Commands in our table but no longer in official docs
|
||||
- **Changed tags**: Commands whose category/tag has changed
|
||||
- **Changed descriptions**: Commands whose description has significantly changed (minor wording changes are not drift)
|
||||
|
||||
---
|
||||
|
||||
## Return Format
|
||||
|
||||
Return findings as a structured report:
|
||||
|
||||
1. **External Data Summary** — Latest Claude Code version, total official field count, total official command count
|
||||
2. **Frontmatter Field Drift** — Added or removed fields (with version introduced/removed if available)
|
||||
3. **Official Command Drift** — Added or removed commands (with description and tag)
|
||||
|
||||
Be specific. Include version numbers where possible.
|
||||
|
||||
---
|
||||
|
||||
## Critical Rules
|
||||
|
||||
1. **Fetch BOTH sources** — never skip either
|
||||
2. **Never guess** versions or dates — extract from fetched data
|
||||
3. **Do NOT modify any files** — read-only research
|
||||
4. **Only check for additions and removals** — do not flag minor description wording changes, only significant drift
|
||||
5. **Note tag assignments** — for new commands, suggest an appropriate tag based on the existing tag categories (Auth, Config, Context, Debug, Export, Extensions, Memory, Model, Project, Remote, Session)
|
||||
@@ -0,0 +1,74 @@
|
||||
---
|
||||
name: workflow-claude-skills-agent
|
||||
description: Research agent that fetches Claude Code docs, reads the local skills report, and analyzes drift
|
||||
model: opus
|
||||
color: magenta
|
||||
---
|
||||
|
||||
# Workflow Changelog — Skills Research Agent
|
||||
|
||||
You are a documentation drift detector for the claude-code-best-practice project. Your job is to fetch external sources, read the local report, and check for exactly **two types of drift**:
|
||||
|
||||
1. **Frontmatter fields** — any field added or removed
|
||||
2. **Official bundled skills** — any bundled skill added or removed
|
||||
|
||||
**Versions to check:** Use the number provided in the prompt (default: 10).
|
||||
|
||||
This is a **read-only research** workflow. Fetch sources, read local files, compare, and return findings. Do NOT modify any files.
|
||||
|
||||
---
|
||||
|
||||
## Phase 1: Fetch External Data (in parallel)
|
||||
|
||||
Fetch both sources using WebFetch simultaneously:
|
||||
|
||||
1. **Skills Reference** — `https://code.claude.com/docs/en/skills` — Extract the complete list of supported skill frontmatter fields (name, type, required, description) and any bundled skills mentioned (skills that ship with Claude Code, not installable from the Official Skills Repository).
|
||||
2. **Changelog** — `https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md` — Extract the last N version entries. Look specifically for skill-related changes: new or removed frontmatter fields, new or removed bundled skills, skill behavior changes.
|
||||
|
||||
---
|
||||
|
||||
## Phase 2: Read Local Report
|
||||
|
||||
Read `best-practice/claude-skills.md`. Extract:
|
||||
- The **Frontmatter Fields** table — all field names listed
|
||||
- The **official skills** table — all bundled skill names and descriptions listed
|
||||
|
||||
---
|
||||
|
||||
## Phase 3: Analysis
|
||||
|
||||
### Frontmatter Field Drift
|
||||
|
||||
Compare the official docs' supported frontmatter fields against the report's Frontmatter Fields table:
|
||||
- **Added fields**: Fields in official docs but missing from our table (include version introduced if found in changelog)
|
||||
- **Removed fields**: Fields in our table but no longer in official docs
|
||||
|
||||
### Official Bundled Skill Drift
|
||||
|
||||
Compare the official docs' bundled skills and changelog mentions against the report's official skills table:
|
||||
- **Added skills**: Bundled skills in official docs or changelog but missing from our table (include description and version introduced)
|
||||
- **Removed skills**: Skills in our table but no longer bundled with Claude Code
|
||||
|
||||
**Important distinction:** Only track skills that ship with Claude Code itself (bundled). Skills from the [Official Skills Repository](https://github.com/anthropics/skills/tree/main/skills) are installable community skills and are NOT in scope for this drift check.
|
||||
|
||||
---
|
||||
|
||||
## Return Format
|
||||
|
||||
Return findings as a structured report:
|
||||
|
||||
1. **External Data Summary** — Latest Claude Code version, total official field count, total official bundled skill count
|
||||
2. **Frontmatter Field Drift** — Added or removed fields (with version introduced/removed if available)
|
||||
3. **Official Bundled Skill Drift** — Added or removed skills (with description and version)
|
||||
|
||||
Be specific. Include version numbers where possible.
|
||||
|
||||
---
|
||||
|
||||
## Critical Rules
|
||||
|
||||
1. **Fetch BOTH sources** — never skip either
|
||||
2. **Never guess** versions or dates — extract from fetched data
|
||||
3. **Do NOT modify any files** — read-only research
|
||||
4. **Only check for additions and removals** — do not flag minor description wording changes, only significant drift
|
||||
5. **Bundled vs installable** — only track skills that ship with Claude Code. Do not flag skills from the Official Skills Repository (github.com/anthropics/skills) as missing or added
|
||||
@@ -0,0 +1,140 @@
|
||||
---
|
||||
description: Track Claude Code commands report changes and find what needs updating
|
||||
argument-hint: [number of versions to check, default 10]
|
||||
---
|
||||
|
||||
# Workflow Changelog — Commands Report
|
||||
|
||||
You are a coordinator for the claude-code-best-practice project. Your job is to launch a research agent, wait for its results, and present a report about drift in the **Commands Reference** report (`best-practice/claude-commands.md`).
|
||||
|
||||
This workflow checks for exactly **two types of drift**:
|
||||
1. **Frontmatter fields** — any field added or removed in the official docs
|
||||
2. **Official commands** — any built-in slash command added or removed
|
||||
|
||||
**Versions to check:** `$ARGUMENTS` (default: 10 if empty or not a number)
|
||||
|
||||
This is a **read-then-report** workflow. Launch the agent, merge findings, and produce a report. Only take action if the user approves.
|
||||
|
||||
---
|
||||
|
||||
## Phase 1: Launch Research Agent
|
||||
|
||||
Spawn the `workflow-claude-commands-agent` with this prompt:
|
||||
|
||||
> Research the claude-code-best-practice project for commands report drift. Check the last $ARGUMENTS versions (default: 10).
|
||||
>
|
||||
> Fetch these 2 external sources:
|
||||
> 1. Slash Commands Reference: https://code.claude.com/docs/en/slash-commands
|
||||
> 2. Changelog: https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
|
||||
>
|
||||
> Then read the local report (`best-practice/claude-commands.md`).
|
||||
>
|
||||
> Check for exactly two things:
|
||||
> 1. **Frontmatter fields**: Compare the official docs' supported command frontmatter fields against the report's Frontmatter Fields table. Flag any fields that were added or removed.
|
||||
> 2. **Official commands**: Compare the official docs' built-in slash commands list against the report's official commands table. Flag any commands that were added or removed. Also check if any command's tag or description has changed.
|
||||
|
||||
---
|
||||
|
||||
## Phase 2: Read Previous Changelog Entries
|
||||
|
||||
**While the agent is running**, read `changelog/best-practice/claude-commands/changelog.md` to get the last 25 entries. Parse the priority actions to identify:
|
||||
- **Recurring items** — issues that appeared before and are still unresolved
|
||||
- **New items** — issues appearing for the first time
|
||||
- **Resolved items** — previously flagged issues now fixed
|
||||
|
||||
---
|
||||
|
||||
## Phase 3: Generate Report
|
||||
|
||||
**Wait for the agent to complete.** Produce a report with these sections:
|
||||
|
||||
1. **Frontmatter Field Changes** — Fields added or removed in official docs vs our report
|
||||
2. **Official Command Changes** — Built-in slash commands added or removed vs our table
|
||||
|
||||
End with a prioritized **Action Items** summary table. Each item must include a `Status` column showing `NEW`, `RECURRING (first seen: <date>)`, or `RESOLVED`:
|
||||
|
||||
```
|
||||
Priority Actions:
|
||||
# | Type | Action | Status
|
||||
1 | New Field | Add <field> to frontmatter table | NEW
|
||||
2 | Removed Field | Remove <field> from table | RECURRING (first seen: <date>)
|
||||
3 | New Command | Add <command> to official table | NEW
|
||||
4 | Removed Command | Remove <command> from table | NEW
|
||||
5 | Changed Tag | Update <command> tag from X to Y | NEW
|
||||
```
|
||||
|
||||
Also include a **Resolved Since Last Run** section listing items from previous runs that are no longer issues.
|
||||
|
||||
---
|
||||
|
||||
## Phase 3.5: Append Summary to Changelog
|
||||
|
||||
**This phase is MANDATORY — always execute it before presenting the report to the user.**
|
||||
|
||||
Read the existing `changelog/best-practice/claude-commands/changelog.md` file, then **append** (do NOT overwrite) a new entry at the end. The entry format must be exactly:
|
||||
|
||||
```markdown
|
||||
---
|
||||
|
||||
## [<YYYY-MM-DD HH:MM AM/PM PKT>] Claude Code v<VERSION>
|
||||
|
||||
| # | Priority | Type | Action | Status |
|
||||
|---|----------|------|--------|--------|
|
||||
| 1 | HIGH/MED/LOW | <type> | <action description> | <status> |
|
||||
| ... | ... | ... | ... | ... |
|
||||
```
|
||||
|
||||
**Status format — MUST use one of these three formats:**
|
||||
- `COMPLETE (reason)` — action was taken and resolved successfully
|
||||
- `INVALID (reason)` — finding was incorrect, not applicable, or intentional
|
||||
- `ON HOLD (reason)` — action deferred, waiting on external dependency or user decision
|
||||
|
||||
The `(reason)` is mandatory and must briefly explain what was done or why.
|
||||
|
||||
**Rules for appending:**
|
||||
- Always append — never overwrite or replace previous entries
|
||||
- The date and time is when the command is executed in Pakistan Standard Time (PKT, UTC+5); get it by running `TZ=Asia/Karachi date "+%Y-%m-%d %I:%M %p PKT"`. The version comes from agent findings
|
||||
- If `changelog/best-practice/claude-commands/changelog.md` doesn't exist or is empty, create it with the Status Legend table (see top of file) then the first entry
|
||||
- Each entry is separated by `---`
|
||||
- **Only include items with HIGH, MEDIUM, or LOW priority** — omit NONE priority items
|
||||
|
||||
---
|
||||
|
||||
## Phase 3.6: Update Last Updated Badge
|
||||
|
||||
**This phase is MANDATORY — always execute it immediately after Phase 3.5, before presenting the report.**
|
||||
|
||||
Update the "Last Updated" badge at the top of `best-practice/claude-commands.md`. Run `TZ=Asia/Karachi date "+%b %d, %Y %-I:%M %p PKT"` to get the time, URL-encode it (spaces to `%20`, commas to `%2C`), and replace the date portion in the badge. Also update the Claude Code version in the badge if it has changed.
|
||||
|
||||
**Do NOT log badge updates as action items in the changelog or report.** Badge syncing is a routine part of every run, not a finding.
|
||||
|
||||
---
|
||||
|
||||
## Phase 4: Offer to Take Action
|
||||
|
||||
After presenting the report (and confirming both changelog and badge were updated), ask the user:
|
||||
|
||||
1. **Execute all actions** — Apply all changes
|
||||
2. **Execute specific actions** — User picks which numbers to execute
|
||||
3. **Just save the report** — No changes
|
||||
|
||||
When executing:
|
||||
- **New fields**: Add to the Frontmatter Fields table with correct type, required status, and description from the official docs
|
||||
- **Removed fields**: Confirm with user before removing
|
||||
- **New commands**: Add to the official commands table with correct #, command, tag, and description. Insert in the correct tag group (table is sorted by tag)
|
||||
- **Removed commands**: Confirm with user before removing
|
||||
- **Changed tags**: Update the command's tag and re-sort if needed
|
||||
- After any additions or removals, update the count in the `## Frontmatter Fields (N)` and `##  **(N)**` headings
|
||||
|
||||
---
|
||||
|
||||
## Critical Rules
|
||||
|
||||
1. **Never guess** versions or dates — use data from the agent
|
||||
2. **Cross-reference field counts** — report field count must match official docs
|
||||
3. **Cross-reference command counts** — report command count must match official docs
|
||||
4. **Don't auto-execute** — always present the report first
|
||||
5. **ALWAYS append to changelog** — Phase 3.5 is mandatory. Never skip it. Never overwrite previous entries.
|
||||
6. **ALWAYS update the Last Updated badge** — Phase 3.6 is mandatory. Never skip it.
|
||||
7. **Compare with previous runs** — read the last 25 entries from the changelog and mark each action item as NEW, RECURRING, or RESOLVED.
|
||||
8. **Maintain tag sort order** — the official commands table is sorted by tag (alphabetical), then by command name within each tag group. Preserve this ordering when adding or removing commands.
|
||||
@@ -0,0 +1,138 @@
|
||||
---
|
||||
description: Track Claude Code skills report changes and find what needs updating
|
||||
argument-hint: [number of versions to check, default 10]
|
||||
---
|
||||
|
||||
# Workflow Changelog — Skills Report
|
||||
|
||||
You are a coordinator for the claude-code-best-practice project. Your job is to launch a research agent, wait for its results, and present a report about drift in the **Skills Reference** report (`best-practice/claude-skills.md`).
|
||||
|
||||
This workflow checks for exactly **two types of drift**:
|
||||
1. **Frontmatter fields** — any field added or removed in the official docs
|
||||
2. **Official bundled skills** — any bundled skill added or removed
|
||||
|
||||
**Versions to check:** `$ARGUMENTS` (default: 10 if empty or not a number)
|
||||
|
||||
This is a **read-then-report** workflow. Launch the agent, merge findings, and produce a report. Only take action if the user approves.
|
||||
|
||||
---
|
||||
|
||||
## Phase 1: Launch Research Agent
|
||||
|
||||
Spawn the `workflow-claude-skills-agent` with this prompt:
|
||||
|
||||
> Research the claude-code-best-practice project for skills report drift. Check the last $ARGUMENTS versions (default: 10).
|
||||
>
|
||||
> Fetch these 2 external sources:
|
||||
> 1. Skills Reference: https://code.claude.com/docs/en/skills
|
||||
> 2. Changelog: https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
|
||||
>
|
||||
> Then read the local report (`best-practice/claude-skills.md`).
|
||||
>
|
||||
> Check for exactly two things:
|
||||
> 1. **Frontmatter fields**: Compare the official docs' supported skill frontmatter fields against the report's Frontmatter Fields table. Flag any fields that were added or removed.
|
||||
> 2. **Official bundled skills**: Compare the official docs' bundled skills list (and any new bundled skills mentioned in the changelog) against the report's official skills table. Flag any skills that were added or removed.
|
||||
|
||||
---
|
||||
|
||||
## Phase 2: Read Previous Changelog Entries
|
||||
|
||||
**While the agent is running**, read `changelog/best-practice/claude-skills/changelog.md` to get the last 25 entries. Parse the priority actions to identify:
|
||||
- **Recurring items** — issues that appeared before and are still unresolved
|
||||
- **New items** — issues appearing for the first time
|
||||
- **Resolved items** — previously flagged issues now fixed
|
||||
|
||||
---
|
||||
|
||||
## Phase 3: Generate Report
|
||||
|
||||
**Wait for the agent to complete.** Produce a report with these sections:
|
||||
|
||||
1. **Frontmatter Field Changes** — Fields added or removed in official docs vs our report
|
||||
2. **Official Bundled Skill Changes** — Bundled skills added or removed vs our table
|
||||
|
||||
End with a prioritized **Action Items** summary table. Each item must include a `Status` column showing `NEW`, `RECURRING (first seen: <date>)`, or `RESOLVED`:
|
||||
|
||||
```
|
||||
Priority Actions:
|
||||
# | Type | Action | Status
|
||||
1 | New Field | Add <field> to frontmatter table | NEW
|
||||
2 | Removed Field | Remove <field> from table | RECURRING (first seen: <date>)
|
||||
3 | New Skill | Add <skill> to official skills table | NEW
|
||||
4 | Removed Skill | Remove <skill> from table | NEW
|
||||
```
|
||||
|
||||
Also include a **Resolved Since Last Run** section listing items from previous runs that are no longer issues.
|
||||
|
||||
---
|
||||
|
||||
## Phase 3.5: Append Summary to Changelog
|
||||
|
||||
**This phase is MANDATORY — always execute it before presenting the report to the user.**
|
||||
|
||||
Read the existing `changelog/best-practice/claude-skills/changelog.md` file, then **append** (do NOT overwrite) a new entry at the end. The entry format must be exactly:
|
||||
|
||||
```markdown
|
||||
---
|
||||
|
||||
## [<YYYY-MM-DD HH:MM AM/PM PKT>] Claude Code v<VERSION>
|
||||
|
||||
| # | Priority | Type | Action | Status |
|
||||
|---|----------|------|--------|--------|
|
||||
| 1 | HIGH/MED/LOW | <type> | <action description> | <status> |
|
||||
| ... | ... | ... | ... | ... |
|
||||
```
|
||||
|
||||
**Status format — MUST use one of these three formats:**
|
||||
- `COMPLETE (reason)` — action was taken and resolved successfully
|
||||
- `INVALID (reason)` — finding was incorrect, not applicable, or intentional
|
||||
- `ON HOLD (reason)` — action deferred, waiting on external dependency or user decision
|
||||
|
||||
The `(reason)` is mandatory and must briefly explain what was done or why.
|
||||
|
||||
**Rules for appending:**
|
||||
- Always append — never overwrite or replace previous entries
|
||||
- The date and time is when the command is executed in Pakistan Standard Time (PKT, UTC+5); get it by running `TZ=Asia/Karachi date "+%Y-%m-%d %I:%M %p PKT"`. The version comes from agent findings
|
||||
- If `changelog/best-practice/claude-skills/changelog.md` doesn't exist or is empty, create it with the Status Legend table (see top of file) then the first entry
|
||||
- Each entry is separated by `---`
|
||||
- **Only include items with HIGH, MEDIUM, or LOW priority** — omit NONE priority items
|
||||
|
||||
---
|
||||
|
||||
## Phase 3.6: Update Last Updated Badge
|
||||
|
||||
**This phase is MANDATORY — always execute it immediately after Phase 3.5, before presenting the report.**
|
||||
|
||||
Update the "Last Updated" badge at the top of `best-practice/claude-skills.md`. Run `TZ=Asia/Karachi date "+%b %d, %Y %-I:%M %p PKT"` to get the time, URL-encode it (spaces to `%20`, commas to `%2C`), and replace the date portion in the badge. Also update the Claude Code version in the badge if it has changed.
|
||||
|
||||
**Do NOT log badge updates as action items in the changelog or report.** Badge syncing is a routine part of every run, not a finding.
|
||||
|
||||
---
|
||||
|
||||
## Phase 4: Offer to Take Action
|
||||
|
||||
After presenting the report (and confirming both changelog and badge were updated), ask the user:
|
||||
|
||||
1. **Execute all actions** — Apply all changes
|
||||
2. **Execute specific actions** — User picks which numbers to execute
|
||||
3. **Just save the report** — No changes
|
||||
|
||||
When executing:
|
||||
- **New fields**: Add to the Frontmatter Fields table with correct type, required status, and description from the official docs
|
||||
- **Removed fields**: Confirm with user before removing
|
||||
- **New skills**: Add to the official skills table with correct #, skill name, and description
|
||||
- **Removed skills**: Confirm with user before removing
|
||||
- After any additions or removals, update the count in the `## Frontmatter Fields (N)` and `##  **(N)**` headings
|
||||
|
||||
---
|
||||
|
||||
## Critical Rules
|
||||
|
||||
1. **Never guess** versions or dates — use data from the agent
|
||||
2. **Cross-reference field counts** — report field count must match official docs
|
||||
3. **Cross-reference skill counts** — report skill count must match official docs
|
||||
4. **Don't auto-execute** — always present the report first
|
||||
5. **ALWAYS append to changelog** — Phase 3.5 is mandatory. Never skip it. Never overwrite previous entries.
|
||||
6. **ALWAYS update the Last Updated badge** — Phase 3.6 is mandatory. Never skip it.
|
||||
7. **Compare with previous runs** — read the last 25 entries from the changelog and mark each action item as NEW, RECURRING, or RESOLVED.
|
||||
8. **Distinguish bundled from installable** — only track skills that ship with Claude Code (bundled). Do not track skills from the Official Skills Repository (github.com/anthropics/skills) — those are installable, not bundled.
|
||||
@@ -100,34 +100,41 @@ claude
|
||||
|
||||

|
||||
|
||||
■ **Planning (2)**
|
||||
- always start with [plan mode](https://code.claude.com/docs/en/common-workflows). ask Claude to interview you; [ask the user a question](https://code.claude.com/docs/en/cli-reference)
|
||||
- always make a phase-wise gated plan, with each phase having multiple tests (unit, automation, integration). use [cross-model](development-workflows/cross-model-workflow/cross-model-workflow.md) to review your plan
|
||||
■ **Prompting (2)**
|
||||
- challenge Claude — "grill me on these changes and don't make a PR until I pass your test." or "prove to me this works" and have Claude diff between main and your branch [](https://x.com/bcherny/status/2017742752566632544)
|
||||
- after a mediocre fix — "knowing everything you know now, scrap this and implement the elegant solution" [](https://x.com/bcherny/status/2017742752566632544)
|
||||
|
||||
■ **Planning/Specs (5)**
|
||||
- always start with [plan mode](https://code.claude.com/docs/en/common-workflows) [](https://x.com/bcherny/status/2007179845336527000)
|
||||
- start with a minimal spec or prompt and ask Claude to interview you using [AskUserQuestion](https://code.claude.com/docs/en/cli-reference) tool, then make a new session to execute the spec [](https://x.com/trq212/status/2005315275026260309)
|
||||
- always make a phase-wise gated plan, with each phase having multiple tests (unit, automation, integration)
|
||||
- spin up a second Claude to review your plan as a staff engineer, or use [cross-model](development-workflows/cross-model-workflow/cross-model-workflow.md) for review [](https://x.com/bcherny/status/2017742745365057733)
|
||||
- write detailed specs and reduce ambiguity before handing work off — the more specific you are, the better the output [](https://x.com/bcherny/status/2017742752566632544)
|
||||
|
||||
■ **Workflows (12)**
|
||||
- [CLAUDE.md](https://code.claude.com/docs/en/memory) should target under [200 lines](https://code.claude.com/docs/en/memory#write-effective-instructions) per file. [60 lines in humanlayer](https://www.humanlayer.dev/blog/writing-a-good-claude-md) ([still not 100% guaranteed](https://www.reddit.com/r/ClaudeCode/comments/1qn9pb9/claudemd_says_must_use_agent_claude_ignores_it_80/)).
|
||||
- [CLAUDE.md](https://code.claude.com/docs/en/memory) should target under [200 lines](https://code.claude.com/docs/en/memory#write-effective-instructions) per file. [60 lines in humanlayer](https://www.humanlayer.dev/blog/writing-a-good-claude-md) ([still not 100% guaranteed](https://www.reddit.com/r/ClaudeCode/comments/1qn9pb9/claudemd_says_must_use_agent_claude_ignores_it_80/)). [](https://x.com/bcherny/status/2007179840848597422)
|
||||
- use [multiple CLAUDE.md](best-practice/claude-memory.md) for monorepos — ancestor + descendant loading
|
||||
- use [.claude/rules/](https://code.claude.com/docs/en/memory#organize-rules-with-clauderules) to split large instructions
|
||||
- use [commands](https://code.claude.com/docs/en/slash-commands) for your workflows instead of [sub-agents](https://code.claude.com/docs/en/sub-agents)
|
||||
- have feature specific [sub-agents](https://code.claude.com/docs/en/sub-agents) (extra context) with [skills](https://code.claude.com/docs/en/skills) (progressive disclosure) instead of general qa, backend engineer.
|
||||
- use [commands](https://code.claude.com/docs/en/slash-commands) for your workflows instead of [sub-agents](https://code.claude.com/docs/en/sub-agents) [](https://x.com/bcherny/status/2007179847949500714)
|
||||
- have feature specific [sub-agents](https://code.claude.com/docs/en/sub-agents) (extra context) with [skills](https://code.claude.com/docs/en/skills) (progressive disclosure) instead of general qa, backend engineer. [](https://x.com/bcherny/status/2007179850139000872)
|
||||
- [memory.md](https://code.claude.com/docs/en/memory), constitution.md does not guarantee anything
|
||||
- avoid agent dumb zone, do manual [/compact](https://code.claude.com/docs/en/interactive-mode) at max 50%. Use [/clear](https://code.claude.com/docs/en/cli-reference) to reset context mid-session if switching to a new task
|
||||
- vanilla cc is better than any workflows with smaller tasks
|
||||
- use [skills in subfolders](reports/claude-skills-for-larger-mono-repos.md) for monorepos
|
||||
- use [/model](https://code.claude.com/docs/en/model-config) to select model and reasoning, [/context](https://code.claude.com/docs/en/interactive-mode) to see context usage, [/usage](https://code.claude.com/docs/en/costs) to check plan limits, [/extra-usage](https://code.claude.com/docs/en/interactive-mode) to configure overflow billing, [/config](https://code.claude.com/docs/en/settings) to configure settings
|
||||
- always use [thinking mode](https://code.claude.com/docs/en/model-config) true (to see reasoning) and [Output Style](https://code.claude.com/docs/en/output-styles) Explanatory (to see detailed output with ★ Insight boxes) in [/config](https://code.claude.com/docs/en/settings) for better understanding of Claude's decisions
|
||||
- always use [thinking mode](https://code.claude.com/docs/en/model-config) true (to see reasoning) and [Output Style](https://code.claude.com/docs/en/output-styles) Explanatory (to see detailed output with ★ Insight boxes) in [/config](https://code.claude.com/docs/en/settings) for better understanding of Claude's decisions [](https://x.com/bcherny/status/2007179838864666847)
|
||||
- use ultrathink keyword in prompts for [high effort reasoning](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking#tips-and-best-practices)
|
||||
- [/rename](https://code.claude.com/docs/en/cli-reference) important sessions (e.g. [TODO - refactor task]) and [/resume](https://code.claude.com/docs/en/cli-reference) them later
|
||||
- use [Esc Esc or /rewind](https://code.claude.com/docs/en/checkpointing) to undo when Claude goes off-track instead of trying to fix it in the same context
|
||||
- commit often — try to commit at least once per hour, as soon as task is completed, commit.
|
||||
|
||||
■ **Workflows Advanced (6)**
|
||||
- use ASCII diagrams a lot to understand your architecture
|
||||
- use ASCII diagrams a lot to understand your architecture [](https://x.com/bcherny/status/2017742759218794768)
|
||||
- [agent teams with tmux](https://code.claude.com/docs/en/agent-teams) and [git worktrees](https://x.com/bcherny/status/2025007393290272904) for parallel development
|
||||
- use [/loop](https://code.claude.com/docs/en/scheduled-tasks) for recurring monitoring — poll deployments, babysit PRs, check builds (runs up to 3 days)
|
||||
- use [Ralph Wiggum plugin](https://github.com/shanraisshan/novel-llm-26) for long-running autonomous tasks
|
||||
- [/permissions](https://code.claude.com/docs/en/permissions) with wildcard syntax (Bash(npm run *), Edit(/docs/**)) instead of dangerously-skip-permissions
|
||||
- [/sandbox](https://code.claude.com/docs/en/sandboxing) to reduce permission prompts with file and network isolation
|
||||
- use [Ralph Wiggum plugin](https://github.com/shanraisshan/novel-llm-26) for long-running autonomous tasks [](https://x.com/bcherny/status/2007179858435281082)
|
||||
- [/permissions](https://code.claude.com/docs/en/permissions) with wildcard syntax (Bash(npm run *), Edit(/docs/**)) instead of dangerously-skip-permissions [](https://x.com/bcherny/status/2007179854077407667)
|
||||
- [/sandbox](https://code.claude.com/docs/en/sandboxing) to reduce permission prompts with file and network isolation [](https://x.com/bcherny/status/2021700506465579443)
|
||||
|
||||
■ **Debugging (5)**
|
||||
- make it a habit to take screenshots and share with Claude whenever you are stuck with any issue
|
||||
@@ -138,11 +145,11 @@ claude
|
||||
- use a [cross-model](development-workflows/cross-model-workflow/cross-model-workflow.md) for QA — e.g. [Codex](https://github.com/shanraisshan/codex-cli-best-practice) for plan and implementation review
|
||||
|
||||
■ **Utilities (5)**
|
||||
- [iTerm](https://iterm2.com/)/[Ghostty](https://ghostty.org/) ([Boris tweet](https://x.com/bcherny/status/2017742753971769626))/[tmux](https://github.com/tmux/tmux) terminals instead of IDE ([VS Code](https://code.visualstudio.com/)/[Cursor](https://www.cursor.com/))
|
||||
- [iTerm](https://iterm2.com/)/[Ghostty](https://ghostty.org/) [](https://x.com/bcherny/status/2017742753971769626)/[tmux](https://github.com/tmux/tmux) terminals instead of IDE ([VS Code](https://code.visualstudio.com/)/[Cursor](https://www.cursor.com/))
|
||||
- [Wispr Flow](https://wisprflow.ai) for voice prompting (10x productivity)
|
||||
- [claude-code-voice-hooks](https://github.com/shanraisshan/claude-code-voice-hooks) for claude feedback
|
||||
- [status line](https://github.com/shanraisshan/claude-code-status-line) for context awareness and fast compacting
|
||||
- explore [settings.json](best-practice/claude-settings.md) features like [Plans Directory](best-practice/claude-settings.md#plans-directory), [Spinner Verbs](best-practice/claude-settings.md#display--ux) for a personalized experience
|
||||
- [status line](https://github.com/shanraisshan/claude-code-status-line) for context awareness and fast compacting [](https://x.com/bcherny/status/2021700784019452195)
|
||||
- explore [settings.json](best-practice/claude-settings.md) features like [Plans Directory](best-practice/claude-settings.md#plans-directory), [Spinner Verbs](best-practice/claude-settings.md#display--ux) for a personalized experience [](https://x.com/bcherny/status/2021701145023197516)
|
||||
|
||||
■ **Daily (3)**
|
||||
- [update](https://code.claude.com/docs/en/setup) Claude Code daily and start your day by reading the [changelog](https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Commands Best Practice
|
||||
|
||||
<br>
|
||||
<br>
|
||||
[](../implementation/claude-commands-implementation.md)
|
||||
|
||||
Complete reference for Claude Code commands — command definitions, frontmatter fields, and current built-in slash commands.
|
||||
Claude Code commands — frontmatter fields and official built-in slash commands.
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
@@ -14,9 +14,7 @@ Complete reference for Claude Code commands — command definitions, frontmatter
|
||||
|
||||
---
|
||||
|
||||
## Frontmatter Fields
|
||||
|
||||
Custom commands are defined in `.claude/commands/<name>.md` with optional YAML frontmatter.
|
||||
## Frontmatter Fields (4)
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
@@ -27,162 +25,69 @@ Custom commands are defined in `.claude/commands/<name>.md` with optional YAML f
|
||||
|
||||
---
|
||||
|
||||
## String Substitutions
|
||||
##  **(56)**
|
||||
|
||||
Available inside command markdown for dynamic values:
|
||||
|
||||
| Variable | Description |
|
||||
|----------|-------------|
|
||||
| `$ARGUMENTS` | All arguments passed when invoking the command |
|
||||
| `$ARGUMENTS[N]` | Access a specific argument by 0-based index |
|
||||
| `$N` | Shorthand for `$ARGUMENTS[N]` (e.g., `$0`, `$1`) |
|
||||
| `${CLAUDE_SESSION_ID}` | Current session identifier |
|
||||
| `` !`command` `` | Dynamic context injection — shell command output replaces the placeholder before Claude sees it |
|
||||
|
||||
---
|
||||
|
||||
## Invocation
|
||||
|
||||
Custom commands are invoked by typing `/command-name` in Claude Code's interactive mode:
|
||||
|
||||
| Method | Description |
|
||||
|--------|-------------|
|
||||
| `/command-name` | Invoke directly from the command menu |
|
||||
| `/command-name [args]` | Pass arguments that map to `$ARGUMENTS` |
|
||||
| Autocomplete | Type `/` to see all available commands with descriptions |
|
||||
| Subdirectories | Commands in subdirectories use `/subdir:command-name` |
|
||||
|
||||
---
|
||||
|
||||
## Example: Minimal Command
|
||||
|
||||
```yaml
|
||||
---
|
||||
description: Fetch weather data for Dubai and create an SVG weather card
|
||||
model: haiku
|
||||
---
|
||||
|
||||
Fetch the current temperature for Dubai, UAE and create a visual SVG weather card.
|
||||
```
|
||||
|
||||
## Example: Full-Featured Command (All Fields)
|
||||
|
||||
```yaml
|
||||
---
|
||||
description: Fix a GitHub issue by number, following team coding standards
|
||||
argument-hint: [issue-number]
|
||||
allowed-tools: Read, Edit, Write, Bash(gh *), Bash(npm test *)
|
||||
model: sonnet
|
||||
---
|
||||
|
||||
Fix GitHub issue $0 following our coding standards.
|
||||
|
||||
## Context
|
||||
- PR diff: !`gh pr diff`
|
||||
- Issue details: !`gh issue view $0`
|
||||
|
||||
## Steps
|
||||
1. Read the issue description
|
||||
2. Understand the requirements
|
||||
3. Implement the fix
|
||||
4. Write tests
|
||||
5. Create a commit
|
||||
|
||||
Session: ${CLAUDE_SESSION_ID}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Scope and Priority
|
||||
|
||||
When multiple commands share the same name, the higher-priority location wins:
|
||||
|
||||
| Location | Scope | Priority |
|
||||
|----------|-------|----------|
|
||||
| Project (`.claude/commands/`) | This project only | 1 (highest) |
|
||||
| Personal (`~/.claude/commands/`) | All your projects | 2 |
|
||||
| Plugin (`<plugin>/commands/`) | Where plugin is enabled | 3 (lowest) |
|
||||
|
||||
---
|
||||
|
||||
## Claude Commands
|
||||
|
||||
### All Commands
|
||||
|
||||
Built-in slash commands available in Claude Code's interactive mode:
|
||||
|
||||
| Command | Tag | Description |
|
||||
|---------|-----|-------------|
|
||||
| `/add-dir` |  | Add additional working directories to the current session |
|
||||
| `/agents` |  | Manage custom subagents — view, create, edit, delete |
|
||||
| `/bug [description]` |  | Alias for `/feedback` |
|
||||
| `/chrome` |  | Manage Claude in Chrome browser integration |
|
||||
| `/clear` |  | Clear conversation history and start fresh |
|
||||
| `/compact [prompt]` |  | Compress conversation to free context window. Optional prompt focuses the compaction |
|
||||
| `/config` |  | Open the interactive settings interface with search |
|
||||
| `/context` |  | Visualize current context usage as a colored grid with token counts |
|
||||
| `/copy` |  | Copy the last assistant response to the clipboard |
|
||||
| `/cost` |  | Show token usage statistics for the current session |
|
||||
| `/desktop` |  | Connect to or manage the desktop companion app |
|
||||
| `/diff` |  | Review the current git diff in the active repo |
|
||||
| `/doctor` |  | Check the health of your Claude Code installation |
|
||||
| `/exit` |  | Exit the REPL |
|
||||
| `/export [filename]` |  | Export the current conversation to a file or clipboard |
|
||||
| `/extra-usage` |  | Configure pay-as-you-go overflow billing for subscription plans |
|
||||
| `/fast` |  | Toggle fast mode — same Opus 4.6 model with faster output |
|
||||
| `/feedback [description]` |  | Generate a GitHub issue URL for reporting bugs or feedback |
|
||||
| `/fork` |  | Fork the current conversation into a new session |
|
||||
| `/help` |  | Show slash-command help |
|
||||
| `/ide` |  | Connect to IDE integration |
|
||||
| `/init [prompt]` |  | Initialize a new project with a CLAUDE.md guide |
|
||||
| `/install-github-app` |  | Install the GitHub app for PR-linked workflows |
|
||||
| `/install-slack-app` |  | Install the Slack app for notifications and sharing |
|
||||
| `/keybindings` |  | Customize keyboard shortcuts per context and create chord sequences |
|
||||
| `/login` |  | Authenticate with Claude Code via OAuth |
|
||||
| `/logout` |  | Log out from Claude Code |
|
||||
| `/mcp` |  | Manage MCP server connections |
|
||||
| `/memory` |  | View and edit memory files |
|
||||
| `/mobile` |  | Connect to or manage the mobile companion app |
|
||||
| `/model` |  | Switch models (haiku, sonnet, opus) and adjust effort level |
|
||||
| `/output-style` |  | Pick an output style preset |
|
||||
| `/passes [number]` |  | Set the number of review passes for certain workflows |
|
||||
| `/permissions` |  | View or update tool permissions |
|
||||
| `/plan` |  | Enter read-only planning mode — suggests approaches without making changes |
|
||||
| `/pr-comments` |  | Review or reply to pull-request comments |
|
||||
| `/privacy-settings` |  | Manage privacy and telemetry preferences |
|
||||
| `/release-notes` |  | Show recent Claude Code release notes |
|
||||
| `/reload-plugins` |  | Reload installed plugins without restarting |
|
||||
| `/remote-control` |  | Continue the current session from another device |
|
||||
| `/remote-env` |  | Inspect or copy the remote-control environment setup |
|
||||
| `/rename <name>` |  | Rename the current session for easier identification |
|
||||
| `/resume [session]` |  | Resume a previous conversation by ID or name, or open the session picker |
|
||||
| `/review` |  | Review the current code changes |
|
||||
| `/rewind` |  | Rewind conversation and/or code to an earlier point |
|
||||
| `/sandbox` |  | Configure sandboxing with dependency status |
|
||||
| `/security-review` |  | Run a focused security review on current changes |
|
||||
| `/status` |  | Show a concise session status summary |
|
||||
| `/stats` |  | Visualize daily usage, session history, streaks, and model preferences |
|
||||
| `/statusline` |  | Set up Claude Code's status line UI |
|
||||
| `/stickers` |  | Choose sticker packs shown in the UI |
|
||||
| `/tasks` |  | List and manage background tasks |
|
||||
| `/terminal-setup` |  | Enable shift+enter for newlines in IDE terminals |
|
||||
| `/theme` |  | Change the color theme |
|
||||
| `/usage` |  | Show plan usage limits and rate limit status (subscription plans only) |
|
||||
| `/vim` |  | Enable vim-style editing mode |
|
||||
| # | Command | Tag | Description |
|
||||
|---|---------|-----|-------------|
|
||||
| 1 | `/login` |  | Authenticate with Claude Code via OAuth |
|
||||
| 2 | `/logout` |  | Log out from Claude Code |
|
||||
| 3 | `/config` |  | Open the interactive settings interface with search |
|
||||
| 4 | `/keybindings` |  | Customize keyboard shortcuts per context and create chord sequences |
|
||||
| 5 | `/output-style` |  | Pick an output style preset |
|
||||
| 6 | `/permissions` |  | View or update tool permissions |
|
||||
| 7 | `/privacy-settings` |  | Manage privacy and telemetry preferences |
|
||||
| 8 | `/sandbox` |  | Configure sandboxing with dependency status |
|
||||
| 9 | `/statusline` |  | Set up Claude Code's status line UI |
|
||||
| 10 | `/stickers` |  | Choose sticker packs shown in the UI |
|
||||
| 11 | `/terminal-setup` |  | Enable shift+enter for newlines in IDE terminals |
|
||||
| 12 | `/theme` |  | Change the color theme |
|
||||
| 13 | `/vim` |  | Enable vim-style editing mode |
|
||||
| 14 | `/context` |  | Visualize current context usage as a colored grid with token counts |
|
||||
| 15 | `/cost` |  | Show token usage statistics for the current session |
|
||||
| 16 | `/extra-usage` |  | Configure pay-as-you-go overflow billing for subscription plans |
|
||||
| 17 | `/status` |  | Show a concise session status summary |
|
||||
| 18 | `/stats` |  | Visualize daily usage, session history, streaks, and model preferences |
|
||||
| 19 | `/usage` |  | Show plan usage limits and rate limit status (subscription plans only) |
|
||||
| 20 | `/bug [description]` |  | Alias for `/feedback` |
|
||||
| 21 | `/doctor` |  | Check the health of your Claude Code installation |
|
||||
| 22 | `/feedback [description]` |  | Generate a GitHub issue URL for reporting bugs or feedback |
|
||||
| 23 | `/help` |  | Show slash-command help |
|
||||
| 24 | `/release-notes` |  | Show recent Claude Code release notes |
|
||||
| 25 | `/tasks` |  | List and manage background tasks |
|
||||
| 26 | `/copy` |  | Copy the last assistant response to the clipboard |
|
||||
| 27 | `/export [filename]` |  | Export the current conversation to a file or clipboard |
|
||||
| 28 | `/agents` |  | Manage custom subagents — view, create, edit, delete |
|
||||
| 29 | `/chrome` |  | Manage Claude in Chrome browser integration |
|
||||
| 30 | `/ide` |  | Connect to IDE integration |
|
||||
| 31 | `/mcp` |  | Manage MCP server connections |
|
||||
| 32 | `/reload-plugins` |  | Reload installed plugins without restarting |
|
||||
| 33 | `/memory` |  | View and edit memory files |
|
||||
| 34 | `/fast` |  | Toggle fast mode — same Opus 4.6 model with faster output |
|
||||
| 35 | `/model` |  | Switch models (haiku, sonnet, opus) and adjust effort level |
|
||||
| 36 | `/passes [number]` |  | Set the number of review passes for certain workflows |
|
||||
| 37 | `/plan` |  | Enter read-only planning mode — suggests approaches without making changes |
|
||||
| 38 | `/add-dir` |  | Add additional working directories to the current session |
|
||||
| 39 | `/diff` |  | Review the current git diff in the active repo |
|
||||
| 40 | `/init [prompt]` |  | Initialize a new project with a CLAUDE.md guide |
|
||||
| 41 | `/pr-comments` |  | Review or reply to pull-request comments |
|
||||
| 42 | `/review` |  | Review the current code changes |
|
||||
| 43 | `/security-review` |  | Run a focused security review on current changes |
|
||||
| 44 | `/desktop` |  | Connect to or manage the desktop companion app |
|
||||
| 45 | `/install-github-app` |  | Install the GitHub app for PR-linked workflows |
|
||||
| 46 | `/install-slack-app` |  | Install the Slack app for notifications and sharing |
|
||||
| 47 | `/mobile` |  | Connect to or manage the mobile companion app |
|
||||
| 48 | `/remote-control` |  | Continue the current session from another device |
|
||||
| 49 | `/remote-env` |  | Inspect or copy the remote-control environment setup |
|
||||
| 50 | `/clear` |  | Clear conversation history and start fresh |
|
||||
| 51 | `/compact [prompt]` |  | Compress conversation to free context window. Optional prompt focuses the compaction |
|
||||
| 52 | `/exit` |  | Exit the REPL |
|
||||
| 53 | `/fork` |  | Fork the current conversation into a new session |
|
||||
| 54 | `/rename <name>` |  | Rename the current session for easier identification |
|
||||
| 55 | `/resume [session]` |  | Resume a previous conversation by ID or name, or open the session picker |
|
||||
| 56 | `/rewind` |  | Rewind conversation and/or code to an earlier point |
|
||||
|
||||
Bundled skills such as `/debug` can also appear in the slash-command menu, but they are not built-in commands.
|
||||
|
||||
### Commands in This Repository
|
||||
|
||||
Custom commands defined in `.claude/commands/` for this project:
|
||||
|
||||
| Command | Description | Model |
|
||||
|---------|-------------|-------|
|
||||
| [`weather-orchestrator`](../.claude/commands/weather-orchestrator.md) | Fetch weather data for Dubai and create an SVG weather card | haiku |
|
||||
| [`workflows/best-practice/workflow-claude-settings`](../.claude/commands/workflows/best-practice/workflow-claude-settings.md) | Track Claude Code settings report changes and find what needs updating | — |
|
||||
| [`workflows/best-practice/workflow-claude-subagents`](../.claude/commands/workflows/best-practice/workflow-claude-subagents.md) | Track Claude Code subagents report changes and find what needs updating | — |
|
||||
| [`workflows/best-practice/workflow-concepts`](../.claude/commands/workflows/best-practice/workflow-concepts.md) | Update the README CONCEPTS section with the latest Claude Code features and concepts | — |
|
||||
|
||||
---
|
||||
|
||||
## Sources
|
||||
|
||||
+13
-122
@@ -1,9 +1,9 @@
|
||||
# Skills Best Practice
|
||||
|
||||
<br>
|
||||
<br>
|
||||
[](../implementation/claude-skills-implementation.md)
|
||||
|
||||
Complete reference for Claude Code skills — skill definitions, frontmatter fields, and invocation patterns.
|
||||
Claude Code skills — frontmatter fields and official bundled skills.
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
@@ -14,9 +14,7 @@ Complete reference for Claude Code skills — skill definitions, frontmatter fie
|
||||
|
||||
---
|
||||
|
||||
## Frontmatter Fields
|
||||
|
||||
Skills are defined in `.claude/skills/<name>/SKILL.md` with optional YAML frontmatter.
|
||||
## Frontmatter Fields (10)
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
@@ -33,125 +31,18 @@ Skills are defined in `.claude/skills/<name>/SKILL.md` with optional YAML frontm
|
||||
|
||||
---
|
||||
|
||||
## Two Skill Patterns
|
||||
##  **(6)**
|
||||
|
||||
| Pattern | Loading | Invocation | Use Case |
|
||||
|---------|---------|-----------|----------|
|
||||
| **Skill** | On-demand | `/skill-name` or `Skill(skill: "name")` tool | Standalone reusable workflows invoked by commands or Claude |
|
||||
| **Agent Skill** | Preloaded at agent startup via `skills:` field | Automatic — full content injected into agent context | Domain knowledge or procedures baked into a specific agent |
|
||||
| # | Skill | Description |
|
||||
|---|-------|-------------|
|
||||
| 1 | `simplify` | Review changed code for reuse, quality, and efficiency — refactors to eliminate duplication |
|
||||
| 2 | `batch` | Run commands across multiple files in bulk |
|
||||
| 3 | `debug` | Debug failing commands or code issues |
|
||||
| 4 | `loop` | Run a prompt or slash command on a recurring interval (up to 3 days) |
|
||||
| 5 | `claude-api` | Build apps with the Claude API or Anthropic SDK — triggers on `anthropic` / `@anthropic-ai/sdk` imports |
|
||||
| 6 | `keybindings-help` | Customize keyboard shortcuts, rebind keys, and create chord sequences |
|
||||
|
||||
---
|
||||
|
||||
## String Substitutions
|
||||
|
||||
Available inside skill markdown for dynamic values:
|
||||
|
||||
| Variable | Description |
|
||||
|----------|-------------|
|
||||
| `$ARGUMENTS` | All arguments passed when invoking the skill |
|
||||
| `$ARGUMENTS[N]` | Access a specific argument by 0-based index |
|
||||
| `$N` | Shorthand for `$ARGUMENTS[N]` (e.g., `$0`, `$1`) |
|
||||
| `${CLAUDE_SESSION_ID}` | Current session identifier |
|
||||
| `` !`command` `` | Dynamic context injection — shell command output replaces the placeholder before Claude sees it |
|
||||
|
||||
---
|
||||
|
||||
## Invocation
|
||||
|
||||
| Method | Description |
|
||||
|--------|-------------|
|
||||
| `/skill-name` | Invoke directly from the slash command menu |
|
||||
| `/skill-name [args]` | Pass arguments that map to `$ARGUMENTS` |
|
||||
| `Skill(skill: "name")` | Programmatic invocation via the Skill tool (used in commands and agents) |
|
||||
| `skills: [name]` in agent frontmatter | Preload into an agent — full skill content injected at startup, not invoked on-demand |
|
||||
| Subdirectories | Skills in subdirectories use `/subdir:skill-name` |
|
||||
|
||||
---
|
||||
|
||||
## Example: Minimal Skill
|
||||
|
||||
```yaml
|
||||
---
|
||||
description: Summarize staged changes into a concise changelog entry
|
||||
---
|
||||
|
||||
Summarize the git diff in context into a one-paragraph changelog entry,
|
||||
focusing on what changed and why.
|
||||
```
|
||||
|
||||
## Example: Minimal Agent Skill
|
||||
|
||||
A skill preloaded into an agent as background knowledge — hidden from the `/` menu:
|
||||
|
||||
```yaml
|
||||
---
|
||||
name: deploy-checklist
|
||||
description: Pre-flight deployment checks for production releases
|
||||
user-invocable: false
|
||||
---
|
||||
|
||||
# Deploy Checklist
|
||||
|
||||
Before any production deployment:
|
||||
1. Run all tests: `npm test`
|
||||
2. Check for uncommitted changes: `git status`
|
||||
3. Verify environment variables are set
|
||||
4. Confirm database migrations are ready
|
||||
```
|
||||
|
||||
## Example: Full-Featured Skill (All Fields)
|
||||
|
||||
```yaml
|
||||
---
|
||||
name: code-review
|
||||
description: Review code for quality, security, and performance issues
|
||||
argument-hint: [file-path]
|
||||
allowed-tools: Read, Grep, Glob
|
||||
model: sonnet
|
||||
context: fork
|
||||
agent: general-purpose
|
||||
hooks:
|
||||
Stop:
|
||||
- hooks:
|
||||
- type: command
|
||||
command: "./scripts/log-review-complete.sh"
|
||||
---
|
||||
|
||||
Review the code at $0.
|
||||
|
||||
## Checklist
|
||||
- [ ] Security: injection, XSS, hardcoded secrets
|
||||
- [ ] Performance: N+1 queries, unnecessary loops
|
||||
- [ ] Quality: naming, complexity, test coverage
|
||||
- [ ] Error handling: edge cases, failure modes
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Scope and Priority
|
||||
|
||||
When multiple skills share the same name, the higher-priority location wins:
|
||||
|
||||
| Location | Scope | Priority |
|
||||
|----------|-------|----------|
|
||||
| Project (`.claude/skills/`) | This project only | 1 (highest) |
|
||||
| Personal (`~/.claude/skills/`) | All your projects | 2 |
|
||||
| Plugin (`<plugin>/skills/`) | Where plugin is enabled | 3 (lowest) |
|
||||
|
||||
---
|
||||
|
||||
## Skills in This Repository
|
||||
|
||||
Skills defined in `.claude/skills/` for this project:
|
||||
|
||||
| Skill | User-Invocable | Preloaded Into | Description |
|
||||
|-------|----------------|----------------|-------------|
|
||||
| [`weather-svg-creator`](../.claude/skills/weather-svg-creator/SKILL.md) | Yes | — | Creates SVG weather card and writes output files |
|
||||
| [`weather-fetcher`](../.claude/skills/weather-fetcher/SKILL.md) | No | `weather-agent` | Fetches current temperature from Open-Meteo |
|
||||
| [`agent-browser`](../.claude/skills/agent-browser/SKILL.md) | Yes | — | Browser automation CLI for AI agents |
|
||||
| [`presentation/vibe-to-agentic-framework`](../.claude/skills/presentation/vibe-to-agentic-framework/SKILL.md) | Yes | `presentation-curator` | Conceptual framework behind the presentation |
|
||||
| [`presentation/presentation-structure`](../.claude/skills/presentation/presentation-structure/SKILL.md) | Yes | `presentation-curator` | Slide format, weight system, and section structure |
|
||||
| [`presentation/presentation-styling`](../.claude/skills/presentation/presentation-styling/SKILL.md) | Yes | `presentation-curator` | CSS classes, component patterns, and syntax highlighting |
|
||||
See also: [Official Skills Repository](https://github.com/anthropics/skills/tree/main/skills) for community-maintained installable skills.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ Claude Code subagents — frontmatter fields and official built-in agent types.
|
||||
|
||||
---
|
||||
|
||||
## Frontmatter Fields
|
||||
## Frontmatter Fields (14)
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
@@ -35,7 +35,7 @@ Claude Code subagents — frontmatter fields and official built-in agent types.
|
||||
|
||||
---
|
||||
|
||||

|
||||
##  **(6)**
|
||||
|
||||
| # | Agent | Model | Tools | Description |
|
||||
|---|-------|-------|-------|-------------|
|
||||
|
||||
Reference in New Issue
Block a user