Cheat Sheet: Slash Commands

All 60+ commands, grouped and aliased

Beginner 13 minBuilder
What you'll be able to do
  • Locate the slash commands you'll use most by family and recall their exact syntax, aliases, and key arguments
  • Use the session/context, model/quality, and workflow families correctly, including their version-gated behavior
  • Distinguish a memory/config/tools command from a utility, and reach for the right diagnostic when something breaks
  • Recall the removed commands (/pr-comments, /vim) and where their behavior moved
  • Build a custom slash command using $ARGUMENTS, $0/$1, !`cmd`, and @file, and invoke an MCP prompt as /mcp__server__prompt
At a glance

A practical slash-command reference for Claude Code, organized into six families with the aliases, key arguments, and version notes you'll reach for most. The set shifts every few releases, so treat `/help` as the final word for your install. This is the lookup companion to the built-in tour in Module 4 — scan it, bookmark it, return to it.

  1. 1How to read this cheat sheet
  2. 2Family 1 — Session & context
  3. 3Family 2 — Model, effort & quality
  4. 4Family 3 — Workflow orchestration
  5. 5Family 4 — Memory, config & tools
  6. 6Family 5 — Utilities, plus removed commands
  7. 7Family 6 — Custom commands & MCP prompts

How to read this cheat sheet

This is a reference, not a tour — the conceptual walkthrough lives in Module 4. Here you get the full grid so you can look up exact syntax fast.

Three rules govern every command and are worth holding in your head while you scan:

  1. Recognized only at message start. / must be the first character of the line; everything after the command name becomes its arguments.
  2. /help is authoritative for your version. Plugins, custom commands, and connected MCP servers all add entries, so your menu is personalized. Type / to autocomplete and filter.
  3. Tags predict behavior. A [Skill] or [Workflow] tag in /help means Claude can also invoke that command autonomously when it's relevant — not just when you type it. Plain built-ins only fire when you type them.

Notation in the tables below: [optional] arguments are in square brackets, <required> in angle brackets, and | separates choices. Aliases are listed in the Notes column. Version notes like (v2.1.154+) mark when behavior landed or changed.

Note

Counts and currency

Claude Code ships dozens of built-in commands; this sheet groups the ones you'll reach for most into six families — it is not exhaustive, and new commands land often. Treat /help — not any frozen list — as the final word for your install. The default model depends on your plan and changes as new models ship, so run /model to see and switch the options available to you (Sonnet and Opus tiers).

Family 1 — Session & context

The conversation itself: its size, its history, and where you are in it. This is the family you touch most, because managing context is the core skill of working with Claude Code.

CommandSyntaxAliasesNotes
/clear/clear [name]/reset, /newEmpty the context window; prior conversation stays reachable via /resume
/compact/compact [instructions]Summarize to reclaim context, keeping CLAUDE.md, skills, and memory; optional focus instructions
/context/context [all]Colored grid of token usage plus optimization tips; all shows the full breakdown
/rewind/rewind (or Esc Esc)/checkpoint, /undoRestore or summarize back to an earlier checkpoint
/branch/branch [name]/forkFork the conversation at this point into a new session (CLAUDE_CODE_FORK_SUBAGENT forks to a subagent)
/resume/resume [session]/continueSwitch to another saved conversation by ID/name, or open the picker; background sessions marked since v2.1.144
/rename/rename [name]Rename the current session (auto-generates a name if none given)
/export/export [filename]Export the conversation as plain text to clipboard or file
/copy/copy [N]Copy the Nth-latest response; picker for individual code blocks (w = write to file)
/goal/goal [condition|clear]Claude keeps working until the condition is met; clear removes it
/btw/btw <question>Ask a side question without bloating history — context-only, no tool access (f = fork)
/focus/focusFocus view: last prompt + summary + response only
/add-dir/add-dir <path>Grant the session file access to another working directory

The everyday rhythm: /clear between unrelated tasks, /compact when a single long task fills the window, and /context to see why it's full before you decide.

Tip

/btw is context-only — it can't investigate

/btw answers from what's already in context and has no tool access, so it can't read files, run commands, or search. That's the point — it keeps a quick aside from bloating history. If the side question needs investigation, spawn a subagent instead.

Watch out

/add-dir files don't show in @ autocomplete

