Skip to main content
Skills are Markdown files containing instructions that Claude Code loads as reusable workflows. You invoke them with a /skill-name slash command, or Claude can invoke them automatically via the SkillTool. Skills ship with Claude Code, can be defined per-project, and can be created globally for personal use.

How skills are loaded

At startup, Claude Code scans the following directories for skills and merges them into the active command set: Skills from deeper directories take precedence over those from parent directories. Symlinks are resolved before deduplication, so the same file accessed via different paths is only loaded once.
Skills are also discovered dynamically during a session as Claude reads or edits files. If a .claude/skills/ directory exists in a subdirectory, its skills become available once Claude touches a file in that subtree.

Skill file format

Each skill lives in its own directory containing a SKILL.md file:

SKILL.md frontmatter

Skills use YAML frontmatter to define metadata:

Frontmatter fields

Template variables

Inside the skill body, you can use:
  • $ARGUMENTS — the raw argument string passed by the user
  • ${arg-name} — named argument from the arguments frontmatter field
  • ${CLAUDE_SKILL_DIR} — absolute path to the skill’s own directory (useful for referencing bundled scripts)
  • ${CLAUDE_SESSION_ID} — current session ID

Inline shell commands

Prefix a line with ! to run a shell command when the skill is loaded (not during invocation):
Inline shell commands (!) are not executed in skills loaded from MCP servers, as remote skill content is untrusted.

Built-in bundled skills

Several skills ship with Claude Code and are always available: Run /skills to see the full list of available skills in your current session.

The /skills slash command

Run /skills to open the interactive skills browser. From there you can:
  • List all loaded skills with their descriptions
  • Filter skills by source (user, project, bundled, MCP)
  • Invoke a skill directly
You can also invoke any skill directly as a slash command:

How Claude invokes skills via SkillTool

The SkillTool allows Claude to invoke skills programmatically, without the user explicitly typing a slash command. When Claude is deciding which tools to use, it can call SkillTool with a skill name and arguments. This is how skills declared with when_to_use are automatically selected — Claude reads the hint and decides whether the skill applies to the current task. In coordinator mode, workers can also invoke skills, so you can delegate skill invocations (e.g. /commit, /verify) to worker agents rather than running them in the coordinator context.

Conditional skills (path-filtered)

A skill with a paths frontmatter key only becomes active when Claude operates on files matching those patterns:
The paths field uses gitignore-style matching relative to the project root. Conditional skills are stored in memory at load time and activated the first time Claude reads or writes a matching file.

Creating a custom skill

1

Create the skill directory

Inside your project, create a directory under .claude/skills/:
2

Write the SKILL.md file

Create .claude/skills/deploy-staging/SKILL.md:
3

Verify the skill loads

Start (or restart) a Claude Code session in the project directory and run:
Your deploy-staging skill should appear in the list.
4

Invoke the skill

Claude will execute the skill with production as $ARGUMENTS.

Plugins

Package and distribute skills as plugins.

Configuration

Configure skill loading behavior and enterprise policies.

Agent tools

Learn how SkillTool and AgentTool work together.

Hooks

Run shell commands before and after skill invocations.