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.

Navid Moazzezby Navid MoazzezUpdated Sept. 7, 20266 min read

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.

CommandWhat it does
/initInitialize project with a CLAUDE.md guide.
/memoryEdit 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.
/permissionsManage 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.

CommandWhat 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.

CommandWhat it does
/tasksView 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.

CommandWhat it does
/diffReview 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-reviewAnalyze 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.

CommandWhat 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.
/teleportPull a Claude Code on the web session into this terminal.
/remote-controlMake 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.

CommandWhat it does
/rewindRewind the conversation and/or code to a previous point, or summarize from a selected message.
/doctorSkill.
/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.

CommandWhat 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.
/agentsAs 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.
/artifactsList 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-setupDraft 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.
/chromeConfigure 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.
/costAlias for /usage
/dataviz [request]Skill.
/debug [description]Skill.
/deep-research <question>Workflow.
/design [brief]Skill.
/design-loginAuthorize design-system access for /design-sync with your claude.ai account
/design-sync [hint]Skill.
/desktopContinue the current session in the Claude Code Desktop app.
/diffReview the changes in your working tree, including the edits Claude has made so far.
/doctorSkill.
/effort [level|auto|status]Set the effort level: low to xhigh, max, ultracode, or auto; status prints it.
/exitExit 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-promptsSkill.
/focusToggle 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.
/heapdumpWrite 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.
/helpShow help and available commands
/hooksView hook configurations for tool events
/ideManage 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.
/initInitialize project with a CLAUDE.md guide.
/insightsGenerate 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-appInstall the Claude GitHub App for a repository, with an optional step to set up GitHub Actions workflows and secrets.
/install-slack-appInstall the Claude Slack app.
/keybindingsOpen your keyboard shortcuts file
/list-agentsList the subagents, agent team teammates, and other Claude Code sessions Claude can message, with the name to use for each.
/loginSign in to your Anthropic account
/logoutSign out from your Anthropic account
/loop [interval] [prompt]Skill.
/mcp [reconnect <server>|enable|disable [<server>|all]]Manage MCP server connections and OAuth authentication.
/memoryEdit CLAUDE.md files, enable or disable auto memory, and view auto memory entries
/mobileShow QR code to download the Claude mobile app.
/model [model]Switch the AI model and save it as your default for new sessions.
/passesShare a free week of Claude Code with friends.
/permissionsManage allow, ask, and deny rules for tool permissions.
/plan [description]Enter plan mode directly from the prompt.
/plugin [subcommand]Manage Claude Code plugins.
/powerupDiscover Claude Code features through quick interactive lessons with animated demos
/pr-comments [PR]Removed in v2.1.91.
/privacy-settingsView and update your privacy settings.
/radioOpen Claude FM lo-fi radio in your browser.
/rate-limit-optionsShow 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.
/recapGenerate a one-line summary of the current session on demand.
/release-notesView the changelog in an interactive version picker.
/reload-plugins [--force]Reload all active plugins to apply pending changes without restarting.
/reload-skillsRe-scan skill and command directories so skills added or changed on disk during the session become available without restarting.
/remote-controlMake this session available for Remote Control from claude.ai.
/remote-envChoose 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.
/rewindRewind the conversation and/or code to a previous point, or summarize from a selected message.
/runSkill.
/run-skill-generatorSkill.
/sandboxToggle sandbox mode.
/schedule [description]Create, update, list, or run routines, which execute in the cloud.
/scroll-speedAdjust mouse wheel scroll speed interactively, with a ruler you can scroll while the dialog is open to preview the change.
/security-reviewAnalyze the changes on your current branch for security vulnerabilities.
/setup-bedrockConfigure Amazon Bedrock authentication, region, and model pins through an interactive wizard.
/setup-vertexConfigure Google Cloud's Agent Platform authentication, project, region, and model pins through an interactive wizard.
/simplify [target]Skill.
/skill-doctorShow what each of your skills costs in context and how often it gets used, so you can find skills to turn off.
/skillsList available skills.
/statsAlias for /usage.
/statusOpen the Settings interface on the Status tab, showing version, model, account, and connectivity.
/statuslineConfigure Claude Code's status line.
/stickersOrder Claude Code stickers
/stopStop 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.
/tasksView and manage background work in the current session, including subagents that have finished.
/team-onboardingGenerate a team onboarding guide from your Claude Code usage history.
/teleportPull a Claude Code on the web session into this terminal.
/terminal-setupInstall a Shift+Enter keybinding for newlines in VS Code, Cursor, Devin Desktop, Alacritty, or Zed.
/themeChange 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.
/upgradeOpen the upgrade page in your browser to switch to a higher plan tier.
/usageShow session cost, plan usage limits, and activity stats.
/usage-creditsConfigure usage credits, or request them from your admin, when you hit a limit.
/verifySkill.
/vimRemoved in v2.1.92.
/voice [hold|tap|off]Toggle voice dictation, or enable it in a specific mode.
/web-setupConnect your GitHub account to Claude Code on the web using your local gh CLI credentials
/workflow-authoringSkill.
/workflowsOpen the workflow progress view to watch, pause, resume, or save running and completed workflows

The 6 Claude Code commands to set up first

  • Run /permissions once, so approvals stop interrupting every run
  • Put /context on a habit: check it before you blame the prompt
  • Set /effort down for work that does not need the reasoning
  • Use /btw instead of stopping a run to ask something small
  • Name sessions with /rename so /resume is usable next week
  • Run /doctor once 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.