How slash commands work
Type / in Claude Code to see every command available to you, and keep typing to filter the list. A command only counts at the start of a message; whatever follows its name becomes its arguments.
- Built-in commands are coded into the CLI, such as
/clear,/modeland/compact. - Bundled skills ship with Claude Code and work like prompts handed to Claude, such as
/simplify,/loopand/batch. - Custom commands are the ones you write: skills in
.claude/skills/or older files in.claude/commands/. Plugins and MCP servers can add more. - Send a command while Claude is still answering and it runs after the current turn; a few, such as
/statusand/usage, run straight away. - Not every command shows for everyone: some depend on your platform, plan or organization's policy.
Claude Code slash commands cheat sheet
The commands most people use, in the order a session tends to need them.
| When | Command | What it does |
|---|---|---|
| Setting up | /init | Writes a starter CLAUDE.md for the project |
| Setting up | /memory | Edits CLAUDE.md files and turns auto memory on or off |
| Setting up | /mcp | Manages MCP server connections |
| Setting up | /permissions | Manages allow, ask and deny rules for tools |
| Setting up | /config | Opens settings: theme, model, output style and more |
| During a task | /plan | Switches to plan mode before a big change |
| During a task | /model, /effort | Changes the model, and how much reasoning it uses |
| During a task | /context | Shows what's filling the context window |
| During a task | /compact [instructions] | Summarizes the conversation so far to free context |
| During a task | /btw [question] | Asks a side question without adding it to the conversation |
| During a task | /goal | Sets a condition Claude keeps working toward |
| In parallel | /tasks | Lists the session's background work and subagents |
| In parallel | /background | Detaches the session to run as a background agent |
| In parallel | /batch <instruction> | Splits a codebase-wide change into units, each in its own worktree |
| In parallel | /fork | Copies the conversation into a new background session |
| Before shipping | /diff | Shows the changes in your working tree |
| Before shipping | /code-review | Reviews the current diff or a PR for bugs; /review is an alias |
| Before shipping | /security-review | Checks the branch's changes for vulnerabilities |
| Between sessions | /clear | Starts a new conversation with empty context |
| Between sessions | /resume, /rename | Returns to an earlier conversation; names this one |
| Between sessions | /branch, /rewind | Branches the conversation; rolls code and conversation back to a checkpoint |
| Automation | /loop [interval] [prompt] | Repeats a prompt while the session stays open |
| Automation | /schedule | Creates and manages cloud scheduled tasks |
| When stuck | /doctor, /debug | Diagnoses setup problems; reads the session's debug log |
| When stuck | /usage, /status | Shows cost and plan limits (/cost and /stats are aliases); shows version, model and account |
How to create a custom slash command
Custom commands have been merged into skills. A file at .claude/commands/fix-issue.md and a skill at .claude/skills/fix-issue/SKILL.md both create /fix-issue and work the same way; the skill format is preferred for new commands because it can hold supporting files.
Create the folder and SKILL.md
For a command the whole team gets, create
.claude/skills/<name>/SKILL.mdin the repository and commit it. For one only you use in every project, put it in~/.claude/skills/<name>/SKILL.md. The folder name becomes the command:fix-issuegives/fix-issue.Write the frontmatter
Between
---lines, add adescription(Claude uses it to decide when the skill applies),argument-hintto show expected arguments in the menu,disable-model-invocation: trueif only you should trigger it (for anything with side effects, such as deploys), andallowed-toolsto pre-approve tools for that turn.Write the prompt, with arguments
Below the frontmatter, write the instructions as Markdown.
$ARGUMENTSis replaced by everything typed after the command;$0,$1and so on (or$ARGUMENTS[0]) pick single arguments. A line with `!command` runs that shell command first and pastes its output into the prompt.--- description: Fix a GitHub issue by number, with a test argument-hint: [issue-number] disable-model-invocation: true allowed-tools: Bash(gh issue view *) --- Issue: !`gh issue view $ARGUMENTS` Fix this issue following our conventions in CLAUDE.md. 1. Write a failing test that reproduces it. 2. Make the smallest change that passes. 3. Run the test suite and summarize what changed.Run it
Type
/fix-issue 123. Skills you add or change during a session load on their own; if one doesn't show up, run/reload-skills. Withoutdisable-model-invocation, Claude can also run the skill by itself when your request matches its description.Use positional arguments for multi-part commands
Running
/migrate-component SearchBar React Vuefills$0,$1and$2in order.--- description: Migrate a component between frameworks argument-hint: [component] [from] [to] --- Migrate the $0 component from $1 to $2. Keep every existing behavior and test passing.
Where custom slash commands live
| Location | Path | Command name |
|---|---|---|
| Personal | ~/.claude/skills/<name>/SKILL.md | /<name> in all your projects |
| Project | .claude/skills/<name>/SKILL.md | /<name> for everyone in the repository |
| Older command file | .claude/commands/<name>.md | /<name>; a subfolder adds a prefix, e.g. commands/frontend/component.md → /frontend:component |
| Plugin | <plugin>/skills/<name>/SKILL.md | /<plugin>:<name> |
| MCP server | Prompts exposed by the server | Listed in the / menu |
Slash commands vs skills
Since the merge, the question is less "which one" than "which file format". If a skill and a command file share a name, the skill wins.
| `.claude/commands/<name>.md` | `.claude/skills/<name>/SKILL.md` | |
|---|---|---|
Creates /<name> | Yes | Yes |
| Frontmatter | Same fields, except name and paths | All fields |
| Supporting files (scripts, templates) | No | Yes, in the skill's folder |
| Claude can load it on its own | Yes, unless disable-model-invocation: true | Yes, unless disable-model-invocation: true |
| Status | Still works | Recommended for new work |
Tips and gotchas
- At the terminal prompt you can stack skills:
/write-tests /fix-issue 123loads both and passes123to each, up to six. Inclaude -pand the Agent SDK only the first one loads. - Built-in commands you remember may be gone:
/pr-comments,/vimand/ultraplanhave been removed. Check/helpor the docs. allowed-toolsgrants permission only for the turn that invokes the skill, and repository skills can grant themselves tools, so read them before running Claude Code in an unfamiliar repo.- Every skill's description sits in context;
/skill-doctorshows what each costs and how often it's used. Long procedures belong in skills, not in CLAUDE.md. /looprepeats a prompt only while your session is open. To have work start on its own, see how to make Claude Code proactive; to keep it going overnight, see how to run Claude Code 24/7.
Slash commands make you faster. Crewmark makes Claude Code start without you.
Every slash command still needs you at the keyboard to type it. Crewmark turns a Claude Code, Codex, DeepSeek Harness or OpenCode session into an AI employee with a role, a goal and working hours, and wakes it on a heartbeat to take the next issue from a board, using the same skills and commands you've set up.
Keep your skills in the repository
Your
.claude/skills/and CLAUDE.md load in the employee's session like in yours, so/fix-issueand your conventions come along.Let the heartbeat start the work
During its working hours the employee wakes every 15, 30 or 60 minutes in the same conversation and takes the next issue. Several can share a repository, each in its own worktree.
Assign issues and answer its messages
Put work on the board; the employee comments as it goes and messages you when it needs a decision. Read what an AI employee is.
Claude Code slash commands FAQ
How do I see all Claude Code slash commands?
Type / at the start of a message to open the menu, and keep typing to filter it. /help and /skills list them too, and the Commands page of the Claude Code docs has the full reference.
How do I create a custom slash command in Claude Code?
Create .claude/skills/<name>/SKILL.md (or ~/.claude/skills/<name>/SKILL.md for every project) with a short frontmatter and your prompt. It becomes /<name>. An older .claude/commands/<name>.md file also works.
How do I pass arguments to a slash command?
Type them after the command name. In the prompt, $ARGUMENTS holds everything you typed, and $0, $1 and so on hold single arguments. Add argument-hint to the frontmatter to show what's expected.
What's the difference between slash commands and skills?
Custom slash commands have been merged into skills: both create a /name and work the same way. Skills add a folder for supporting files and are the recommended format; command files in .claude/commands/ keep working.
Are slash commands deprecated?
No. Typing /name is how you run any command or skill. What changed is the file format for custom ones: .claude/commands/ still works, but skills are preferred. A few individual built-in commands have been removed.
Can Claude run my slash command by itself?
Yes, when your request matches the skill's description. Add disable-model-invocation: true to its frontmatter to make it run only when you type it.
Do slash commands work in headless mode?
Custom skills do: claude -p "/fix-issue 123" runs one, because -p loads skills and custom commands like an interactive session. Only the first skill in the message loads, and --bare skips skill discovery altogether.
Checked against the Claude Code docs (commands and skills) on November 6, 2026.