Claude Code Slash Commands: Built-In and Custom
October 5, 2026

Claude Code slash commands are shortcuts you type at the start of a message, beginning with /. Some control the tool itself: clear the context, switch models, set permissions. Others hand Claude a ready-made prompt, including ones you write yourself as a Markdown file.
Here is what to know before you start typing:
- Built-in commands run fixed logic.
/compact,/modeland/permissionsare coded into Claude Code. They are not prompts. - Custom commands are Markdown files. A file at
.claude/commands/deploy.mdcreates/deploy. - Custom commands have been merged into skills. The docs say so in as many words, and the old files keep working.
- The list changes often. Don't memorise it. Type
/in a session and read what your version offers.
As of October 2026, that is the whole model. The rest of this post is the detail.
What the built-in Claude Code slash commands are for
Anthropic's commands reference describes commands as a way to control Claude Code from inside a session. Type / to see what is available to you, or type / plus a few letters to filter. A command is only recognised at the start of your message, and any text after the name becomes its arguments.
The reference is long, and it is also not the same for everyone. Availability depends on your platform, plan and environment, so a command you read about may not show up in your menu. That is a good reason not to treat any blog list, this one included, as complete. Here is a representative few, grouped by the moment you reach for them:
| When | Command | What the docs say it does |
|---|---|---|
| New repo | /init | Initializes the project with a CLAUDE.md guide |
| Setting up | /permissions | Manages allow, ask and deny rules for tool permissions |
| Long task | /plan | Enters plan mode from the prompt, with an optional description |
| Context filling up | /compact | Summarizes the conversation to free space; takes optional focus instructions |
| Switching tasks | /clear | Starts a new conversation with empty context |
| Checking setup | /skills | Lists available skills |
| Not sure what exists | /help | Shows help and available commands |
If your goal is a clean permission setup rather than a tour of the menu, the Claude Code permissions guide goes deeper on /permissions.
One detail changes how you think about the whole menu. The reference marks some entries as Skill: bundled skills such as /code-review and /batch. These are prompts handed to Claude, which then does the work with its normal tools. The skills page puts the difference this way: bundled skills give Claude detailed instructions, while most built-in commands execute fixed logic directly. You type both the same way. They are not the same thing underneath.
Where custom slash commands live
A custom command is a Markdown file in a commands/ folder. Anthropic's .claude directory reference lists commands/*.md as available at project and global level, describing them as single-file prompts that use the same mechanism as skills.
| Where | Who gets it |
|---|---|
.claude/commands/ inside a repository | Everyone who works in that repo, if you commit it |
commands/ in your own global .claude directory | You, in every project |
The command name comes from the file name without the extension, so .claude/commands/deploy.md becomes /deploy. Put a file in a subfolder and the folder becomes a prefix joined with a colon: .claude/commands/frontend/component.md becomes /frontend:component. That is how the skills page documents it.
A file needs no frontmatter at all. The body is the prompt. Add frontmatter when you want to control how the command behaves.
A command file, start to finish
Here is a small one. It is the shape the skills page uses for its own issue-fixing example, with an argument hint and a tool pre-approval added.
---
description: Fix a GitHub issue by number
argument-hint: [issue-number]
disable-model-invocation: true
allowed-tools: Bash(gh issue view *) Bash(git add *) Bash(git commit *)
---
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
Save it as .claude/commands/fix-issue.md, then run /fix-issue 123. Claude receives the body with $ARGUMENTS replaced by 123.
Each frontmatter line earns its place:
descriptionsays what the command does and when to use it. Claude reads it to decide when a prompt applies on its own.argument-hintis the hint shown during autocomplete, such as[issue-number].disable-model-invocation: truestops Claude from running the command by itself. The docs recommend it for workflows with side effects, such as/commitor/deploy, because you don't want Claude deciding to deploy because the code looks ready.allowed-toolslets Claude use the listed tools without asking during the turn that runs the command. The grant clears when you send your next message, and it does not restrict which tools exist.
Arguments
Everything you type after the command name is the argument text. Three ways to use it, all documented on the skills page:
| Placeholder | Meaning |
|---|---|
$ARGUMENTS | The full argument string as you typed it |
$0, $1, $2 or $ARGUMENTS[N] | A single argument by position, counting from zero |
| A named placeholder | Declare arguments: [issue, branch] in frontmatter, then use $issue and $branch |
Multi-word values need quotes: /my-skill "hello world" second makes $0 expand to hello world. If you pass arguments and the file has no placeholder, Claude Code appends ARGUMENTS: <your input> to the end, so what you typed is never silently dropped.
Slash commands vs skills
This is the part most guides get wrong, because the older advice is still everywhere. The skills page states it directly:
Custom commands have been merged into skills.
It adds that a file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy and work the same way, and that existing .claude/commands/ files keep working. So the question "slash commands or skills?" is now a question about file layout, not capability.
| Command file | Skill | |
|---|---|---|
| Path | .claude/commands/name.md | .claude/skills/name/SKILL.md |
| Typed as | /name | /name |
| Frontmatter | Same fields, except name and paths | All fields |
| Supporting files | No | Yes, in the skill's directory |
| Docs recommendation | Older format; still works | Preferred for new work |
If a command and a skill share a name, the skill wins. The skills page also covers the other collisions, and one is worth knowing: in a local terminal session, a skill you write replaces a built-in command of the same name, but not its aliases. Pick names that don't shadow something you use.
For a plain one-file prompt, a command file is still fine. Reach for a skill when the prompt needs a script, a template or a reference document next to it. For the skill side of that decision, see how Claude skills work and how to build one.
Commands from plugins and MCP servers
Two more sources put entries in the same / menu.
Plugins. A plugin's commands/ folder holds flat Markdown command files, and the plugin reference says to prefer skills/ for new plugins. Plugin components are namespaced under the plugin's name, so a skill called review in a plugin called my-plugin is run as /my-plugin:review. The namespace is what keeps two plugins from fighting over the same short name. The plugins overview covers installing them, and our plugin guide covers building one.
MCP servers. MCP servers can expose prompts that become commands. Claude Code lists each one as /servername:promptname (MCP) in the menu, and typing /mcp__servername__promptname also runs it. Arguments go after the name, separated by spaces:
/mcp__github__pr_review 456
Claude Code discovers these prompts from connected servers and injects the result straight into the conversation.
Three mistakes to avoid
- Expecting a command to run mid-sentence. Written after plain text, a skill name only gives Claude permission to run it; nothing runs directly. Put the command first.
- Forgetting that a file name is a command name. Rename
deploy.mdand you rename/deploy. Teammates who relied on it lose it quietly. - Putting an unreviewed command in a shared repo.
allowed-toolspre-approves tools, and the docs note that a project skill's grant applies even in a non-interactive-prun in a folder you have never trusted. Read that field in anything you pull from someone else.
Where Taku fits
A slash command is a prompt you wrote down so you stop retyping it. That solves a real problem for people already working in Claude Code. It does nothing for the larger group who saw someone's command, skill or setup on social media and never got Claude Code running in the first place.
Taku is an AI-native desktop workspace aimed at that gap. You mirror an AI setup someone has already got working, run it, remix it and keep it, without rebuilding their environment. It is a different shape from Claude Code, not a replacement. If you live in a terminal and enjoy the wiring, Claude Code's own commands serve you well. Taku is in Beta, and the Mac app is available now.
FAQ
What are slash commands in Claude Code?
Shortcuts that start with / and are recognised only at the start of your message. Built-in ones control the session, for example clearing context or switching models. Custom ones are Markdown files that expand into a prompt.
How do I see all Claude Code slash commands?
Type / in a session to get a filterable menu, or run /help. The menu shows only what is available for your platform, plan and version. Anthropic's commands reference lists the full set, and it changes between releases.
How do I create a custom slash command?
Create .claude/commands/name.md in your project, or the same file in your global .claude directory for all projects. Write the prompt as the body, add optional frontmatter, and run /name. Use $ARGUMENTS where the text you type after the command should go.
Are custom commands deprecated now that skills exist?
Not removed. The docs say custom commands have been merged into skills, that existing command files keep working, and that for new work you should prefer a skill, since skills support supporting files.
Can a command take arguments?
Yes. Use $ARGUMENTS for everything after the command name, $0 or $1 for individual positions, or named placeholders declared in an arguments frontmatter list. Add argument-hint to show what to type during autocomplete.
Do plugins and MCP servers add slash commands?
Both can. Plugin commands and skills are namespaced as /plugin-name:name. MCP prompts appear as /servername:promptname, and /mcp__servername__promptname also runs them.
The short version
Built-in commands control Claude Code. Custom commands are Markdown files that become prompts, and they now live inside the skills system, so a command file is the light version of a skill. Start with a single file for a prompt you keep retyping. Move to a skill when it needs company. And since the list changes between releases, treat / as the source of truth, not any article.