/skill-name in Claude Code, Claude loads that skill’s instructions and executes the described task. Skills are useful for any workflow you repeat across sessions — running a deployment, writing a changelog, reviewing a PR, or applying your team’s specific coding conventions.
How skills work
A skill is a directory inside.claude/skills/ with a SKILL.md file. When you invoke /skill-name, Claude Code loads the skill’s SKILL.md as the prompt for that action. The skill can include instructions, context, constraints, and even inline shell commands that run at invocation time.
Skills load lazily — they are only read when invoked, so having many skills defined doesn’t affect startup time or context size.
Creating a skill
Create the skill directory
Skills live in a You can put skills in:
skills subdirectory inside any .claude/ directory:.claude/skills/(project-level, relative to your working directory)~/.claude/skills/(user-level, available in all projects)
Skill frontmatter
The frontmatter at the top ofSKILL.md configures how the skill behaves. All fields are optional.
| Field | Description |
|---|---|
description | Short description shown in /skills and used by Claude to decide when to invoke the skill |
argument-hint | Hint shown in slash command autocomplete describing what argument to pass |
allowed-tools | Comma-separated list of tools this skill is permitted to use (defaults to all) |
when_to_use | Prose description of when Claude should use this skill proactively |
model | Model to use for this skill (e.g., claude-sonnet-4-6); defaults to the session model |
user-invocable | Set to false to hide the skill from the slash command list (still available to Claude) |
context | fork to run the skill in an isolated subagent context |
paths | Glob patterns; skill only activates when matching files are touched |
version | Skill version string |
hooks | Hooks scoped to this skill’s execution (same format as settings hooks) |
Argument substitution
Use$ARGUMENTS anywhere in SKILL.md to insert the text passed after the slash command:
$ARG_NAME syntax by listing arguments in frontmatter:
$name and $directory in the body.
Inline shell commands
Skills can embed shell commands that execute at invocation time using backtick injection syntax. The output is inserted into the prompt before Claude sees it:! prefix followed by a backtick-quoted command runs the command and replaces the block with its output. This is useful for injecting live project state into the skill prompt.
Listing skills
Run/skills to see all available skills:
Namespaced skills
Skills in subdirectories are namespaced with colons:Conditional skills (path-based activation)
Add apaths frontmatter field to activate a skill only when you work with matching files:
Bundled skills
Claude Code ships with built-in skills that are always available. These are compiled into the binary and register themselves at startup. You can see them in/skills — they appear with source bundled.
Bundled skills include capabilities like:
- Project onboarding assistance
- Common code review workflows
- Agentic search and analysis patterns
User-level skills
Skills in~/.claude/skills/ are available in every project without needing to add them to each repository. This is a good place for personal workflows that span projects.
Skills vs. hooks
| Feature | Skills | Hooks |
|---|---|---|
| Invocation | Explicit: /skill-name or by Claude when it recognizes the need | Automatic: fires on tool events |
| When to use | Repeatable workflows you want to trigger intentionally | Side effects, formatting, linting, blocking |
| Configuration | SKILL.md in .claude/skills/ | hooks field in settings JSON |
| Context | Can include files, shell output, and detailed instructions | Receives event JSON, returns exit code and output |