Skills are Markdown files that define reusable prompt workflows. When you invoke a skill withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/VineeTagarwal-code/claude-code/llms.txt
Use this file to discover all available pages before exploring further.
/skill-name, Claude Code loads the skill’s content and sends it as a prompt — the same way built-in commands like /compact work. Skills let you encode repeated workflows, project-specific instructions, or multi-step procedures into a single command.
How skills work
A skill is a directory containing aSKILL.md file with optional YAML frontmatter followed by the prompt body:
/my-skill, Claude Code:
- Finds the matching skill file
- Substitutes any arguments into the prompt body
- Sends the expanded prompt to the model as a user message
allowed-tools.
Skill sources
Skills are loaded from multiple locations in priority order:| Source | Location | Priority |
|---|---|---|
| Managed (policy) | <managed-path>/.claude/skills/ | Highest |
| User | ~/.claude/skills/ | High |
| Project | .claude/skills/ | Normal |
| Additional directories | Any --add-dir path’s .claude/skills/ | Normal |
| Bundled | Compiled into the CLI binary | Low |
| MCP | Exposed by connected MCP servers | Varies |
Directory structure
The/skills/ directory uses a directory-per-skill layout:
/my-workflow, /api-review). Reference files in the same directory are accessible to the model via their absolute paths.
The legacy
.claude/commands/ directory is also supported. Skills there can use either a single .md file or the SKILL.md directory format, and take the filename (without extension) as the command name.Frontmatter fields
All frontmatter fields are optional. The skill still works with just a bare Markdown file.| Field | Type | Description |
|---|---|---|
description | string | Shown in /skills list and typeahead. If omitted, extracted from the first heading or paragraph. |
argument-hint | string | Placeholder shown in typeahead, e.g. <file> or [branch name]. |
arguments | string or array | Named argument placeholders that are substituted into the prompt body (e.g. $FILE, $BRANCH). |
when_to_use | string | Guidance for Claude about when to invoke the skill proactively. |
allowed-tools | string | Comma-separated list of tools the skill is permitted to call, e.g. Bash, Read, Edit. |
model | string | Override the model for this skill invocation. Use inherit to use the session model. |
effort | string or integer | Effort level for this skill: low, medium, high, max, or an integer. |
context | inline or fork | inline (default) expands the skill into the current conversation; fork runs it as a sub-agent with a separate context. |
agent | string | When context: fork, the agent type to use (e.g. general-purpose). |
paths | string | Glob patterns — skill is only activated when Claude touches matching files. |
user-invocable | boolean | Set false to hide the skill from typeahead (only Claude can use it). |
hooks | object | Session-scoped hooks registered when the skill is invoked. |
Named arguments
Usearguments frontmatter to define named placeholders:
[args] in the typeahead.
Conditional activation (paths)
Skills with apaths field are dormant until Claude touches a matching file:
db/migrations/**, the skill becomes available in the session.
Example skill file
Bundled skills
Claude Code ships with a set of built-in skills compiled into the binary. These are available in every session without any configuration.| Skill | Description |
|---|---|
simplify | Reviews changed code for reuse, quality, and efficiency, then fixes issues |
verify | Verifies that a code change works correctly by running the app |
remember | Reviews auto-memory entries and proposes promotions to CLAUDE.md or CLAUDE.local.md |
loop | Runs a workflow in a loop until a condition is met |
batch | Applies a skill to multiple inputs in parallel |
/skills alongside your custom skills.
Shell execution in prompts
Skill prompt bodies can embed shell commands that run when the skill is invoked. Use backtick blocks prefixed with!:
Creating a skill
Skills can also come from plugins. See Plugins for how to install and publish skill packages.