Claude Code skills are folders with a SKILL.md file of instructions that Claude loads when a request matches the skill’s description, or that you run directly as /skill-name. To add one, create ~/.claude/skills/<name>/SKILL.md for yourself or .claude/skills/<name>/SKILL.md in a repository for your team; Claude Code picks the file up without a restart (Claude Code skills docs).
Applies to: Claude Code 2.1.323 (changelog), Claude Code skills docs and the Agent Skills overview as of November 13, 2026. Last checked: November 13, 2026.
On this page
What are skills in Claude Code?
Anthropic describes skills as “folders of instructions, scripts, and resources that Claude loads dynamically to improve performance on specialized tasks” (anthropics/skills README). The developer docs call them Agent Skills: reusable, filesystem-based resources that load on demand, so you don’t repeat the same guidance in every conversation (Agent Skills overview).
In Claude Code, the skills page suggests making one when you keep pasting the same instructions, checklist or multi-step procedure into chat, or when a section of CLAUDE.md has grown into a procedure rather than a fact. Unlike CLAUDE.md, a skill’s body loads only when it is used, so long reference material costs little until it is needed.
Custom commands have been merged into skills: .claude/commands/deploy.md and .claude/skills/deploy/SKILL.md both create /deploy, and existing command files keep working. Claude Code skills follow the Agent Skills open standard and add Claude Code-only features such as invocation control, subagent execution and dynamic context injection.
How do Claude skills work?
Skills use what Anthropic calls progressive disclosure: Claude reads a skill in stages instead of loading all of it at the start (how Skills work).
| Level | When it loads | Token cost (per the docs) | What it is |
|---|---|---|---|
| 1. Metadata | Always, at startup | About 100 tokens per skill | name and description from the frontmatter |
| 2. Instructions | When the skill is triggered | Under 5k tokens | The body of SKILL.md |
| 3. Resources and code | Only when needed | None until accessed | Extra Markdown files, schemas, templates; scripts run through bash and only their output enters context |
Because only the name and description sit in context until a skill fires, the description is what Claude matches your request against. Write it to say both what the skill does and when to use it.
Bundled skills
Claude Code ships prompt-based bundled skills, including /doctor, /code-review, /batch, /debug, /loop and /claude-api (bundled skills). Three of them work together to check changes against the running app rather than tests alone:
| Skill | What it does |
|---|---|
/run | Launches and drives your app to see a change working |
/verify | Builds and runs your app to confirm a code change does what it should |
/run-skill-generator | Records how to build and launch your project as a project skill that /run and /verify follow |
Source: Run and verify your app. From v2.1.286, when a session starts with a skill named verify or simplify at the enterprise, personal, project or additional-directory level and Claude is allowed to invoke it, Claude’s commit instructions tell it to run that skill before each commit, except for changes to docs or tests. The disableBundledSkills setting turns bundled skills off; /doctor stays typable unless you also set "doctor": "off" in skillOverrides.
How do I create a skill?
The docs’ first example summarizes uncommitted changes (create your first skill). Create the directory:
mkdir -p ~/.claude/skills/summarize-changes
Save this 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.
The YAML frontmatter tells Claude when to use the skill; the Markdown after it is what Claude follows. The directory name, or the frontmatter name when set, becomes the command. The !`git diff HEAD` line runs before Claude sees the skill and is replaced with its output. Start claude in a git project and either ask “What did I change?” or type /summarize-changes.
Claude Code reads frontmatter only when the opening --- is the file’s first line. If the YAML between the markers doesn’t parse, the skill still loads, but with no fields set (frontmatter reference).
Where do skills load from?
| Location | Path | Loads in |
|---|---|---|
| Enterprise | .claude/skills/<skill-name>/SKILL.md in the managed settings directory | All users on machines where the organization deploys it |
| Personal | ~/.claude/skills/<skill-name>/SKILL.md | All your projects on this machine, not Cowork or cloud sessions |
| Project | .claude/skills/<skill-name>/SKILL.md | Sessions in this repository, but not cloud threads in a project; commit it to share |
| Nested | <subdir>/.claude/skills/<skill-name>/SKILL.md | Sessions started in or below <subdir>, or once Claude works on files there |
| Additional directory | .claude/skills/ in a directory passed with --add-dir | That session |
| Plugin | <plugin>/skills/<skill-name>/SKILL.md | Wherever the plugin is enabled, as /plugin-name:skill-name |
| claude.ai account | Skills enabled for your account, downloaded to ~/.claude/skills/synced/ | Cowork, cloud and terminal sessions signed in with that account |
Source: Choose where skills load. When names clash, enterprise beats personal and personal beats project; a skill beats a .claude/commands/ file of the same name; plugin skills never clash because they are namespaced. A skill in an --add-dir directory whose name is already taken runs under a prefix: with --add-dir ../cli, /cli:verify runs that directory’s verify skill (v2.1.309 or later; same-named skills).
Two folder names are reserved: don’t name a skill synced, which Claude Code uses for skills downloaded from claude.ai, or anthropic-skills, which doesn’t load outside a plugin (names reserved for synced skills).
Claude Code watches skill directories and picks up added, edited or removed SKILL.md files without a restart. For a top-level skills directory created mid-session, run /reload-skills.
Skills synced from claude.ai
Since v2.1.273, a terminal session signed in with your claude.ai account downloads the skills enabled for that account into ~/.claude/skills/synced/ in the background, then checks for changes about every 10 minutes while you work and about every 40 minutes while idle (where synced skills load). Run /skills to see them under claude.ai sync. A few points from the same section:
- Sync is one way. Editing a file under
~/.claude/skills/synced/doesn’t change the skill on claude.ai, and the next sync can overwrite it. - It doesn’t run with an API key,
ANTHROPIC_AUTH_TOKEN,CLAUDE_CODE_OAUTH_TOKEN, Amazon Bedrock, bare mode or--safe-mode. - For a short
-prun, setCLAUDE_CODE_SYNC_SKILLSto1so the run waits for the skill list. - To stop it on one machine, set
syncClaudeAiSkillstofalsein your user settings. - On your own machine, a synced skill’s
!`command`lines don’t run and reach Claude as literal text.
Cloud sessions and routines don’t read ~/.claude/skills/ on your machine. To use a personal skill there, enable it for your claude.ai account or, outside project threads, commit it to the repository’s .claude/skills/ (Cowork and cloud sessions).
Where skills work outside Claude Code
The Agent Skills overview lists different rules for each product (where Skills work, runtime constraints):
| Claude Code | Claude API | claude.ai | |
|---|---|---|---|
| How you add a custom skill | A folder with SKILL.md on disk | Upload through the /v1/skills endpoints | Upload a ZIP in settings |
Pre-built document skills (pptx, xlsx, docx, pdf) | Not bundled; sessions signed in with claude.ai sync Anthropic’s pdf and xlsx skills | By skill_id, with the code execution tool | Active when you create documents |
| Network access | Same as any program on your computer | None | Full, partial or none, by settings |
On the API, an uploaded skill is shared with everyone in the workspace; in Claude Code a skill is personal (~/.claude/skills/) or project-based (.claude/skills/), or shared through a plugin (sharing scope). Custom skills you upload to the API don’t appear on claude.ai and the reverse; Claude Code skills on disk are separate from both. The one bridge is the claude.ai sync above, which brings your account’s skills into signed-in Claude Code sessions.
Which frontmatter fields matter most?
All fields are optional; description is the one Anthropic recommends, because Claude uses it to decide when to load the skill (frontmatter reference). Claude Code ignores unknown field names without reporting an error, and boolean fields accept yes, no, on, off, 1 and 0 as well as true and false.
| 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; combined with when_to_use, truncated at 1,536 characters in the listing |
when_to_use | Trigger phrases or example requests, appended to description |
disable-model-invocation | true means only you can run it with /name |
user-invocable | false hides it from the / menu so only Claude invokes it |
allowed-tools | Tools Claude can use without asking during the turn that invokes the skill; the grant clears when you send your next message |
disallowed-tools | Tools removed while the skill is active, such as AskUserQuestion for a background loop |
context / agent | context: fork runs the skill in a subagent of the type named in agent |
background | With context: fork, false waits for the subagent’s result instead of running it in the background |
paths | Glob patterns; Claude loads the skill automatically only for matching files |
model / effort | Model or effort level for the rest of the current turn |
shell | bash (default) or powershell for !`command` lines |
hooks | Hooks registered when the skill is invoked, for the rest of the session |
arguments / argument-hint | Named positional arguments and the autocomplete hint |
Anthropic’s tip is to keep SKILL.md under 500 lines and move detailed reference material into supporting files in the same folder, linked from SKILL.md so Claude knows when to read them (supporting files).
Writing a skill that also works on claude.ai or the API
Only name, description, license, compatibility, metadata and allowed-tools are part of the Agent Skills spec. A claude.ai upload, the Skills API or package_skill.py from anthropics/skills fails on any other field with an error like this one from the docs (frontmatter outside Claude Code):
Unexpected key(s) in SKILL.md frontmatter: argument-hint. Allowed properties are: allowed-tools, compatibility, description, license, metadata, name
Those surfaces also require name and description and check them more strictly than Claude Code does (skill structure):
| Field | Rule on claude.ai and the API |
|---|---|
name | Required; up to 64 characters; lowercase letters, numbers and hyphens only; no XML tags; cannot contain anthropic or claude |
description | Required; non-empty; up to 1,024 characters; no XML tags |
A skill that follows both tables loads in Claude Code unchanged. Claude Code-only body features such as !`command` injection don’t run in claude.ai chat or through the API.
Who invokes a skill: you or Claude?
| Frontmatter | You can invoke | Claude can invoke | In context |
|---|---|---|---|
| (default) | Yes | Yes | Description always; full skill when invoked |
disable-model-invocation: true | Yes | Not on its own | Description not in context; full skill when you invoke |
user-invocable: false | No | Yes | Description always; full skill when invoked |
The docs recommend disable-model-invocation: true for workflows with side effects, such as /commit or /deploy: “You don’t want Claude deciding to deploy because your code looks ready.” If Claude tries anyway, Claude Code blocks the call (control who invokes a skill).
---
name: deploy
description: Deploy the application to production
disable-model-invocation: true
---
Deploy $ARGUMENTS to production:
1. Run the test suite
2. Build the application
3. Push to the deployment target
4. Verify the deployment succeeded
A skill name at the start of your message runs it. After plain text, as in go ahead and /deploy to staging, the name only gives Claude permission to run it for that message.
Once invoked, the rendered skill stays in the conversation across turns and is not re-read. After compaction Claude Code re-attaches the first 5,000 tokens of each recent skill within a shared 25,000-token budget, so put the most important instructions at the top (skill content lifecycle).
How do arguments work?
Text after the command fills placeholders: $ARGUMENTS is everything, $ARGUMENTS[0] or $0 the first argument, and names declared in arguments work as $name. Other substitutions include ${CLAUDE_SKILL_DIR}, ${CLAUDE_PROJECT_DIR}, ${CLAUDE_SESSION_ID} and ${CLAUDE_EFFORT} (string substitutions). With this skill, /migrate-component SearchBar JavaScript TypeScript fills all three positions:
---
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.
If no placeholder receives your input, Claude Code appends ARGUMENTS: <value> to the skill content. Wrap a multi-word value in quotes to pass it as one argument.
Skills vs commands, subagents, MCP and hooks
Anthropic’s extension overview separates the features that look alike:
| Compare | Skill | The other feature |
|---|---|---|
| Slash command | A skill and a .claude/commands/ file both create /name; commands are now part of skills | Same feature; the skill wins a name clash |
| Subagent | Reusable content that loads into your main context | An isolated worker with its own context window; only a summary comes back |
| MCP | Knowledge and workflows, such as how your team uses a service | A protocol that gives Claude tools and data access for an external service |
| Hook | Instructions Claude interprets; the outcome can vary | A command, HTTP request, MCP tool call, prompt or subagent that always fires on its event |
| CLAUDE.md | Loads on demand | Loads every session; for “always do X” rules |
The docs’ advice for each pair:
- Subagent: use one when a task reads many files or your context is filling up. The two combine: a subagent can preload skills with its
skills:field, and a skill can run in a subagent withcontext: fork. - MCP: the server handles the connection and authentication; a skill can carry your schema, query patterns or a
/post-to-slackworkflow for using it. See our Claude Code MCP guide. - Hook: “Put guardrails in hooks.” A rule such as “never edit
.env” in a skill is a request; aPreToolUsehook that blocks the edit is enforcement. See our Claude Code hooks guide.
Plugins are the packaging layer above all of these: one installable unit that can bundle skills, hooks, subagents and MCP servers. Our Claude Code plugins guide covers scopes and marketplaces.
How do I install skills other people publish?
Anthropic’s anthropics/skills repository works as a plugin marketplace. Its README gives these commands to run inside Claude Code:
/plugin marketplace add anthropics/skills
/plugin install document-skills@anthropic-agent-skills
/plugin install example-skills@anthropic-agent-skills
After that, the README says you can name the skill in a request, for example “Use the PDF skill to extract the form fields from path/to/some-file.pdf”. The same README says the skills are provided for demonstration and educational purposes. Our Claude PDF skill guide covers that one. Plugin skills run as /plugin-name:skill-name and are removed with /plugin uninstall <plugin-name>@<marketplace-name>. The skills directory lists Anthropic’s skills and community collections with their install commands and licenses, and the skills marketplace guide covers where else to look.
To share your own, commit .claude/skills/ to the repository, put a skills/ directory in a plugin, or deploy through managed settings (share skills).
Security: review skills before you run them
Warning
Anthropic’s Agent Skills overview says to use skills only from trusted sources, ones you created or got from Anthropic: “a malicious Skill can direct Claude to call tools or run code in ways that don’t match the Skill’s stated purpose.” It advises auditing every bundled file,
SKILL.md, scripts and images included, and treating a skill like installing software (security considerations).
Claude Code adds one more caution: workspace trust doesn’t gate allowed-tools. “Claude Code applies a project skill’s allowed-tools even in a -p run in a folder you’ve never trusted,” so review the allowed-tools of skills checked into a repository before you run Claude Code there (pre-approve tools).
Safer controls the skills page documents:
- Deny the Skill tool in
/permissionsto disable all skills, or allow and deny specific ones with rules such asSkill(commit)andSkill(deploy *)(restrict skill access). Our permissions guide explains rule syntax. - Turn off shell injection with
"disableSkillShellExecution": truein settings; each!`command`is then replaced with[shell command execution disabled by policy](inject dynamic context). - Hide a skill without editing it through
skillOverrides("on","name-only","user-invocable-only"or"off"), which the/skillsmenu writes to.claude/settings.local.json(override visibility). - Organizations can set
allowManagedPermissionRulesOnlysoallowed-toolsin project and personal skills is ignored (v2.1.282 or later).
Troubleshooting
From Anthropic’s troubleshooting section:
- Skill not triggering: put words users actually say in the description, check it appears when you ask
What skills are available?, or call it with/skill-name. If the skill setspaths, the files must be inside Claude’s current working directory. Runclaude plugin validate .claude/skills(v2.1.233 or later) or start with--debugto see a YAML parse error. - Missing from the
/menu: Claude Code refuses names with characters such as<,>, zero-width spaces or doubled spaces; searchclaude --debugoutput for[names](characters a name can’t hold). - Triggers too often: make the description more specific or add
disable-model-invocation: true. - Claude stops following it: move a rule that must always hold into a hook, which can live in the skill’s
hooksfrontmatter; after compaction, invoke the skill again. - Descriptions cut short: the listing budget is 1% of the context window. Raise it with
skillListingBudgetFraction, set rarely used skills to"name-only", or run/skill-doctor(v2.1.252 or later) to find unused ones. - Personal skills disappeared: look in
~/.claude/skills/.trash/and move the folder back before the retention sweep deletes it, by default 30 days later (personal skills disappeared).





