# Claude Code Slash Commands: Built-in vs Custom

> Canonical: https://skillalmanac.com/learn/claude-code-slash-commands-guide | Updated: 2026-11-25 | Index status: index-eligible

How Claude Code distinguishes fixed built-ins, bundled skills, legacy custom commands and current skills, plus a safe command-to-skill migration check.

## Facts

- Claude Code's current skills documentation says custom commands have been merged into skills; existing `.claude/commands/` files continue to work, while skills are preferred for new work (https://code.claude.com/docs/en/skills)
- The documented migration example moves `.claude/commands/deploy.md` to `.claude/skills/deploy/SKILL.md` and retains `/deploy` (https://code.claude.com/docs/en/skills)
- A skill directory can contain scripts and other supporting files, while the legacy command format is a single Markdown file (https://code.claude.com/docs/en/skills)
- `disable-model-invocation: true` makes a skill or legacy command manual-only; without it, Claude may invoke the item when relevant (https://code.claude.com/docs/en/skills)
- Claude Code documents bundled skills such as `/doctor`, `/code-review`, `/batch`, `/debug`, `/loop`, and `/claude-api` as prompt-based, while most built-in commands execute fixed logic (https://code.claude.com/docs/en/skills)
- Claude Code frontmatter fields are optional; `description` is recommended for matching but is not universally required (https://code.claude.com/docs/en/skills)

Claude Code exposes fixed built-in commands, bundled prompt-based skills, and user-authored skills. Legacy Markdown files under `.claude/commands/` still work, but current documentation says custom commands have been merged into skills and recommends a skill directory for new work, especially when supporting files are needed.

## Built-in commands

Most built-in commands execute fixed Claude Code logic; `/help` and `/compact` are examples named in the current skills documentation. Bundled skills are different: the documentation lists examples such as `/doctor`, `/code-review`, `/batch`, `/debug`, `/loop`, and `/claude-api`, and describes them as prompt-based workflows that Claude orchestrates with tools. Consult the current commands reference for the exact commands and settings available in your installed version.

## Where custom commands live

The current documentation describes `.claude/commands/` as the older Markdown command format. Its migration example maps `.claude/commands/deploy.md` to `.claude/skills/deploy/SKILL.md`, preserving `/deploy`.

For an existing legacy command:

1. Put its instructions in a Markdown file under the appropriate `.claude/commands/` location used by your setup.
2. Add a `description` when you want Claude to match it automatically. Add `disable-model-invocation: true` when it must be manual-only.
3. Open the slash menu and confirm the expected command is present before relying on it. Then invoke it on a harmless example and check that it follows the file's instructions.

The supplied source excerpt does not establish the nested-folder colon mapping or every personal/project command location previously stated here. Obtain the relevant official documentation region before restoring those details.

## Built-in versus custom: a comparison

| Feature | Built-in command | Custom command |
|---|---|---|
| Defined by | Claude Code itself | A Markdown file you write |
| Editable | No | Yes |
| Command name comes from | Fixed name | Legacy file placement; verify the displayed name in the slash menu |
| Storage | Built into Claude Code | Legacy `.claude/commands/` locations used by the current setup |

Choose a custom command when one prompt you repeat needs the same instructions each time and fits in a single file. Choose a skill directory when the instructions also need a script, a reference document or an example that should load only when relevant. Both are invoked with a slash, so the name you type does not show which format you picked.

## Converting a command into a skill

Moving `.claude/commands/deploy.md` to `.claude/skills/deploy/SKILL.md` keeps the `/deploy` name. The skill directory can then hold supporting files next to `SKILL.md`. Command files still work, so you can move them one at a time. During a partial migration, keep track of both copies and use `/skills`, `/context`, or the slash menu to confirm which source is active. The supplied documentation excerpt does not establish the precedence rule previously stated here.

## Pitfalls

1. **The expected command is absent.** Open the slash menu and check whether the file is saved in a supported skill or command directory. Separately, if automatic matching fails, check YAML frontmatter: the documented malformed-YAML behavior leaves the skill body loadable and direct `/skill-name` invocation available, but loses metadata used for description-based matching.
2. **A migration leaves two copies.** Check both `.claude/commands/` and `.claude/skills/`, then use `/skills`, `/context`, or the slash menu to identify the active source before deleting either copy.
3. **The command appears but behaves differently than expected.** Test it on a harmless input. Menu presence proves discovery, not that the instructions are correct or that required tools are available.
4. **Side-effect commands run on their own.** Without `disable-model-invocation: true`, Claude may invoke a command when it judges the command relevant. Add the flag to anything that deploys, sends or deletes.
5. **Misspelled frontmatter keys are silently ignored.** A typo in `disable-model-invocation` leaves the setting off with no warning. Re-read the frontmatter after each edit.

## When to use a skill instead

A command file suits a short prompt you type by hand, such as a review checklist. Once the same instructions need reference material, or the prompt grows past a screen, a skill directory is easier to maintain. Two related skills on this site address the surrounding work. [rules-to-skills-migration](/skills/skill-almanac/rules-to-skills-migration) moves long runbooks and rule files out of always-loaded context and into on-demand skills, which is useful when a command grew out of a runbook. [agent-instruction-files](/skills/skill-almanac/agent-instruction-files) audits the memory files Claude loads at the start of every session, so a command's instructions are not duplicated there. Neither skill replaces the command layout itself, and a small project with two commands may not need either.

## FAQ

### Are Claude Code skills and slash commands the same thing?

Custom commands have been merged into the skills system, but the file formats still differ. A legacy command is a Markdown file under `.claude/commands/`; a skill is a directory containing `SKILL.md` and may include supporting files. A skill or legacy command can be model-invoked unless its frontmatter disables that behavior.

### Do my existing `.claude/commands/` files still work?

Yes. Existing command files keep working and Claude can still invoke them. Migrating is optional, and the documentation recommends skills for new work.

### How do I keep Claude from running a custom command on its own?

Add `disable-model-invocation: true` to the command's frontmatter. The command then runs only when you type its name.

## Related skills

- [rules-to-skills-migration](https://skillalmanac.com/skills/skill-almanac/rules-to-skills-migration.md): Platform Score 45/100 (provisional)
- [agent-instruction-files](https://skillalmanac.com/skills/skill-almanac/agent-instruction-files.md): Platform Score 46/100 (provisional)

## Related guides

- [Caveman skill for Claude Code: what it does, how to install it and what it saves](https://skillalmanac.com/learn/caveman-skill-explained.md)
- [The grill-me skill: what it does, how to install it and how the interview works](https://skillalmanac.com/learn/grill-me-skill-explained.md)
- [Cursor vs Claude Code: Editor or Terminal Workflow](https://skillalmanac.com/learn/cursor-vs-claude-code.md)
- [What Is Claude Code and What It Can Touch on Your Machine](https://skillalmanac.com/learn/what-is-claude-code.md)
- [Agentic Coding Tools: What They Are and How to Choose One](https://skillalmanac.com/learn/choosing-an-agentic-coding-tool.md)
- [Codex vs Claude Code: Config Files and Sandbox](https://skillalmanac.com/learn/codex-vs-claude-code.md)

## Sources

- https://code.claude.com/docs/en/skills

Platform Scores report our assessment under a published method. They are not a safety guarantee.
