Claude Code commands
Claude Code has 112 slash commands and most people use about a dozen. Here is every one of them, plus the 26 that map to how a session actually runs.
Claude Code commands are the slash commands you type into the prompt to change what the session is doing. Type / and the menu appears.
There are 112 of them. Most people meet about a dozen, usually by accident, and never find the ones that would have saved them the most time.
So this is all of them, grouped by the point in the work where you would actually reach for one.
- What a Claude Code command is, and how the menu matches what you type
- Why the right command at the right moment costs you less than a better prompt
- The 26 that map to a normal session, grouped by when you use them
- All 112 in one table you can search
- The 6 worth setting up before your next session
What is a Claude Code command?
A Claude Code command is an instruction to the tool rather than to the model. /clear does not ask Claude to forget: it empties the context window.
You type / and a menu opens. Keep typing and it filters.
Some are core commands built into Claude Code. Others are bundled skills, which behave the same way at the prompt but are loaded rather than built in.
Why Claude Code commands matter
Because most of what people try to fix with a better prompt is not a prompting problem.
A session that has gone vague usually has a full context window. A run that keeps stalling on approvals usually has no permission rules. Neither gets better by rewording the request.
For example, an hour into a session the answers get worse. The prompt is not the problem. /context shows you what is filling the window and /clear gives it back, and that takes 2 seconds.
So the commands are the controls. Prompting is what you do once the controls are set.
Your first session in a repo
Run these once and the project is set up for every session after it. This is also where your AI OS starts.
| Command | What it does |
|---|---|
| /init | Initialize project with a CLAUDE.md guide. |
| /memory | Edit CLAUDE.md files, enable or disable auto memory, and view auto memory entries |
| /mcp [reconnect <server>|enable|disable [<server>|all]] | Manage MCP server connections and OAuth authentication. |
| /permissions | Manage allow, ask, and deny rules for tool permissions. |
During a task
The 6 you will use every day. 3 of them decide what the session costs you.
| Command | What it does |
|---|---|
| /plan [description] | Enter plan mode directly from the prompt. |
| /model [model] | Switch the AI model and save it as your default for new sessions. |
| /effort [level|auto|status] | Set the effort level: low to xhigh, max, ultracode, or auto; status prints it. |
| /context [all] | Visualize current context usage as a colored grid. |
| /compact [instructions] | Free up context by summarizing the conversation so far. |
| /btw [question] | Ask a side question about the current session without adding to the conversation. |
Running work in parallel
For when 1 task is really several, or when you want your terminal back.
| Command | What it does |
|---|---|
| /tasks | View and manage background work in the current session, including subagents that have finished. |
| /background [prompt] | Detach the current session to run as a background agent and free this terminal. |
| /batch <instruction> | Skill. |
Before you ship
Read what changed before anyone else has to.
| Command | What it does |
|---|---|
| /diff | Review the changes in your working tree, including the edits Claude has made so far. |
| /code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [pr#|branch|path] | Skill. |
| /security-review | Analyze the changes on your current branch for security vulnerabilities. |
Between sessions
Work does not end when you close the terminal, and last week's conversation is still there.
| Command | What it does |
|---|---|
| /clear [name] | Start a new conversation with empty context. |
| /resume [session] | Resume a conversation by ID or name, or open the session picker. |
| /branch [name] | Create a branch of the current conversation at this point, so you can try a different direction without losing the conversation as it stands. |
| /fork [prompt] | Copy the current conversation into a new background session and keep working here. |
| /teleport | Pull a Claude Code on the web session into this terminal. |
| /remote-control | Make this session available for Remote Control from claude.ai. |
When something is wrong
Before you restart from scratch, which is what most people do instead.
| Command | What it does |
|---|---|
| /rewind | Rewind the conversation and/or code to a previous point, or summarize from a selected message. |
| /doctor | Skill. |
| /debug [description] | Skill. |
| /feedback [report] | Send product feedback about Claude Code. |
All 112 Claude Code commands
Here is the full Claude Code command list, in alphabetical order.
| Command | What it does |
|---|---|
| /add-dir <path> | Add a working directory for file access during the current session. |
| /advisor [model|off] | Enable or disable the advisor tool, which consults a second model for guidance at key moments during a task. |
| /agents | As of v2.1.198, running /agents prints a reminder to ask Claude to create or manage subagents, or to edit .claude/agents/ or ~/.claude/agents/ directly. |
| /artifacts | List the artifacts you own or that are shared with you, then attach one to the session, open it in your browser, or copy its link. |
| /auto-mode-setup | Draft autoMode.environment entries from your project and recent sessions, then review the draft and save it to your user settings. |
| /autocompact [auto|<tokens>] | Set the auto-compact window: how full the context window gets before Claude Code compacts automatically. |
| /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 leave comments. |
| /background [prompt] | Detach the current session to run as a background agent and free this terminal. |
| /batch <instruction> | Skill. |
| /branch [name] | Create a branch of the current conversation at this point, so you can try a different direction without losing the conversation as it stands. |
| /btw [question] | Ask a side question about the current session without adding to the conversation. |
| /bug [report] | Report a bug or share your conversation. |
| /cd <path> | Move this session to a new working directory, keeping the conversation. |
| /chrome | Configure Claude in Chrome settings |
| /claude-api [migrate|upgrade|managed-agents-onboard|prompt-audit|cost-optimize] | Skill. |
| /clear [name] | Start a new conversation with empty context. |
| /code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [pr#|branch|path] | Skill. |
| /color [color|default] | Set the prompt bar color for the current session. |
| /compact [instructions] | Free up context by summarizing the conversation so far. |
| /config [key=value ...] | Open the Settings interface to adjust theme, model, output style, and other preferences. |
| /context [all] | Visualize current context usage as a colored grid. |
| /copy [N] | Copy the last assistant response to clipboard. |
| /cost | Alias for /usage |
| /dataviz [request] | Skill. |
| /debug [description] | Skill. |
| /deep-research <question> | Workflow. |
| /design [brief] | Skill. |
| /design-login | Authorize design-system access for /design-sync with your claude.ai account |
| /design-sync [hint] | Skill. |
| /desktop | Continue the current session in the Claude Code Desktop app. |
| /diff | Review the changes in your working tree, including the edits Claude has made so far. |
| /doctor | Skill. |
| /effort [level|auto|status] | Set the effort level: low to xhigh, max, ultracode, or auto; status prints it. |
| /exit | Exit the CLI. |
| /export [filename] | Export the current conversation as plain text. |
| /fast [on|off] | Toggle fast mode on or off. |
| /feedback [report] | Send product feedback about Claude Code. |
| /fewer-permission-prompts | Skill. |
| /focus | Toggle the focus view, which shows only your last prompt, a one-line tool-call summary with edit diffstats, and the final response. |
| /fork [prompt] | Copy the current conversation into a new background session and keep working here. |
| /goal [condition|clear] | Set a goal: Claude keeps working across turns until the condition is met or the goal clears for another reason. |
| /heapdump | Write a JavaScript heap snapshot and a memory breakdown to ~/Desktop, or your home directory on Linux without a Desktop folder, for diagnosing high memory usage. |
| /help | Show help and available commands |
| /hooks | View hook configurations for tool events |
| /ide | Manage IDE integrations and show status |
| /import [codex|gemini] [--dry-run] [--yes] | Bring configuration from other coding agents on your machine, currently OpenAI Codex and Google Gemini CLI, into Claude Code, including instruction files, MCP servers, commands, subagents, and skills. |
| /init | Initialize project with a CLAUDE.md guide. |
| /insights | Generate an HTML report analyzing your recent sessions on this machine: which projects you work in, how you use Claude Code, where things go wrong, and features to try. |
| /install-github-app | Install the Claude GitHub App for a repository, with an optional step to set up GitHub Actions workflows and secrets. |
| /install-slack-app | Install the Claude Slack app. |
| /keybindings | Open your keyboard shortcuts file |
| /list-agents | List the subagents, agent team teammates, and other Claude Code sessions Claude can message, with the name to use for each. |
| /login | Sign in to your Anthropic account |
| /logout | Sign out from your Anthropic account |
| /loop [interval] [prompt] | Skill. |
| /mcp [reconnect <server>|enable|disable [<server>|all]] | Manage MCP server connections and OAuth authentication. |
| /memory | Edit CLAUDE.md files, enable or disable auto memory, and view auto memory entries |
| /mobile | Show QR code to download the Claude mobile app. |
| /model [model] | Switch the AI model and save it as your default for new sessions. |
| /passes | Share a free week of Claude Code with friends. |
| /permissions | Manage allow, ask, and deny rules for tool permissions. |
| /plan [description] | Enter plan mode directly from the prompt. |
| /plugin [subcommand] | Manage Claude Code plugins. |
| /powerup | Discover Claude Code features through quick interactive lessons with animated demos |
| /pr-comments [PR] | Removed in v2.1.91. |
| /privacy-settings | View and update your privacy settings. |
| /radio | Open Claude FM lo-fi radio in your browser. |
| /rate-limit-options | Show ways to keep working when a claude.ai usage limit blocks a request: wait and continue automatically when the limit resets, add usage credits, or upgrade your plan. |
| /recap | Generate a one-line summary of the current session on demand. |
| /release-notes | View the changelog in an interactive version picker. |
| /reload-plugins [--force] | Reload all active plugins to apply pending changes without restarting. |
| /reload-skills | Re-scan skill and command directories so skills added or changed on disk during the session become available without restarting. |
| /remote-control | Make this session available for Remote Control from claude.ai. |
| /remote-env | Choose the default environment for cloud agents |
| /rename [name] | Rename the current session and show the name on the prompt bar. |
| /resume [session] | Resume a conversation by ID or name, or open the session picker. |
| /review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [pr#|branch|path] | Alias of /code-review: reviews the current diff, or a PR number, branch, or path you pass, such as /review 1234, and takes the same effort levels and flags. |
| /rewind | Rewind the conversation and/or code to a previous point, or summarize from a selected message. |
| /run | Skill. |
| /run-skill-generator | Skill. |
| /sandbox | Toggle sandbox mode. |
| /schedule [description] | Create, update, list, or run routines, which execute in the cloud. |
| /scroll-speed | Adjust mouse wheel scroll speed interactively, with a ruler you can scroll while the dialog is open to preview the change. |
| /security-review | Analyze the changes on your current branch for security vulnerabilities. |
| /setup-bedrock | Configure Amazon Bedrock authentication, region, and model pins through an interactive wizard. |
| /setup-vertex | Configure Google Cloud's Agent Platform authentication, project, region, and model pins through an interactive wizard. |
| /simplify [target] | Skill. |
| /skill-doctor | Show what each of your skills costs in context and how often it gets used, so you can find skills to turn off. |
| /skills | List available skills. |
| /stats | Alias for /usage. |
| /status | Open the Settings interface on the Status tab, showing version, model, account, and connectivity. |
| /statusline | Configure Claude Code's status line. |
| /stickers | Order Claude Code stickers |
| /stop | Stop the current background session. |
| /subtask <task> | Spawn a forked subagent: a background subagent that inherits the full conversation and works on the task while you keep working. |
| /tasks | View and manage background work in the current session, including subagents that have finished. |
| /team-onboarding | Generate a team onboarding guide from your Claude Code usage history. |
| /teleport | Pull a Claude Code on the web session into this terminal. |
| /terminal-setup | Install a Shift+Enter keybinding for newlines in VS Code, Cursor, Devin Desktop, Alacritty, or Zed. |
| /theme | Change the color theme. |
| /tui [default|fullscreen] | Set the terminal UI renderer and relaunch into it with your conversation intact. |
| /ultraplan <prompt> | Removed. |
| /ultrareview [PR or branch] | Run a deep, multi-agent code review in a cloud sandbox with ultrareview. |
| /upgrade | Open the upgrade page in your browser to switch to a higher plan tier. |
| /usage | Show session cost, plan usage limits, and activity stats. |
| /usage-credits | Configure usage credits, or request them from your admin, when you hit a limit. |
| /verify | Skill. |
| /vim | Removed in v2.1.92. |
| /voice [hold|tap|off] | Toggle voice dictation, or enable it in a specific mode. |
| /web-setup | Connect your GitHub account to Claude Code on the web using your local gh CLI credentials |
| /workflow-authoring | Skill. |
| /workflows | Open the workflow progress view to watch, pause, resume, or save running and completed workflows |
The 6 Claude Code commands to set up first
- Run
/permissionsonce, so approvals stop interrupting every run - Put
/contexton a habit: check it before you blame the prompt - Set
/effortdown for work that does not need the reasoning - Use
/btwinstead of stopping a run to ask something small - Name sessions with
/renameso/resumeis usable next week - Run
/doctoronce now, before the day you actually need it
Claude Code command questions
Have questions about Claude Code commands? Find answers to the most common ones below.
A Claude Code command is an instruction to the tool rather than to the model. You type `/` at the prompt and a menu opens.
Some are core commands built into Claude Code. Others are bundled skills, which you type exactly the same way.
Type `/` at the prompt and the menu opens with all of them.
Keep typing to filter. `/help` also lists them with what each one does, and the full list is on this page.
112 built in.
That count moves as versions ship, which is why this page is dated and the table is read from the reference rather than typed out by hand.
At the prompt, nothing: you type both the same way.
Underneath, core commands are built into Claude Code and bundled skills are loaded. The table on this page marks which is which.
`/context`.
It is the one that tells you why the session stopped working, and almost nobody runs it. It is also in the 16 most people never find.
`/clear` starts a new conversation with an empty context window. `/compact` keeps the conversation and summarises it to free space.
Use `/clear` when you move to a different task. Use `/compact` when you are still on the same one and it has just gone long.
Yes. Skills and plugins add their own, and they appear in the same menu.
That is also how a command becomes part of your AI OS rather than something you retype.
Mostly, but not entirely. Some are tied to where the session lives.
`/teleport` pulls a cloud session into your terminal, and `/remote-control` exposes a local one to another device. Neither makes sense in a surface that is already the other kind.
Because commands are added and removed between versions, and most lists of them are never checked again.
Run `claude --version`, then check the current reference. A command from an article 6 months old may simply be gone.
`/rewind`. It rolls the conversation and the code back to an earlier checkpoint.
Its aliases are `/checkpoint` and `/undo`, which is what most people search for first and why they never find it. More like it in secret commands.
It answers a side question without adding it to the conversation.
So you can ask something small while a long run continues, instead of cancelling the run to ask and losing the work.
They operate on the same session your AI OS is loaded into, so yes, in the sense that matters.
`/memory` edits the files directly, and `/context` shows you whether they loaded at all, which is the first thing to check when Claude seems to be ignoring them.
`/doctor`. It runs a setup checkup, reports installation and configuration problems, and can fix some of them.
Worth running once while nothing is wrong, so you know what its output looks like normally.