A Claude Code skill is a folder with a SKILL.md file: YAML frontmatter plus Markdown instructions. Claude loads the skill when your request matches its description, or you run it yourself with /skill-name. Put personal skills in ~/.claude/skills/<name>/ and project skills in .claude/skills/<name>/.
Checked against the official Anthropic documentation on 2 December 2026. Claude Code changes quickly, so check the linked docs if something behaves differently on your version. If you have not installed it yet, start with how to install Claude Code.
What skills are in Claude Code
According to the Claude Code skills documentation, you write a SKILL.md file with instructions and Claude adds it to its toolkit. Claude uses a skill when it is relevant, or you invoke it directly with /skill-name.
The main practical difference from CLAUDE.md is when the content loads. A skill’s body is loaded only when the skill is used, so long reference material costs little until it is needed. Rules that must apply to every session belong in CLAUDE.md. Procedures you need only sometimes (a release checklist, a review routine, a migration recipe) fit better as skills.
Skills follow the open Agent Skills standard, and Claude Code adds its own extensions on top of it.
Where skills live
The docs list these locations:
| Location | Path | Scope |
|---|---|---|
| Enterprise | .claude/skills/<name>/SKILL.md in the managed settings directory |
All users where the organization deploys it |
| Personal | ~/.claude/skills/<name>/SKILL.md |
All your projects on this machine |
| Project | .claude/skills/<name>/SKILL.md |
This repository; commit it to share with the team |
| Nested | <subdir>/.claude/skills/<name>/SKILL.md |
Sessions in or below that subdirectory |
| Plugin | <plugin>/skills/<name>/SKILL.md |
Where the plugin is enabled, invoked as /plugin-name:skill-name |
If two skills share a name, enterprise overrides personal, and personal overrides project. A skill of your own with the same name can also replace a bundled skill.
For a team, the project location is the useful one: commit .claude/skills/ and everyone who clones the repository gets the same procedures.
Anatomy of a SKILL.md
A skill is YAML frontmatter between --- markers, followed by Markdown instructions. The frontmatter must start on the first line of the file.
All frontmatter fields are optional, but description is recommended. Field names must match exactly: unknown fields are ignored without an error, so a typo silently does nothing. The most useful fields:
| Field | What it does |
|---|---|
name |
Command name in the / menu. Defaults to the directory name. |
description |
What the skill does and when to use it. Claude uses it to decide whether to load the skill. Put the key use case first. |
when_to_use |
Extra trigger phrases or example requests, appended to the description. |
argument-hint |
Autocomplete hint, for example [issue-number]. |
disable-model-invocation |
true stops Claude from loading the skill on its own. For manual workflows such as /deploy. |
user-invocable |
false hides the skill from the / menu so only Claude can invoke it. |
allowed-tools |
Tools Claude can use without prompting during the turn that invokes the skill. |
context |
fork runs the skill in a forked subagent. |
agent |
Which subagent type to use with context: fork, for example Explore or Plan. |
paths |
Glob patterns that limit when the skill activates. |
The description matters most. Combined with when_to_use, it is truncated at 1,536 characters in the skill listing, which is how Claude knows the skill exists. A vague description means Claude will not pick the skill when it should.
A working example
This is the example skill from the official docs, saved as ~/.claude/skills/summarize-changes/SKILL.md:
---
description: Summarizes uncommitted changes and flags anything risky. Use when the user asks what changed, wants a commit message, or asks to review their diff.
---
## Current changes
!`git diff HEAD`
## Instructions
Summarize the changes above in two or three bullet points, then list any risks you notice such as missing error handling, hardcoded values, or tests that need updating. If the diff is empty, say there are no uncommitted changes.
Two things to notice. First, there is no name, so the skill is called /summarize-changes after its directory. Second, the line !`git diff HEAD` is dynamic context injection: the shell command runs before the skill is sent to Claude, and its output replaces the placeholder. Claude sees the actual diff, not the command.
Per the docs, if an injected command fails, the whole skill invocation aborts. Commands that match a deny rule abort it too, and commands that need approval abort unless you pre-approve them with allowed-tools.
How to create a skill, step by step
- Create the folder:
mkdir -p ~/.claude/skills/summarize-changes(or.claude/skills/...inside a repository for a project skill). - Create
SKILL.mdinside it with adescriptionthat says what the skill does and when to use it. - Write the instructions in the body. Be concrete: steps, output format, what to do in edge cases.
- Run
/summarize-changesin a session, or ask something that matches the description and check that Claude picks it up. - Refine the description first if the skill triggers too rarely or too often, then the body.
You can also just ask Claude to write the skill for you and tell it where to save it. Review the result like any other file.
Supporting files
The docs recommend keeping SKILL.md under 500 lines and moving detail into sibling files that Claude reads only when needed:
my-skill/
├── SKILL.md (overview and navigation)
├── reference.md (loaded when needed)
├── examples.md (loaded when needed)
└── scripts/
└── helper.py (executed, not loaded)
Reference these files from SKILL.md so Claude knows when to open them. Scripts are executed rather than read into context, which keeps long deterministic logic out of the prompt.
Arguments
Skills accept arguments. $ARGUMENTS holds everything typed after the command; $0, $1 and so on are positional (0-indexed). You can also declare named arguments in an arguments field and use them as $name. If no placeholder receives the arguments, Claude Code appends ARGUMENTS: <value> to the skill content.
The docs give this example:
---
name: migrate-component
description: Migrate a component from one language to another
---
Migrate the $0 component from $1 to $2.
Preserve all existing behavior and tests.
Running /migrate-component SearchBar JavaScript TypeScript fills in all three values.
Controlling who invokes a skill
By default both you and Claude can invoke a skill, and its description is always in context. Two fields change that:
| Frontmatter | You can invoke | Claude can invoke | Description in context |
|---|---|---|---|
| (default) | Yes | Yes | Yes |
disable-model-invocation: true |
Yes | No | No |
user-invocable: false |
No | Yes | Yes |
Use disable-model-invocation: true for anything with side effects, such as committing or deploying, where you do not want Claude deciding when to run it. The docs show a commit skill that pre-approves only the Git commands it needs:
---
name: commit
description: Stage and commit the current changes
disable-model-invocation: true
allowed-tools: Bash(git add *) Bash(git commit *) Bash(git status *)
---
Note that allowed-tools pre-approves tools for the invoking turn only. It does not restrict other tools, and your permission settings still apply to everything not listed.
Skills vs slash commands vs subagents vs hooks
People often mix these up. Based on the official docs:
| Feature | What it is | Where it lives | When it runs |
|---|---|---|---|
| Skill | Markdown instructions in SKILL.md that Claude adds to its toolkit |
.claude/skills/<name>/ |
When the request matches the description, or when you type /name |
| Custom slash command | The older format: a file in .claude/commands/. Now merged into skills and still works |
.claude/commands/ |
When you type /name |
| Subagent | A specialized assistant with its own context window, system prompt and tool access | .claude/agents/ or ~/.claude/agents/ |
When Claude delegates based on its description, or you start a session with claude --agent <name> |
| Hook | A handler (shell command, HTTP endpoint, MCP tool call, LLM prompt or subagent) run at a lifecycle event | settings.json, plugin hooks/hooks.json, or skill/subagent frontmatter |
Automatically on events such as PreToolUse, PostToolUse or SessionStart |
The short version: a skill is a playbook Claude follows, a subagent is a separate worker with its own context, and a hook is automatic code that runs on an event whether or not Claude decides to do anything.
Skills and subagents together
The two features connect in both directions.
A skill can run in a subagent. With context: fork, the skill content becomes the subagent’s task prompt, and the subagent does not see your conversation history. The skill must therefore contain an explicit task, not just guidelines. The docs example:
---
name: deep-research
description: Research a topic thoroughly
context: fork
agent: Explore
---
Research $ARGUMENTS thoroughly:
1. Find relevant files using Glob and Grep
2. Read and analyze the code
3. Summarize findings with specific file references
A subagent can preload skills. The skills field in a subagent’s frontmatter injects the full content of the listed skills at startup, not just their descriptions. The docs say up to the first 32 distinct skill names are preloaded, and skills with disable-model-invocation: true cannot be preloaded.
A minimal subagent from the subagents documentation, saved as .claude/agents/code-reviewer.md:
---
name: code-reviewer
description: Reviews code for quality and best practices
tools: Read, Glob, Grep
model: sonnet
---
You are a code reviewer. When invoked, analyze the code and provide
specific, actionable feedback on quality, security, and best practices.
Only name and description are required for a subagent. You invoke this one with a prompt like “Use the code-reviewer agent to review my recent changes”. This also answers a common search: Claude Code “agents” are subagents defined as Markdown files, and they are a different mechanism from skills.
Practical tips for writing good skills
These follow from how the docs describe the loading model:
- Lead with the use case in the description. It is what Claude reads when deciding. Include the phrases a person would actually type.
- Keep one skill to one job. A skill that reviews, commits and deploys is hard to trigger correctly.
- Mark side-effecting skills
disable-model-invocation: true. You decide when they run. - Move bulk to supporting files. Keep
SKILL.mdshort and link toreference.mdor scripts. - Check field names. Because unknown fields are ignored without an error, a misspelled key looks like a working skill that does nothing.
- Commit project skills. Shared procedures in
.claude/skills/keep a team consistent.
If you want to learn this workflow end to end with guided projects, see the Vibe Coding course. More Claude Code material is in the blog.
FAQ
What are Claude Code skills?
Folders containing a SKILL.md file with instructions that Claude loads when relevant or when you call them with /skill-name. They follow the open Agent Skills standard.
How do I use a skill?
Either type /skill-name with optional arguments, for example /fix-issue 123, or make a request that matches the skill’s description and let Claude load it. Setting disable-model-invocation: true removes the automatic route.
Where do I put skills for all my projects?
In ~/.claude/skills/<name>/SKILL.md. For one repository, use .claude/skills/<name>/SKILL.md and commit it.
Are .claude/commands/ files still supported?
Yes. The docs say custom commands still work and have been merged into skills. To convert one, move it to .claude/skills/<name>/SKILL.md.
What is the difference between a skill and a subagent?
A skill is instructions Claude follows in your current session. A subagent runs in its own context window with its own system prompt and tool access. They can be combined with context: fork or the subagent skills field.
Can I use the same skill outside Claude Code?
Partly. The docs note that on claude.ai uploads and the Skills API only name, description, license, compatibility, metadata and allowed-tools are accepted, and other keys cause a validation error. Keep Claude Code-only fields out of skills you plan to share there.
Conclusion
A skill is a small, readable file: frontmatter that tells Claude when to use it, and Markdown that tells it what to do. Start with one repeated task, write a precise description, put the skill in the right folder, and test it with /name before relying on automatic triggering. Add arguments, supporting files or context: fork only when the task needs them.
Official sources: Claude Code skills, subagents, hooks, Agent Skills standard.
About the author
I’m German Bragin. I work on SEO, marketing and building with AI tools, and I help teams set up Claude Code workflows; see services and consultations.