A known bug (#5605): directories added with /add-dir (or --add-dir) don't appear in @-mention tab completion. Type the full path manually. Also note /add-dir grants file access but does not discover that directory's own .claude/ config.

Family 2 — Model, effort & quality

How much brain you spend on the next turn, and the bundled review skills that audit your work. The review commands carry the [Skill] tag — Claude can run them on its own when relevant.

Model & effort

CommandSyntaxNotes
/model/model [model]Switch model and save as default; no-arg opens a picker (s = switch for this session only)
/effort/effort [level|auto]Levels low/medium/high/xhigh/max/ultracode; no-arg opens a slider
/fast/fast [on|off]Faster, less deliberate responses

Effort levels run lowmediumhighxhighmaxultracode. Which exist depends on the model. max and ultracode are session-only (can't be saved as a default), and ultracode = xhigh reasoning + automatic workflow orchestration across subagents. /effort auto resets to the model's default.

Review & quality (bundled skills)

CommandSyntaxNotes
/code-review/code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [target]Review the git diff for correctness bugs; --fix applies findings, --comment posts inline GitHub PR comments, ultra runs a deep cloud multi-agent review
/simplify/simplify [target]Cleanup-only review (v2.1.154+): four parallel agents for reuse, simplification, efficiency, abstraction — and apply fixes. No bug hunting
/security-review/security-reviewScan the diff for SQL injection, XSS, exposed credentials, insecure config

Clean division of labor: /code-review finds bugs, /simplify cleans up, /security-review checks security.

Watch out

/simplify is not /code-review

From v2.1.154, /simplify is cleanup-only and will not catch correctness bugs — it runs four agents for reuse, simplification, efficiency, and abstraction, then applies fixes. If you want bugs found, run /code-review. (On versions before 2.1.154, /simplify behaved like /code-review --fix.)

Key insight

Effort is your cost/latency/depth dial

Don't leave effort pinned high. Reach for /effort ultracode only when a task is both hard to reason about and big enough to parallelize — it pairs xhigh reasoning with automatic orchestration. Because max and ultracode are session-only, you set them per-task, not as a forever default.

Family 3 — Workflow orchestration

Scaling work out across plan mode, subagents, the background, and Anthropic's cloud. Several carry [Skill] or [Workflow] tags, so Claude can reach for them itself.

CommandSyntaxAliasesNotes
/plan/plan [description]Enter plan mode directly — read-only exploration that drafts a plan before edits
/batch/batch <instruction>[Skill] Decompose into 5–30 units, plan, then spawn one background subagent per unit in isolated worktrees. Requires a git repo
/agents/agentsOpen the subagent manager
/tasks/tasksList background tasks in the current session
/background/background [prompt]/bgDetach the session to run as a background agent
/loop/loop [interval] [prompt][Skill] Run a prompt repeatedly while the session is open, e.g. /loop 5m check deploy; reads .claude/loop.md if no prompt
/deep-research/deep-research <question>[Workflow] Fan out web searches, cross-check sources, synthesize a cited report
/run/run(v2.1.145+) Launch and drive the app to confirm a change works (needs per-project run-skill config)
/verify/verify(v2.1.145+) Verify a change by running the app and observing behavior
/run-skill-generator/run-skill-generator[Skill] (v2.1.145+) Teach /run and /verify how to build, launch, and drive your project's app by writing a per-project run skill
/schedule/schedule [description]Create a cron routine that runs on Anthropic's cloud (/routines lists them)
/autofix-pr/autofix-pr [prompt]Spawn a Claude Code on the web session that watches the current branch's PR and pushes fixes when CI fails or reviewers comment; pass a prompt to give it different instructions. Needs the gh CLI + access to Claude Code on the web

The big four for everyday scaling: /plan to think before acting, /batch to fan a large change out, /background to detach long work, and /loop to poll until something is true.

Example

Polling a deploy with /loop

/loop 5m check if the staging deploy finished and ping me when it's green runs the prompt every 5 minutes while the session stays open. Omit the prompt and /loop reads .claude/loop.md instead — handy for a reusable polling routine you commit to the repo.

Note

/run and /verify need a run-skill

/run and /verify (v2.1.145+) launch and drive the actual app, but they require per-project configuration so Claude knows how to build and start it. Run /run-skill-generator once to teach them — after that, /verify can confirm a change works in the real app, not just in tests.

Family 4 — Memory, config & tools

Everything that shapes the environment: what Claude remembers, what it's allowed to do, and which extensions are loaded.

CommandSyntaxAliasesNotes
/init/initScan the codebase and generate a starter CLAUDE.md (CLAUDE_CODE_NEW_INIT=1 = interactive multi-phase)
/memory/memoryEdit CLAUDE.md, toggle auto-memory, list loaded instruction files
/mcp/mcpManage MCP servers and OAuth connections
/permissions/permissions/allowed-toolsManage allow/ask/deny rules; review recent denials (r = retry)
/hooks/hooksView hook configurations
/config/config/settingsSettings UI — theme, model, editor (vim) mode, output style, prompt suggestions
/skills/skillsList skills (t = sort by tokens, Space = hide)
/plugins/pluginsManage installed plugins
/reload-plugins/reload-pluginsHot-reload plugins without restarting
/theme/themeSwitch theme (auto/light/dark/colorblind/ANSI/custom)
/color/color [color]Set the prompt accent color
/usage/usage/cost, /statsSession cost + plan usage + breakdown by skill/subagent/plugin/MCP
/fewer-permission-prompts/fewer-permission-promptsScan transcripts and add a safe read-only allowlist to settings

Keep /init, /memory, and /permissions close: one bootstraps your project's instructions, one curates them, and one controls what runs without asking.

Tip

/fewer-permission-prompts pays for itself

Tired of approving the same harmless git status or read-only MCP calls? /fewer-permission-prompts scans your transcripts for common read-only Bash/MCP calls and writes a prioritized allowlist into project .claude/settings.json — fewer interruptions, no loss of safety on the dangerous stuff.

Key insight

/config replaced the standalone editor toggle

Editing mode (the old /vim) now lives in /configEditor mode, alongside theme, model, output style, and prompt suggestions. /settings is the same command. For per-color tweaks use /theme and /color directly.

Family 5 — Utilities, plus removed commands

The supporting cast: help, diagnostics, output, sign-in, and surface-switching.

CommandSyntaxAliasesNotes
/help/helpThe authoritative list of commands for your version
/doctor/doctorInstall/config diagnostics (f = fix). CLI equivalent: claude doctor
/debug/debug [desc]Capture a debug report describing an issue
/diff/diffShow the current diff
/heapdump/heapdumpDump heap state for memory diagnostics
/feedback/feedback/bug, /shareSend feedback, report a bug, or share the session
/login/loginAuthenticate / switch account
/logout/logoutSign out
/teleport/teleport/tpPull a web (claude.ai) session into the local terminal
/desktop/desktop/appOpen the current session in the Desktop app
/exit/exit/quitLeave the session

Removed — don't trust stale tutorials:

Removed commandRemoved inWhat to do instead
/pr-commentsv2.1.91Ask Claude directly to view a pull request's comments
/vimv2.1.92Toggle editing modes via /configEditor mode

If you type a removed command on a current version it simply isn't recognized — another reason /help, not a blog post, is your source of truth.

Note

Diagnostics, in order of reach

When something's off: /doctor (f to auto-fix install/config issues) → /debug (capture a report) → /heapdump (memory diagnostics). /feedback (with /bug and /share) routes the report to Anthropic. The CLI mirror of /doctor is claude doctor.

Family 6 — Custom commands & MCP prompts

Your / menu isn't fixed — you can add to it, and connected servers add to it for you.

Custom slash commands. Define your own by dropping a Markdown file in one of these locations; the filename (minus .md) becomes the command name:

LocationScopeRecommended?
.claude/skills/<name>/SKILL.mdProjectYes — Claude can also invoke it autonomously
.claude/commands/<name>.mdProject (legacy)Works; manual-trigger only
~/.claude/commands/<name>.mdPersonal (all projects, legacy)Works; manual-trigger only

Subdirectories like .claude/commands/backend/api-test.md show the path in the description but do not namespace the name — it's still /api-test. Optional YAML frontmatter keys: description, allowed-tools, model, argument-hint.

Dynamic placeholders make a command file act on input and its environment:

PlaceholderExpands to
$ARGUMENTSAll arguments, as a single string
$0 / $1 / $2Individual positional arguments by index
!`command`Runs the shell command; its stdout is inlined into the prompt
@path/to/fileEmbeds the file's contents into the prompt

MCP prompts. Each connected MCP server can expose prompts, which surface as commands in the format /mcp__<server>__<prompt> — double-underscore separated, namespaced by server, dynamically discovered so they only appear when that server is connected. Example: a linear server exposing create_issue becomes /mcp__linear__create_issue.

Example

A custom command in four lines

Create .claude/commands/review-file.md:

markdown
---
description: Review one file against our standards
argument-hint: <path>
---
Review @$0 for bugs and style. Recent commits for context:
!`git log --oneline -5`

Now /review-file src/auth.ts embeds that file (@$0), inlines your last five commits (!`git log...`), and runs the review.

Watch out

Prefer SKILL.md for new commands

.claude/commands/ still works, but the recommended home for a new custom command is .claude/skills/<name>/SKILL.md — that way Claude can invoke it autonomously when relevant, not only when you type the slash. The legacy commands/ folder is manual-trigger only.

Try it: Make the cheat sheet yours

Turn this reference into muscle memory and build one command of your own. Use a throwaway git repo so the review commands have a diff to chew on.

  1. Audit your menu. Run /help and tick off how many of the six families you can name a command from without looking. Note any commands in your /help that aren't in this sheet (plugins/MCP add them) — that's your personalized surface.
  2. Drill the aliases. Confirm /reset behaves like /clear, and /cost like /usage. Open /config and find Editor mode — the replacement for the removed /vim.
  3. Tune effort. Run /effort with no argument to see the slider; note which levels your current model exposes and which are marked session-only. Set /effort high, then /effort auto to reset.
  4. Run the three reviews. Make a small code change. Run /code-review (try --fix), then /simplify, then /security-review. Observe how each reports a different kind of finding.
  5. Build a custom command. Create .claude/commands/audit.md with frontmatter (description, argument-hint) and a body that uses @$0 to embed a file and !`git log --oneline -5` to inline recent commits. Run /audit <some-file> and confirm both expanded.
  6. Find an MCP prompt (if you have a server). Connect any MCP server via /mcp, then type /mcp__ and watch its prompts autocomplete in the /mcp__<server>__<prompt> format.

Deliverable: a short note listing one command from each of the six families, the two /effort levels that are session-only on your model, and the path + filename of the custom command you built.

Key takeaways

  1. 1Slash commands fire only at the start of a message; everything after the name is arguments, and `/help` is the authoritative list for your version, plugins, and connected MCP servers.
  2. 2Session/context (/clear=/reset/new, /compact, /context, /rewind=/checkpoint/undo, /branch=/fork, /resume=/continue, /rename, /export, /copy, /goal, /btw, /focus, /add-dir) is the family you touch most.
  3. 3Effort runs low→medium→high→xhigh→max→ultracode; max and ultracode are session-only and ultracode adds automatic orchestration. /code-review finds bugs, /simplify (v2.1.154+) only cleans up, /security-review checks security.
  4. 4Workflow scales work out: /plan, /batch, /agents, /tasks, /background=/bg, /loop, /deep-research, /run + /verify, /schedule, /autofix-pr. Memory/config/tools covers /init, /memory, /mcp, /permissions, /hooks, /config=/settings, /skills, /plugins, /usage=/cost/stats.
  5. 5/pr-comments was removed in v2.1.91 (ask Claude directly) and /vim in v2.1.92 (use /config → Editor mode).
  6. 6Extend the menu with custom commands using $ARGUMENTS, $0/$1, !`cmd`, and @file — and MCP servers add prompts dynamically as /mcp__<server>__<prompt>.

Quiz

Lock in what you learned

Check your understanding

0 / 4 answered

1.A teammate says 'just run /reset to start fresh' but your notes say /clear. What's going on?

2.You want to (a) apply review fixes to your working tree and (b) clean up duplicated code without changing behavior. Which commands fit?

3.Inside a custom command file (.claude/commands/audit.md), what does the line `` !`git status --short` `` do when you run /audit?

4.You connect an MCP server named `notion` that exposes a `search_pages` prompt. How do you invoke it, and why might a colleague not see it?

Go deeper

Hand-picked sources to keep learning