Claude Code slash commands: built-in and custom
By Maximo Correa · 2026-11-18
A Claude Code slash command is a message that starts with / and runs a built-in control, a bundled skill, a skill or command file you wrote, or a plugin or MCP prompt. Custom commands are now skills: save a SKILL.md in .claude/skills/ or ~/.claude/skills/ and the folder name becomes the command.
What a Claude Code slash command is
A slash command is a message that starts with /. The commands reference states the rule: "A command is only recognized at the start of your message. Text that follows the command name becomes its arguments." Type / alone to see the commands available to you, or type / and a few letters to filter the list.
Four kinds of thing show up in that menu:
- Built-in commands, which control the session itself: switch models, clear context, manage permissions.
- Bundled skills, such as
/code-reviewand/debug, which are prompts Claude Code ships with. - Your own commands, which are Markdown files you write. Today these are skills.
- Commands from plugins and MCP servers, which arrive when you install or connect them.
The rest of this guide takes them in that order, then looks at a problem the fourth kind creates: many repositories ship a command with the same name.
The built-in commands you meet first
The commands reference lists the built-in commands. It also notes: "Not every command appears for every user. Availability depends on your platform, plan, and environment." Do not memorize the whole list. These are the ones most sessions touch:
| Command | What it does, from the commands reference |
|---|---|
/help | Show help and available commands |
/init | Initialize a project with a CLAUDE.md guide |
/clear | Start a new conversation with empty context |
/compact | Free up context by summarizing the conversation so far |
/context | Visualize current context usage as a colored grid |
/model | Switch the AI model and save it as your default for new sessions |
/plan | Enter plan mode directly from the prompt |
/resume | Resume a conversation by ID or name, or open the session picker |
/rewind | Rewind the conversation and/or code to a previous point |
/permissions | Manage allow, ask, and deny rules for tool permissions |
/memory | Edit CLAUDE.md files and manage auto memory |
/mcp | Manage MCP server connections and OAuth authentication |
/hooks | View hook configurations |
/plugin | Manage Claude Code plugins |
/skills | List available skills |
Two entries in the reference trip people up. /review is an alias of /code-review, and /cost is an alias for /usage. And /doctor, /debug and /code-review are marked Skill in the Purpose column, because they are bundled skills. The skills page puts the difference this way: "Bundled skills are prompt-based: they give Claude detailed instructions and let it orchestrate the work using its tools. Most built-in commands instead execute fixed logic directly."
Create your own slash command
Custom commands used to be their own feature. They are not any more. The skills page says so in one sentence: "Custom commands have been merged into skills. Your existing .claude/commands/ files keep working."
That leaves two ways to write one.
A skill (preferred). Save a SKILL.md file in its own folder. The folder name becomes the command, so .claude/skills/deploy-staging/SKILL.md is /deploy-staging. Where you save it decides who gets it:
| Location | Path | Loads in |
|---|---|---|
| Personal | ~/.claude/skills/<skill-name>/SKILL.md | All your projects on this machine |
| Project | .claude/skills/<skill-name>/SKILL.md | Sessions in this repository; commit it so your team gets it |
| Plugin | <plugin>/skills/<skill-name>/SKILL.md | Wherever the plugin is enabled, as /plugin-name:skill-name |
A command file. A Markdown file in .claude/commands/ is, in the docs' words, "the older format and still works." The file name without its extension is the command, so .claude/commands/deploy.md is /deploy. A subdirectory adds a segment joined with a colon: .claude/commands/frontend/component.md is /frontend:component. A command file takes the same frontmatter as a skill except name and paths, and the docs advise: "Prefer a skill for new work, since skills also support supporting files."
The file format
Both formats are Markdown with optional YAML frontmatter between --- markers, followed by the instructions Claude follows. Here is the docs' own example of a command you only run by hand:
---
name: fix-issue
description: Fix a GitHub issue
disable-model-invocation: true
---
Fix GitHub issue $ARGUMENTS following our coding standards.
1. Read the issue description
2. Understand the requirements
3. Implement the fix
4. Write tests
5. Create a commit
Running /fix-issue 123 hands Claude the text with 123 in place of $ARGUMENTS. For separate values, $ARGUMENTS[N] or the shorter $N picks one by position, so /migrate-component SearchBar JavaScript TypeScript can fill $0, $1 and $2. If you pass arguments and the file has no placeholder, the docs say Claude Code appends ARGUMENTS: <your input> to the end so Claude still sees what you typed.
All frontmatter fields are optional, and only description is recommended. The ones that matter for commands:
| Field | What it does |
|---|---|
name | Command name shown in the / menu. Defaults to the directory name |
description | What it does and when to use it. Claude uses this to decide when to load it |
argument-hint | Hint shown during autocomplete, such as [issue-number] |
disable-model-invocation | Set to true so Claude cannot run it on its own. Use it for /deploy, /commit and anything with side effects |
user-invocable | Set to false to hide it from the menu and let only Claude use it |
One warning from the docs: "A field name must match the table exactly, hyphens included: Claude Code ignores a field it doesn't recognize without reporting an error." A misspelled disable-model-invocation does not fail. It just does nothing.
This is also where commands meet agent skills. With the default settings both you and Claude can run a skill. You type /name, or Claude loads it when your request matches its description. That second path is why disable-model-invocation exists.
Commands from plugins and MCP servers
A plugin can bundle skills and a commands/ folder. Claude Code namespaces them under the plugin's name. The plugin reference says: "Claude Code namespaces every component under it, so an agent reviewer in plugin deploy-tools appears as deploy-tools:reviewer."
For commands the rule is the same. A file saved at commands/<file>.md becomes /<plugin>:<file>, and commands/db/migrate.md becomes /my-plugin:db:migrate. A plugin skill at my-plugin/skills/review/SKILL.md runs as /my-plugin:review.
MCP servers add commands through a different door. The MCP page says servers can expose prompts that become commands: "Claude Code lists each MCP prompt as /servername:promptname (MCP). Typing /mcp__servername__promptname also runs it." Arguments follow, separated by spaces, as in /mcp__github__pr_review 456. The guide to adding MCP servers covers connecting one.
What the index shows: the same command names, again and again
The same short names turn up in repository after repository. Flowy's index, 2026-11-17, published plugin repositories, gives the shape:
| Measure | Value |
|---|---|
| Slash commands (canonical components) | 11,270 in 909 of 4,284 repositories |
| Commands shipped by a repository that ships any | median 4; one repository in ten ships 26 or more |
| Commands that carry a description | 11,229 of 11,270 |
| Distinct command names (case folded) | 7,420 |
| Names that appear in 2 or more repositories | 1,109 |
| Commands that share a name with a command in another repository | 4,959 of 11,270 (44%) |
The most repeated names, by number of repositories that ship one:
| Name | Repos | Name | Repos |
|---|---|---|---|
status | 96 | commit | 36 |
setup | 89 | research | 34 |
review | 78 | code-review | 31 |
plan | 57 | help | 31 |
init | 46 | verify | 28 |
release | 42 | resume | 27 |
doctor | 38 | test | 27 |
start | 38 | update | 27 |
debug | 37 | report | 26 |
audit | 36 | build | 22 |
Several of these are names Claude Code already uses. By the commands reference, /status, /review, /plan, /init, /doctor, /debug, /code-review, /help, /verify and /resume are all built in or bundled. You can browse the full list of commands in the index.
What happens when two commands share a name
This is where the data raises a question, and the answer comes only from the official docs. Where the docs are silent, this guide says so.
Two plugins, each with a hello skill. They do not collide. The plugin guide says plugin skills and agents get the plugin name as a prefix, such as /my-plugin:hello, "so two plugins can each provide a hello skill without colliding." The skills page agrees: for a plugin skill and a skill at any other location, "Both load, because plugin skills are namespaced as /plugin-name:skill-name."
A plugin skill and a bare name. The docs describe one case where a plugin skill also answers to a short name. When its frontmatter sets name: fancy, the skill becomes /my-plugin:fancy, and "the bare /fancy also invokes the skill unless another command already uses that name." For a plugin skill with no name field, and for a command file in a plugin's commands/ folder, the docs give only the prefixed form. They do not say what happens when two plugins both want the same bare name, so the full /plugin:name form is the one to rely on.
Your own skills against each other. The skills page gives a table. With the same name in two of enterprise, personal and project locations, enterprise beats personal and personal beats project: with deploy in both ~/.claude/skills/ and the project's .claude/skills/, "/deploy runs the personal one." A skill beats a file in .claude/commands/ with the same name.
Your skill against a built-in. In a local terminal session, "your skill replaces the built-in command, but not its aliases." A project usage skill replaces /usage, while /cost still runs the built-in. The same holds for bundled skills: a project code-review skill replaces /code-review, and the alias /review never runs it.
Your own skill against a plugin's. Both load, because the plugin's is namespaced. Take release, a name 42 repositories in the index ship and one the commands reference does not list: with a release skill in your project and a plugin that ships its own, /release runs yours and /some-plugin:release runs the plugin's.
Not covered. The docs do say what happens when enabled plugins from different origins share a manifest name: an order of precedence decides which one loads, the hooks of one copy are left out, and the Errors tab of /plugin shows which copy holds the name. Beyond the namespace, they describe no rule for two different plugins whose commands share a bare name.
The practical rule that follows from the docs: when you install a plugin, call its commands by the prefixed name, and when you copy a command file into your own project, pick a name that no built-in or bundled skill already uses.
Slash commands, skills, hooks and subagents
Slash commands sit beside two other ways to extend Claude Code. A skill is a command you type or Claude loads. A subagent runs a task in its own context, and a skill can run in one with context: fork. A hook fires at a fixed point in a session without anyone typing anything.
For an action you want to control, write a command with disable-model-invocation: true. For one you want Claude to reach for, write a skill with a precise description. Either way, read a command file before you run a stranger's, because the file is the instruction Claude follows.
Sources
- Claude Code Docs, Extend Claude with skills (mechanism, troubleshooting, compaction budget)
- Claude Code Docs, Connect Claude Code to tools via MCP
- Claude Code Docs, Commands (built-in commands and bundled skills)
- Claude Code Docs, Plugin components (skills, commands and how they are named)
- Claude Code Docs, Create plugins (the plugin name as a prefix)
- Claude Code Docs, Plugins reference (how components are namespaced)
