Skills and Commands
A skill is a folder with a SKILL.md file. It teaches Claude how to do one task.
A slash command is a short action that you type, such as /compact or /model.
A skill also gives you a slash command. For example, .claude/skills/deploy/SKILL.md gives you /deploy.
The older .claude/commands/ folder still works and acts like a skill.
Example
This skill makes a /summarize-diff command. Only you can start it.
---
description: Summarize the uncommitted changes in plain words.
argument-hint: "[focus]"
disable-model-invocation: true
allowed-tools: Bash(git diff *)
---
Run `git diff` and summarize the changes.
Focus on: $ARGUMENTS
Type /summarize-diff tests in the prompt. $ARGUMENTS becomes tests.
Skill Locations
When two skills share a name, the one in the higher place wins.
| Place | Status | What it holds | Notes |
|---|---|---|---|
Enterprise <managed dir>/. | Documented: An official docs page names this item. | Skills for all users on a machine. | Wins over personal and project skills of the same name. |
Personal ~/. | Documented: An official docs page names this item. | Skills for all your projects. | Wins over project skills. |
Project . | Documented: An official docs page names this item. | Skills for one repository. | Loaded from the start folder and each parent up to the repository root. A linked worktree with no . uses the main checkout (2.1.277 or later). |
Nested . below the start folder | Documented: An official docs page names this item. | Skills for a sub-project. | Loads when Claude first reads or edits a file there, or after /. On a clash the nested skill is /. |
-- or / folder | Documented: An official docs page names this item. | Skills, commands/, and agents/ of another folder. | permissions. grants file access only and loads none of these. Needs the project setting source. Since 2., when another skill already has its name, the skill is offered as <folder>: (v2.1.309 release notes). |
Plugin skills/ | Documented: An official docs page names this item. | Skills of a plugin. | The command name is /. A plugin root SKILL. with no skills/ folder loads as one skill. |
Synced skills ~/. | Documented: An official docs page names this item. | Skills turned on in your claude.ai account. | Downloaded in the background (2.1.273 or later). Checked about every 10 minutes while active and every 40 minutes while idle. Never uploaded. The name anthropic- is reserved. Needs a claude.ai sign-in. Not in bare mode or --. |
Trash ~/. | Documented: An official docs page names this item. | Removed synced skills. | A sweep removes entries after 30 days by default. |
<name>@skills- plugin | Documented: An official docs page names this item. | A plugin made by claude plugin init in ~/.. | Loads with no install step. The marketplace name skills- is reserved. |
| MCP-served skill | Undocumented: Only the program shows this item. It can change without notice. | A skill that an MCP server serves. | Claude Code reads supporting files through MCP resources. The origin tag is mcp. |
Skill loaded values | Undocumented: Only the program shows this item. It can change without notice. | Internal origin tags. | Found: skills, commands_, plugin, bundled, synced, mcp, memory. |
Name Resolution
| Rule | Status | What it does | Notes |
|---|---|---|---|
| Clash order | Documented: An official docs page names this item. | Picks the skill that / runs. | Enterprise, then personal, then project. A skill replaces a bundled skill or a built-in command of the same name, but not its aliases. A skill wins over a . file. |
| Name from layout | Documented: An official docs page names this item. | Sets the command name. | . is /. Frontmatter name sets the name of a skill folder. A plugin name sets the last part. |
| Refused characters | Documented: An official docs page names this item. | Protects the / menu. | Refused: zero-width, control, private-use, bidirectional, odd blank characters, <, and >. The debug log tag is [names]. |
| Name length | Undocumented: Only the program shows this item. It can change without notice. | Caps a frontmatter name. | Claude Code ignores a name over 256 characters. It gives a warning. |
Custom Commands
| Item | Status | What it does | Notes |
|---|---|---|---|
. and ~/. | Documented: An official docs page names this item. | The old form of a skill. | Accepts the same frontmatter except name and paths. Subfolders become : parts. |
Plugin commands map | Documented: An official docs page names this item. | Commands from a plugin manifest. | Keys: source or content, description, argument, model, allowed. |
Loading and Controls
| Item | Status | What it does | Notes |
|---|---|---|---|
| Live change detection | Documented: An official docs page names this item. | Reloads SKILL. text when it changes. | Not in bare mode. A new top-level skills folder needs /. Changes to hooks/, ., agents/, and output- need /. |
| Skill listing budget | Documented: An official docs page names this item. | Caps how much skill text goes into context. | 1 percent of the window (skill), counted at 4 characters per token for Claude 3 to 4.6 models and 3 for newer ones (the program). So Opus 5.5 with a 200,000-token window gets 6,000 characters. Each entry is cut at 1,536 characters (skill). When the listing is over the budget, the program drops descriptions. It leaves only the names. The env var SLASH_ sets a fixed count. |
-- | Documented: An official docs page names this item. | Turns off all skills and commands. | A CLI flag. Its help text is "Disable all skills and commands" since 2.. |
Setting skill | Documented: An official docs page names this item. | Sets the visibility of each skill. | Values: on, name-, user-, off. Plugin skills are not affected. |
Setting disable | Documented: An official docs page names this item. | Removes bundled skills. | Same as CLAUDE_. Built-in commands stay. See Bundled Skills. |
Setting disable | Documented: An official docs page names this item. | Disables !`cmd` injection. | See Substitutions. |
CLAUDE_, CLAUDE_, CLAUDE_, CLAUDE_, CLAUDE_ | Documented: An official docs page names this item. | Skill-related environment variables. | CLAUDE_ removes the claude- skill (checked). CLAUDE_ skips skills from the managed folder (checked: the managed skill was listed, and the variable removed it). CLAUDE_ enables skill proposals in cloud sessions. It has no visible effect locally. Claude Code removes CLAUDE_ from the env of subprocesses. CLAUDE_ disables the claude- skill, which a plain - run does not list. See Environment Variables. |
How It Works
Only the skill description sits in context until the skill runs. After that the full text stays in the conversation. See Substitutions for what compaction keeps.
Pages in This Section
| Page | Content |
|---|---|
| Skill Frontmatter | Every SKILL. key. |
| Substitutions | $ARGUMENTS, variables, shell injection, and who can invoke a skill. |
| Bundled Skills | Skills that ship inside Claude Code. |
| Slash Commands | Every built-in slash command. |
Related Pages
- Hooks: skills can carry hooks in frontmatter.
- Subagent Runtime:
context: forkruns a skill in a subagent. - Subagent Frontmatter: the
skillskey preloads skills into an agent. - Environment Variables: the full variable list.
Source: Extend Claude with Skills, Settings Reference, and the program (the skill loader and the loadedFrom tags).