Skip to main content
Skills are markdown files that define reusable prompts and workflows. When you type /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

1

Create the skill directory

Skills live in a skills subdirectory inside any .claude/ directory:
You can put skills in:
  • .claude/skills/ (project-level, relative to your working directory)
  • ~/.claude/skills/ (user-level, available in all projects)
2

Write SKILL.md

Create .claude/skills/my-skill/SKILL.md with your skill’s instructions:
3

Invoke the skill

Claude loads the skill and executes the instructions, with 1.2.3 substituted for $ARGUMENTS.

Skill frontmatter

The frontmatter at the top of SKILL.md configures how the skill behaves. All fields are optional.

Argument substitution

Use $ARGUMENTS anywhere in SKILL.md to insert the text passed after the slash command:
For named arguments, use $ARG_NAME syntax by listing arguments in frontmatter:
Then reference them as $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:
The ! 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.
Inline shell commands execute with the same permissions as your shell. They run when you invoke the skill, not when the skill is loaded at startup.

Listing skills

Run /skills to see all available skills:
This shows skills from all scopes (project, user, managed) along with their descriptions.

Namespaced skills

Skills in subdirectories are namespaced with colons:

Conditional skills (path-based activation)

Add a paths frontmatter field to activate a skill only when you work with matching files:
The skill is loaded into Claude’s context automatically when you read, write, or edit a file matching the glob pattern. This keeps skills out of context until they’re relevant.

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
Bundled skills follow the same interface as user-defined skills and can include reference files that are extracted to disk on first invocation.

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

Use skills when you want a named, repeatable action. Use hooks when you want something to happen automatically every time a specific event occurs.

Example: custom component generator

Invoke with: