The list that pops up when you hit / in Claude Code is intimidating at first. A hundred-odd commands, half of them named in a way that gives nothing away, and your own custom commands mixed in with the built-ins.
You don’t need all of them. Ten commands cover almost everything you do day to day, and the rest is reference material you look up when the moment arrives. This page gives you both: the ten first, then the full list grouped by what it’s for 🧰
The Short Answer
- Context is full:
/compactto summarize,/contextto see what filled it - Start over:
/clear - It went wrong:
/rewind(rolls back code too) - Change models:
/model, and/effortfor thinking depth - Check the work:
/diff, then/code-review - What did this cost:
/usage
How Slash Commands Work
A slash command isn’t a regular message to Claude. It’s an instruction to Claude Code itself, or a prepackaged prompt. A few rules govern them:
The command has to start the message. A /compact in the middle of a sentence is just text, not a command. Everything you type after the command name becomes its arguments.
Sending one mid-response queues it. If Claude is working when you send a command, it runs after the current turn finishes. /status, /tasks and /usage are the exceptions: they run immediately without interrupting anything.
Skills chain. Bundled skills and your own can be stacked: /skill-a /skill-b do the thing loads every skill named at the start and passes the trailing text to each one as arguments. Up to six at a time.
Not everything in the / menu is built in. Files under .claude/skills/ or .claude/commands/, plugins you installed, and prompts exposed by connected MCP servers all show up in the same place.
So if the menu looks long, part of that is your own setup.
The 10 You Actually Use
Learn these and you’ll rarely need to look up the rest.
| Command | What it does | When |
|---|---|---|
/compact | Summarizes the conversation and frees context | When a long session starts dragging |
/context | Shows what is filling the context window, as a colored grid | When you're asking "why is it full already" |
/clear | Starts a fresh conversation with empty context | When the topic changes completely |
/rewind | Rolls code and conversation back to a checkpoint | When Claude went down the wrong path |
/model | Switches the model | Strong model for hard work, fast one for routine edits |
/effort | Sets thinking depth | Up for gnarly debugging, down for small edits |
/diff | Shows uncommitted changes | Before you look at what Claude actually changed |
/code-review | Reviews the current diff for bugs and cleanup | Before a commit or PR |
/resume | Returns to a previous conversation | Picking up yesterday's work |
/usage | Token and cost breakdown for the session | When you sense you're near a limit |
/compact keeps the same conversation and reduces the history to a summary. Claude still remembers what it did and why.
/clear ends it. Context goes empty. That’s right when you’ve moved to a new topic, but do it mid-task and you’ll be explaining the whole situation again from scratch.
Full List: Session and Conversation
All of context management lives here, and these are the commands that save you the most time.
| Command | What it does |
|---|---|
/clear [name] | Empties context and starts a new conversation. Pass a name and the old one appears under that label in /resume. Aliases: /reset, /new |
/compact [instructions] | Frees context by summarizing. Pass instructions to focus the summary |
/autocompact [auto|tokens] | Sets how full context gets before auto-compaction kicks in. Example: /autocompact 500k |
/context [all] | Visualizes context usage as a colored grid and flags bloated tools and memory files |
/resume [session] | Returns to a previous conversation by name or ID. With no argument, opens a picker. Alias: /continue |
/rewind | Rolls code and conversation back to a checkpoint, or summarizes from a message you pick. Aliases: /checkpoint, /undo |
/branch [name] | Branches the conversation here so you can try another direction without losing the current one |
/fork [prompt] | Copies the conversation into a new background session while you keep working here |
/subtask <task> | Spawns a background subagent that inherits the full conversation. Its result returns here when it finishes |
/background [prompt] | Detaches the session to run in the background and frees the terminal. Alias: /bg |
/stop | Stops the background session you're attached to. The transcript and any worktree are kept |
/btw [question] | Asks a quick side question that doesn't get added to the conversation. With no question, reopens your last one |
/tasks | Lists the session's background work, including finished subagents. Alias: /bashes |
/workflows | Opens the workflow view to watch, pause, resume or save running and completed workflows |
/rename [name] | Renames the session and shows the name on the prompt bar. With no name, generates one from the history |
/recap | Generates a one-line summary of the current session |
/teleport | Pulls a Claude Code on the web session into this terminal, fetching the branch and conversation. Alias: /tp |
/remote-control | Makes this session available for Remote Control from claude.ai. Alias: /rc |
/copy [N] | Copies the last response to the clipboard. Pass a number for the Nth-latest. Press w in the picker to write to a file |
/export [filename] | Exports the conversation as plain text |
/exit | Exits the session. In a background session it just detaches. Alias: /quit |
All three sound like “split the work”, but they differ:
/branch: you move into the branch in this terminal, the original stays put/fork: the copy runs as a separate background session, you stay here/subtask: the work goes to a subagent and comes back as a summary in this conversation
Model, Effort and Interface
| Command | What it does |
|---|---|
/model [model] | Switches the model and saves it as your default. Press s on a row in the picker to switch for this session only |
/effort [level] | Sets thinking effort: low, medium, high, xhigh, max, ultracode. auto resets to the model default |
/fast [on|off] | Toggles fast mode. The model doesn't get smaller, the output gets quicker |
/advisor [model|off] | Enables the advisor tool, which consults a second model at key moments |
/goal [condition|clear] | Sets a goal and Claude keeps working across turns until it's met |
/config [key=value] | Opens settings, or sets a key directly: /config theme=dark. Alias: /settings |
/theme | Changes the color theme. Includes an auto option that follows your terminal background, colorblind-accessible themes, and any custom themes in ~/.claude/themes/ |
/color [color|default] | Sets the prompt bar color. Handy for telling several open terminals apart |
/tui [default|fullscreen] | Sets the terminal UI renderer and relaunches into it with the conversation intact. fullscreen enables the flicker-free alt-screen renderer |
/focus | Focus view: just your last prompt, a one-line tool summary and the final response. Fullscreen rendering only |
/statusline | Configures the status line. Describe what you want, or run it bare to auto-configure from your shell prompt |
/keybindings | Opens your keyboard shortcuts file |
/scroll-speed | Adjusts mouse wheel scroll speed. Fullscreen rendering only, not in the JetBrains terminal |
/voice [hold|tap|off] | Toggles voice dictation, or enables it in a specific mode. Requires a Claude.ai account |
/powerup | Walks you through Claude Code features with short interactive lessons |
Code, Git and Review
| Command | What it does |
|---|---|
/diff | Opens an interactive viewer with uncommitted changes and per-turn diffs |
/code-review [level] [--fix] [--comment] [pr#|branch|path] | Reviews the current diff, a PR number, a branch, or a path you pass. --fix applies findings, --comment posts them as inline GitHub comments, ultra runs a deep cloud review. Alias: /review |
/ultrareview [PR|branch] | Deep multi-agent review in a cloud sandbox. The preferred spelling is now /code-review ultra, this name remains as an alias. Three free runs on Pro and Max, then usage credits |
/simplify [target] | Reviews changed code for cleanup and applies the fixes. Four agents run in parallel: reuse of existing helpers, simplification, efficiency, and level of abstraction. It doesn't look for bugs, that's /code-review |
/security-review | Reviews your branch against origin's default branch for security vulnerabilities: injection, auth issues, data exposure. Needs an origin remote |
/verify | Confirms a change actually works by building your app, running it and observing the result, rather than trusting tests or type checks |
/run | Launches and drives your project's app so you can see the change working |
/run-skill-generator | Writes a per-project skill that teaches /run and /verify how to build, launch and drive your app from a clean environment |
/batch <instruction> | Splits a large change into 5 to 30 units, spawns one subagent per unit in its own worktree, and opens PRs |
/autofix-pr [prompt] | Starts a web session that watches your branch's PR and pushes fixes when CI fails or reviewers comment |
/install-github-app | Installs the Claude GitHub App on a repo, with optional Actions setup |
/code-review takes a level: low, medium, high, xhigh, max and ultra. Skip the level and it reuses whichever one you typed last.
ultra runs a deep cloud review and is billed. The others run locally as a subagent.
Project, Context and Memory
| Command | What it does |
|---|---|
/init | Generates a CLAUDE.md guide for the project. The fastest way to introduce your codebase to Claude Code |
/memory | Edits CLAUDE.md memory files, toggles auto-memory and shows its entries |
/add-dir <path> | Adds another working directory to the session. Useful for reading a sibling package in a monorepo |
/cd <path> | Moves the session to another directory. The prompt cache survives; the new CLAUDE.md is appended as a message |
/plan [description] | Enters plan mode straight from the prompt. Pass a description and it starts on that task |
/import [codex|gemini] | Brings Codex and Gemini CLI configuration on your machine into Claude Code: instruction files, MCP servers, commands, subagents, skills. --dry-run previews, --yes skips the picker |
/skills | Lists available skills. Type to filter, press t to sort by token count, Space to cycle a skill's visibility |
/plugin [subcommand] | Manages plugins. Bare opens the menu; list, install, enable and disable act directly |
/reload-plugins [--force] | Reloads active plugins without restarting. Warns and skips when the reload would invalidate the prompt cache |
/reload-skills | Re-scans skill and command directories so skills you added mid-session become available without a restart |
/list-agents | Lists the subagents and other sessions Claude can message, with the name to use for each. Alias: /peers |
/insights | Generates a report on your sessions: what you worked on, where you got stuck |
/team-onboarding | Turns the past 30 days of usage into a team onboarding guide a teammate can paste as a first message |
Configuration and Diagnostics
| Command | What it does |
|---|---|
/doctor | Checks installation health: duplicate installs, PATH problems, unparseable settings. Also lists unused skills and MCP servers against their context cost. Alias: /checkup |
/permissions | Manages allow, ask and deny rules for tool permissions. View rules by scope, add or remove them, manage working directories, review recent auto mode denials. Alias: /allowed-tools |
/hooks | Shows hook configurations for tool events |
/mcp | Manages MCP server connections and OAuth. Takes reconnect <server>, enable and disable |
/agents | Points you at subagent configuration. The files live under .claude/agents/ |
/ide | Manages IDE integrations and shows status |
/sandbox | Toggles sandbox mode. Supported platforms only |
/status | Opens settings on the Status tab: version, model, account and connectivity. Works while Claude is responding |
/usage | Session cost, plan limits and activity stats. On paid plans it breaks usage down by skill, subagent, plugin and MCP server. Aliases: /cost, /stats |
/usage-credits | Configures usage credits, or requests them from your admin, when you hit a limit |
/upgrade | Opens the upgrade page in your browser. Hidden on Enterprise plans |
/passes | Shares a free week of Claude Code with friends. Only visible on eligible accounts |
/terminal-setup | Configures terminal keybindings for Shift+Enter and friends. Only visible in terminals that need it: VS Code, Cursor, Alacritty, Zed |
/release-notes | Shows the changelog in an interactive version picker. The notes stay in your transcript and don't enter the conversation |
/help | Help and available commands |
/bug [report] | Reports a bug or shares the conversation. You choose how much history goes with it. Alias: /share |
/feedback [report] | Sends product feedback, using the same consent dialog as /bug |
/privacy-settings | Views and updates your privacy settings. Pro and Max subscribers only |
/login, /logout | Sign in to and out of your Anthropic account |
/heapdump | Writes a heap snapshot and memory breakdown for diagnosing memory usage. Doesn't appear in the menu, type it in full. Share only the -diagnostics.json file, the .heapsnapshot holds your conversation and credentials |
Commands that depend on platform, plan or environment:
| Command | What it does |
|---|---|
/chrome | Opens Claude in Chrome settings |
/desktop | Continues the session in the Claude Code desktop app. Needs macOS or x64 Windows and a Claude subscription. Alias: /app |
/mobile | Shows a QR code to download the mobile app. Aliases: /ios, /android |
/install-slack-app | Installs the Claude Slack app, opening a browser for the OAuth flow |
/remote-env | Chooses the default environment for cloud agents |
/web-setup | Connects your GitHub account to Claude Code on the web using your local gh credentials |
/setup-bedrock | Configures Amazon Bedrock auth, region and model pins through a wizard. Only visible with CLAUDE_CODE_USE_BEDROCK=1 |
/setup-vertex | Configures Google Cloud's Agent Platform through a wizard. Only visible with CLAUDE_CODE_USE_VERTEX=1 |
/stickers | Orders Claude Code stickers |
/radio | Opens Claude FM lo-fi radio in your browser |
Availability depends on platform, plan and environment. /upgrade is hidden on Enterprise plans, /desktop only appears on macOS and x64 Windows with a Claude subscription, and /setup-bedrock only when the matching environment variable is set.
If a command is missing, run claude update first, then check /help for the current list.
Bundled Skills and Workflows
These aren’t classic commands, they’re prepackaged prompts handed to Claude. You can invoke them, and Claude can load some of them on its own when they’re relevant.
| Command | What it does |
|---|---|
/debug [description] | Turns on debug logging for the session, then reads the log and diagnoses the problem |
/deep-research <question> | Fans out web searches, cross-checks sources and synthesizes a cited report |
/dataviz [request] | Design guidance for charts and dashboards, with palette validation for colorblind safety and contrast |
/loop [interval] [prompt] | Runs a prompt repeatedly. Omit the interval and Claude paces itself. Alias: /proactive |
/fewer-permission-prompts | Scans your transcripts and builds an allowlist for the read-only commands you keep approving |
/claude-api | Loads Claude API and Managed Agents reference material for your language. Also activates on its own when your code imports anthropic. Has migrate, managed-agents-onboard and prompt-audit subcommands |
/design-sync [hint] | Uploads your repo's React design system to Claude Design so generated designs use your real components |
/design-login | Authorizes design-system access for /design-sync with your claude.ai account |
/schedule [description] | Creates, updates, lists or runs routines that execute in the cloud. Claude walks you through setup conversationally. Alias: /routines |
/doctor, /batch, /code-review, /simplify, /run, /verify | Also bundled skills, covered in their own sections above |
Commands That No Longer Work
Still quoted in older guides and blog posts, but gone:
| Command | Status |
|---|---|
/vim | Removed in v2.1.92. To toggle Vim and Normal editing modes, use /config → Editor mode |
/pr-comments | Removed in v2.1.91. Ask Claude directly to view pull request comments |
/ultraplan | Removed. Use plan mode (/plan) instead |
Writing Your Own Slash Command
Custom commands and skills are the same thing now. .claude/commands/deploy.md and .claude/skills/deploy/SKILL.md both produce /deploy and behave identically.
The Easy Way: Have Claude Write It
You don’t have to open the file yourself. Describe what you want and let Claude Code create the skill:
Create a slash command called /deploy for me.
It takes an environment name as its argument (staging, production).
It should, in order:
1. Run npm test and stop if anything fails
2. Build with npm run build
3. Deploy to the given environment
Make it project-scoped, write it under .claude/skills/.
It has side effects, so it shouldn't fire on its own.
Those last two lines matter. “Project-scoped” puts it under .claude/skills/, “personal” puts it under ~/.claude/skills/. “Shouldn’t fire on its own” adds disable-model-invocation: true to the frontmatter.
Once the file exists, run /reload-skills and it shows up without a restart.
The same approach works for changes: “add a rollback step to /deploy” or “make /deploy skip the test stage” is enough. Claude finds the file and updates it.
To see what it wrote, open /skills and have it read the file back to you.
If You’d Rather Write It Yourself
The quickest route is a single file:
---
name: deploy
description: Deploys the app to the given environment
disable-model-invocation: true
---
Deploy to $ARGUMENTS:
1. Run the test suite
2. Build the app
3. Push to the deploy target
Type /deploy staging and $ARGUMENTS becomes staging.
| Scope | Path | Applies to |
|---|---|---|
| Personal | ~/.claude/skills/<name>/SKILL.md | All your projects |
| Project | .claude/skills/<name>/SKILL.md | That project only, shared with your team |
The command name comes from the folder name. Anything with side effects (/deploy, /commit, sending messages) should carry disable-model-invocation: true, otherwise Claude can fire it whenever it decides the moment is right.
For how skills, subagents and hooks differ, the full set of frontmatter fields and hook examples, see the skills, subagents and hooks guide .
MCP Server Commands
Connected MCP servers can expose slash commands too. They show up in this shape:
/mcp__<server-name>__<prompt-name>
A GitHub MCP server’s list_prs prompt becomes /mcp__github__list_prs. If the server isn’t connected the command won’t appear, so check /mcp for connection status.
The Terminal Side: claude Commands
Slash commands run inside a session. These start one:
| Command | What it does |
|---|---|
claude | Starts an interactive session |
claude "query" | Starts a session with an initial prompt |
claude -p "query" | Prints the answer and exits. This is the mode for scripts and pipes |
claude -c | Continues the most recent conversation in this directory |
claude -r "<session>" "query" | Resumes a session by ID or name |
claude update | Updates to the latest version |
claude doctor | Prints installation and settings diagnostics |
claude mcp | Configures MCP servers |
claude agents | Opens agent view to monitor background sessions |
claude attach <id> | Attaches to a background session in this terminal |
claude stop <id> | Stops a background session |
claude setup-token | Generates a long-lived OAuth token for CI and scripts |
The flags worth knowing:
| Flag | What it does |
|---|---|
--model | Sets the session model |
--effort | Sets the effort level |
--permission-mode | Starts in a given permission mode, e.g. plan |
--add-dir | Adds working directories |
--output-format | Output format in -p mode: text, json, stream-json |
--max-turns | Caps agentic turns in -p mode |
--max-budget-usd | Caps spend in -p mode |
-w, --worktree | Starts inside an isolated git worktree |
--bg | Starts as a background agent and returns immediately |
--safe-mode | Starts with all customizations disabled, for troubleshooting |
--bare | Skips discovery of hooks, skills, plugins, MCP servers and CLAUDE.md |
This flag turns off every permission prompt. Claude will use any tool, including file deletion, without asking.
Only use it in an isolated, version-controlled environment you can afford to lose. For daily work --permission-mode plan is a far more sensible starting point.
Frequently Asked Questions (FAQ)
How many slash commands does Claude Code have? There are over a hundred built-in commands and the count changes with each release. On top of that come your own skills, any plugins you installed and prompts exposed by connected MCP servers. Run /help to see the current list for your own setup.
What should I do when Claude Code runs out of context? Run /context first to see what filled the window, then /compact to summarize the conversation. /compact keeps the same conversation going, so Claude still remembers what it did and why. If the topic has changed entirely, /clear is the better choice.
What is the difference between /clear and /compact? /compact reduces the history to a summary but continues the same conversation. /clear ends the conversation and empties context completely. Use /clear mid-task and you will have to explain the situation from scratch.
How do I undo a change Claude Code made? /rewind rolls back both code and conversation to a checkpoint. Pass a number to rewind that many turns, pass text to search for a message, or run it with no argument to open a menu of recent checkpoints.
How do I create my own slash command in Claude Code? Create .claude/skills/<name>/SKILL.md in your project; the command name comes from the folder name. A single .claude/commands/<name>.md file does the same job. Use $ARGUMENTS inside it and whatever you type after the command gets substituted in.
What is the difference between slash commands and skills in Claude Code? There is no longer a difference. Custom slash commands were merged into skills, so .claude/commands/deploy.md and .claude/skills/deploy/SKILL.md both create /deploy. What skills add is a folder for supporting files and the ability for Claude to load them automatically when relevant.
How do I check token usage in Claude Code? /usage shows token usage and cost for the session, and /cost is an alias for the same command. It runs immediately without interrupting the response. For a detailed breakdown of what is filling the context window, use /context.
Does a slash command work in the middle of a sentence? No. A command is only recognized at the start of a message; anywhere else it is treated as plain text. Everything typed after the command name becomes its arguments.
A command isn’t showing up in my menu, what now? Three possible reasons. If your version doesn’t have it yet, run claude update. The command may depend on platform, plan or environment: /upgrade is hidden on Enterprise plans, /desktop only appears on macOS and x64 Windows, and /setup-bedrock only when the matching environment variable is set. The third possibility is that it was removed: /vim, /pr-comments and /ultraplan are gone. Run /help for the current list on your own install.
Wrapping Up
The command list is long but it revolves around one thing: context management. /context, /compact, /clear and /rewind are the backbone of daily use, and most of the rest gets opened once a month.
The second ring is /model, /effort, /diff and /code-review. Once they click, they’re also daily.
For the other hundred, bookmark this page instead of memorizing it. The only one worth memorizing is /help 😄
If you want to shape these commands around your own workflow, the skills, subagents and hooks guide is the next step, and the MCP guide covers adding tools 👀
