SKILL.md-based instruction package. Claude can load it automatically when relevant, or you can invoke it directly with /skill-name. Skills are especially useful for repeated instructions, checklists, multi-step procedures, and domain knowledge.Think of a Skill as a reusable instruction pack for Claude Code.
| Without Skill | With Skill |
|---|---|
| Repeat the same instructions in chat. | Write instructions once in SKILL.md. |
| Explain a workflow every time. | Reuse the workflow. |
| Large reference material may pollute context. | Reference files can load only when needed. |
| Repeated prompts are manual. | A slash command provides a reusable entry point. |
CLAUDE.md is for persistent project facts/rules; Skills are excellent for reusable knowledge and procedures that load when needed.CLAUDE.md has become a procedure rather than a fact./command.API conventions, domain rules, architecture patterns, style guides.
Deployment, issue fixing, release preparation, code review, migrations.
Turn a repeated prompt into /deploy, /review, etc.
Claude can choose a Skill when the request matches its description.
.claude/
└── skills/
└── summarize-changes/
└── SKILL.md
Every Skill needs SKILL.md. It has YAML frontmatter followed by Markdown instructions.
--- name: summarize-changes description: Summarize uncommitted changes and flag risks. --- ## Current changes !`git diff HEAD` ## Instructions Summarize the changes in 2–3 bullets. Flag risks and tests that need updating.
--- must be the first line for Claude Code to parse frontmatter.mkdir -p ~/.claude/skills/summarize-changes
--- description: Summarizes uncommitted changes and flags risky changes. --- ## Current changes !`git diff HEAD` ## Instructions Summarize the changes in two or three bullets. List risks such as missing error handling, hardcoded values, or tests that need updating.
claude What did I change?
Or:
/summarize-changes
| Scope | Path | Where it works |
|---|---|---|
| Enterprise | Managed .claude/skills/ | Organization-managed users |
| Personal | ~/.claude/skills/<name>/SKILL.md | All projects on that machine |
| Project | .claude/skills/<name>/SKILL.md | Sessions in repository |
| Nested | <subdir>/.claude/skills/ | Sessions working in that subtree |
| Additional directory | .claude/skills/ under --add-dir | That session |
| Plugin | <plugin>/skills/<name>/ | Where plugin is enabled |
| claude.ai account | Synced Skills | Cowork/cloud sessions |
Claude Code loads project Skills from the start directory and parent directories up to the repository root. Skills below the start directory can become available when Claude first works with files there; supported versions can also use /add-dir to load them sooner.
repo/ ├── .claude/skills/deploy/SKILL.md └── apps/web/.claude/skills/frontend-test/SKILL.md
If names collide, both can remain available and nested Skills may have qualified commands such as:
/apps/web:deploy
.claude/skills/deploy-staging/SKILL.md → /deploy-staging
For plugins, Skills are namespaced:
/my-plugin:review
.claude/commands/ files still work, but Skills are preferred for new work.| Field | Purpose |
|---|---|
name | Display name; normal project/personal command name still comes from directory. |
description | What the Skill does and when Claude should use it. |
when_to_use | Extra trigger/use guidance. |
argument-hint | Autocomplete hint for expected arguments. |
arguments | Named positional arguments. |
disable-model-invocation | Stops Claude from automatically invoking it. |
user-invocable | If false, user cannot invoke it directly. |
allowed-tools | Pre-approves listed tools for the Skill's invocation turn. |
disallowed-tools | Removes listed tools while Skill is active. |
context | Can fork the Skill into an isolated subagent context. |
agent | Subagent configuration used with context: fork. |
background | Controls waiting/background behavior for forked Skills. |
paths | Limits automatic activation to matching file patterns. |
shell | Shell used by injected commands. |
metadata | Free-form map for external tooling; Claude Code does not act on it. |
license | License metadata. |
compatibility | Environment requirements; max 500 characters. |
You invoke it. Claude cannot automatically choose it. Great for deploy, commit, release, or messaging workflows.
--- name: deploy description: Deploy to production disable-model-invocation: true ---
Claude invokes it. The user does not get it as a normal slash command. Good for background knowledge.
--- name: legacy-context description: Explains the legacy system user-invocable: false ---
| Configuration | User | Claude |
|---|---|---|
| Default | Yes | Yes |
disable-model-invocation: true | Yes | No |
user-invocable: false | No | Yes |
| Reference Skill | Task Skill |
|---|---|
| Provides knowledge. | Performs a procedure. |
| API conventions. | Deploy application. |
| Domain rules. | Fix GitHub issue. |
| Style guide. | Create release. |
my-skill/
├── SKILL.md
├── reference.md
├── examples.md
└── scripts/
└── helper.py
Keep SKILL.md focused and point Claude to detailed files:
## Additional resources - Complete API details: reference.md - Usage examples: examples.md
SKILL.md under about 500 lines and move detailed reference material into separate files.--- name: fix-issue description: Fix a GitHub issue disable-model-invocation: true --- Fix GitHub issue $ARGUMENTS.
/fix-issue 123
--- name: migrate-component description: Migrate a component --- Migrate $0 from $1 to $2.
/migrate-component SearchBar JavaScript TypeScript
| Placeholder | Meaning |
|---|---|
$ARGUMENTS | All arguments. |
$ARGUMENTS[0] | First argument. |
$0 | First argument shorthand. |
$1 | Second argument. |
$name | Named argument from arguments. |
--- name: migrate-component description: Migrate a component arguments: [component, from, to] --- Migrate $component from $from to $to.
Run:
/migrate-component SearchBar JavaScript TypeScript
/write-tests /fix-issue 123
Current Claude Code can expand the first Skill plus up to five more stacked inline user-invocable Skills. Expansion stops when a token is not another inline Skill.
The !`command` syntax runs a shell command before the Skill content is sent to Claude. The command output replaces the placeholder.
--- name: pr-summary description: Summarize a pull request allowed-tools: Bash(gh *) --- ## Pull request context - PR diff: !`gh pr diff` - PR comments: !`gh pr view --comments` - Changed files: !`gh pr diff --name-only` ## Task Summarize this pull request.
## Environment ```! node --version git status --short npm test ```
Injected commands run before Claude sees the rendered Skill content.
| Frontmatter | Meaning |
|---|---|
shell: bash | Use Bash. |
shell: powershell | Use PowerShell when enabled. |
| No shell | Claude Code chooses based on environment. |
| Variable | Use |
|---|---|
${CLAUDE_SESSION_ID} | Current session ID. |
${CLAUDE_EFFORT} | Current effort level. |
${CLAUDE_SKILL_DIR} | Skill's directory. |
${CLAUDE_PROJECT_DIR} | Project root. |
${CLAUDE_PLUGIN_ROOT} | Plugin installation directory. |
${CLAUDE_PLUGIN_DATA} | Persistent plugin data directory. |
---
name: render-chart
description: Render a chart from CSV
allowed-tools: Bash(${CLAUDE_SKILL_DIR}/scripts/render.sh *)
---
Run:
${CLAUDE_SKILL_DIR}/scripts/render.sh data.csv
--- name: deep-research description: Research a topic thoroughly context: fork agent: Explore --- Research $ARGUMENTS thoroughly: 1. Find relevant files. 2. Read and analyze them. 3. Summarize findings with file references.
The forked subagent does not receive your conversation history. The Skill content becomes its task. Supported agent choices include Explore, Plan, general-purpose, or a custom subagent.
Forked Skills can run in the background in supported interactive contexts. Set background: false when you want to wait for the result. Non-interactive -p, Agent SDK, scheduled tasks, and some settings can change this behavior.
| Pattern | Meaning |
|---|---|
Skill + context: fork | Skill becomes the task for a subagent. |
| Subagent + Skills | Subagent can use Skills as preloaded/reference material. |
# Allow Skill(commit) Skill(review-pr *) # Deny Skill(deploy *)
Skill(name) matches exactly; Skill(name *) matches the name plus arguments.
allowed-tools. Review Skills checked into unfamiliar repositories before running them.| Value | Claude sees | / menu |
|---|---|---|
on | Name + description | Yes |
name-only | Name only | Yes |
user-invocable-only | Hidden | Yes |
off | Hidden | Hidden |
{
"skillOverrides": {
"legacy-context": "name-only",
"deploy": "off"
}
}
When a Skill is invoked, its rendered content enters the conversation and stays across later turns. Its instructions persist, but an allowed-tools grant clears when the next user message is sent.
Claude Code watches supported Skill directories for changes to SKILL.md. Personal/project Skills can be removed by deleting their directories. Plugin Skills are removed by disabling/uninstalling the plugin. Synced Skills are controlled from the account where they were enabled.
Setup/environment diagnostics.
Code review workflow.
Large multi-change workflows.
Debugging workflow.
Loop-oriented workflow.
Claude API workflow.
| Skill | Purpose |
|---|---|
/run | Launch and drive the application to see a change working. |
/verify | Build/run the application and confirm the change against the running app. |
/run-skill-generator | Record a project-specific recipe for building/launching the app. |
The generator is especially useful when a project needs databases, environment files, graphical sessions, or multiple startup steps.
~/.claude/skills/codebase-visualizer/
├── SKILL.md
└── scripts/
└── visualize.py
---
name: codebase-visualizer
description: Generate an interactive codebase tree
allowed-tools: Bash(python3 *)
---
Run:
python3 ${CLAUDE_SKILL_DIR}/scripts/visualize.py .
Skills can bundle scripts to create HTML reports, dependency graphs, coverage reports, database diagrams, and other visual output.
| Method | Best use |
|---|---|
| Project Skills | Commit .claude/skills/ to Git for team sharing. |
| Plugins | Package reusable Skills across projects/teams. |
| Managed Skills | Organization-wide deployment. |
| CLAUDE.md | Skills |
|---|---|
| Persistent project facts/rules. | Reusable knowledge/workflows. |
| Session/project context. | Full body generally loads when used. |
| Architecture facts. | Procedures, commands, domain references. |
| Feature | Simple mental model |
|---|---|
| Skill | “Follow this reusable procedure / use this knowledge.” |
| Old custom command | Older format; still works, but Skills are preferred for new work. |
| Subagent | “Have another Claude worker do this in its own context.” |
| Hook | “When this lifecycle event happens, run this.” |
| MCP | “Give Claude access to an external system/tool.” |
.claude/skills/api-review/SKILL.md --- name: api-review description: Review Next.js API routes for validation, auth, errors, and response consistency. --- Check: 1. Input validation 2. Authentication/authorization 3. Error handling 4. HTTP status codes 5. Response shape 6. Database access 7. Logging 8. Tests
--- name: deploy-staging description: Deploy the application to staging disable-model-invocation: true --- 1. Run tests. 2. Build. 3. Verify environment. 4. Deploy. 5. Check deployment. 6. Report status.
Use:
/api-review /deploy-staging
.claude/skills/spring-boot-review/SKILL.md --- name: spring-boot-review description: Review Spring Boot code for services, transactions, JPA, validation, and exceptions. --- Check: - Controller/service/repository separation - DTO boundaries - Transaction boundaries - JPA fetching and N+1 risks - Validation - Exception handling - Logging - Tests
Use natural keywords users actually say.
Move large references into supporting files.
Use disable-model-invocation: true for manual workflows when appropriate.
Make one Skill reusable across issues, branches, files, or components.
Research and isolated work fit context: fork.
Check allowed-tools before running repository Skills.
| Mistake | Better approach |
|---|---|
| Huge SKILL.md | Move references into separate files. |
| Weak description | Use clear, natural trigger language. |
| Auto-running deploy | Use disable-model-invocation: true. |
| Hardcoded workflow | Use arguments. |
| Everything in CLAUDE.md | Move repeated procedures into Skills. |
| Broad allowed-tools | Grant only what the Skill needs. |
| Forking passive guidelines | Fork explicit tasks such as research. |
A Skill triggering does not prove it works well. Test two things separately:
Use realistic prompts in fresh sessions and compare with the Skill enabled and disabled.
/plugin install skill-creator@claude-plugins-official
The current skill-creator workflow can help with test cases, isolated runs, grading, benchmarks, version comparison, and description tuning.
/skill-name directly.--debug for parsing issues.disable-model-invocation: true for manual-only workflows.Skill descriptions are included in the listing Claude uses to know what is available. If many Skills exist, descriptions can be shortened to fit the listing budget. Current Claude Code provides /skill-doctor in supported versions to inspect Skill usage/context costs.
.claude/
└── skills/
└── release/
├── SKILL.md
├── checklist.md
├── examples.md
└── scripts/
└── verify-release.sh
--- name: release description: Prepare a production release by checking tests, versioning, changelog, and readiness. disable-model-invocation: true allowed-tools: - Bash(git status *) - Bash(git diff *) - Bash(npm test *) --- # Release 1. Check branch. 2. Run tests. 3. Review changes. 4. Read checklist. 5. Verify version. 6. Prepare release summary.
| Need | Use |
|---|---|
| Permanent project rule | CLAUDE.md |
| Repeated procedure | Skill |
| Reusable domain knowledge | Skill |
| External service/tool | MCP |
| Lifecycle automation | Hook |
| Independent worker | Subagent |
| Many coordinated workers | Agent team/workflow |
SKILL.md?description do?disable-model-invocation do?user-invocable: false mean?$ARGUMENTS work?$0 and $1?context: fork?${CLAUDE_SKILL_DIR}?/standup Skill using Git history./deploy-staging Skill.$ARGUMENTS to a GitHub issue Skill.allowed-tools.!`git diff HEAD`.reference.md.context: fork.| Concept | Remember |
|---|---|
| Skill file | SKILL.md |
| Project path | .claude/skills/name/SKILL.md |
| Personal path | ~/.claude/skills/name/SKILL.md |
| Invoke | /name |
| Automatic matching | description |
| Manual-only | disable-model-invocation: true |
| Claude-only | user-invocable: false |
| All arguments | $ARGUMENTS |
| First argument | $0 |
| Named argument | $name |
| Dynamic context | !`command` |
| Skill directory | ${CLAUDE_SKILL_DIR} |
| Project root | ${CLAUDE_PROJECT_DIR} |
| Forked subagent | context: fork |
| Tool pre-approval | allowed-tools |
| Supporting docs | Files beside SKILL.md |
Start simple: create a Skill directory, add SKILL.md, write a strong description, and put the reusable procedure in the body. As the workflow grows, add arguments, supporting files, dynamic context, tool permissions, or a forked subagent.