skills/ directory under your Claude config and are loaded from user, project, and managed settings.
How skills work
When you invoke/my-skill in Claude Code, the skill’s Markdown content is sent as a prompt to the model. Frontmatter metadata controls which tools Claude may use, which model runs the skill, and other behaviors.
Skills are a superset of the older /commands/ system. The skills/ directory format is the current standard.
Directory structure
Skills use the directory format: each skill is a folder containing aSKILL.md file.
Single
.md files are not supported in the skills/ directory — you must use the skill-name/SKILL.md folder format.Load order and precedence
Skills are loaded from all three levels and merged. When the same file path is resolved (including through symlinks), duplicates are dropped with a warning. Load order from lowest to highest precedence:- Managed skills (
policySettings) - User skills (
~/.claude/skills/) - Project skills (
.claude/skills/) - Additional directories (passed via
--add-dir)
SKILL.md format
A skill file is a Markdown document with an optional YAML frontmatter block..claude/skills/deploy/SKILL.md
Frontmatter fields
One-sentence description shown in the
/ command picker. If omitted, Claude Code extracts a description from the first paragraph of the Markdown content.Display name shown to the user. Defaults to the skill folder name.
Restricts which tools the skill may use. Accepts tool names and permission patterns.
Hint shown in the command picker for required arguments (e.g.
"<branch-name>").Named argument placeholders that are substituted into the skill prompt.In the prompt body, use
$branch and $environment as placeholders.Guidance for Claude about when to invoke this skill automatically (e.g. as part of another task).
Model to use when running this skill. Set to
"inherit" to use the active session model. Defaults to the session model if omitted.Effort level for this skill:
"low", "medium", "high", or "max". Overrides the session effort for the skill’s invocation.When
false, the skill is hidden from the / picker and can only be invoked programmatically (e.g. by another skill or agent). Defaults to true.When
true, the skill’s prompt is executed as a shell template rather than passed to the model. Defaults to false.Set to
"fork" to run the skill in a forked context (isolated from the parent session’s conversation history).Name of a built-in or custom agent whose system prompt, tool restrictions, and model this skill should adopt.
Gitignore-style glob patterns. When set, the skill is a conditional skill — it is dormant until a file matching one of these patterns is touched in the session. Paths are matched relative to the working directory.
Shell to use for inline
! shell commands in the prompt body. Accepts "bash" or "powershell".Semver string for the skill. Used for display and compatibility checks.
Lifecycle hooks scoped to this skill’s invocation. Uses the same schema as
settings.json hooks. See Hooks for full reference.Built-in placeholders
Inside the skill prompt body you can use:| Placeholder | Description |
|---|---|
$ARGUMENTS | Full argument string passed when invoking the skill. |
$<argname> | Named argument (when arguments frontmatter is set). |
${CLAUDE_SKILL_DIR} | Absolute path to the skill’s own directory. Useful for referencing bundled scripts or files. |
${CLAUDE_SESSION_ID} | Unique identifier for the current session. |
Inline shell commands
Skill prompts support inline shell command expansion using!`...` or fenced code blocks with a ! language tag. The output is substituted into the prompt before it is sent to the model.
Creating your first skill
Bundled skills
Some skills ship compiled into the Claude Code binary itself. These are registered viaregisterBundledSkill() and are available to all users without any files on disk. Bundled skills:
- Cannot be overridden by user or project skills.
- May include reference files that are extracted to a temporary directory on first invocation (accessible via
${CLAUDE_SKILL_DIR}). - Follow the same
SKILL.mdfrontmatter contract (description, allowedTools, model, hooks, etc.).
Skills in managed environments
Enterprise administrators can provide skills via the managed skills directory or lock skill loading to plugin sources only:managed-settings.json
skills is in strictPluginOnlyCustomization, user and project skills directories are ignored. Only plugin-provided and managed skills are loaded.
The CLAUDE_CODE_DISABLE_POLICY_SKILLS environment variable disables managed skills entirely (useful during testing).