Claude Code Commands & Prompt Reference
111 commands & parameters · 2 categories · Source: Claude Code Docs — Commands reference
Claude Code ships with over a hundred built-in slash commands, and the surface keeps growing: session management, permissions, model switching, plugins, hooks, MCP servers, and diagnostics all live behind the / prefix. This page lists every built-in command from the official commands reference, plus the five input prefixes (/, !, @, :, ?) that change what the prompt box does. Keyboard shortcuts and CLI startup flags for Claude Code are kept separately on our Claude Code shortcuts page.
A practical way to learn the surface: /help prints the live command list for your version, /context and /cost tell you what the session is consuming, and /rewind, /fork, and /resume manage conversation state. Because commands can depend on your platform and plan, the in-product / menu is always the ground truth for what you can run today; this reference tells you what exists and what each command is for.
Also see: Claude Code keyboard shortcuts & CLI flags.
All Commands
Built-in Slash Commands (106)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /add-dir <path> | Add a working directory for file access during the current session | Type a partial path to see matching directory suggestions; press Tab to accept one. Most .claude/ configuration is not discovered from the added directory. |
| /advisor model|off | Enable or disable the advisor tool, which consults a second model for guidance at key moments during a task | Accepts fable, opus, sonnet, or a full model ID. fable requires Fable 5 access. |
| /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... | On v2.1.197 and earlier, opens an interactive interface for creating and managing subagent configurations |
| /autocompact auto|<tokens> | Set the auto-compact window: how full the context window gets before Claude Code compacts automatically | Pass a size such as 500k, or auto to return to the window tuned for your model. Claude Code saves the value to user settings and applies it to the current session. |
| /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 | Detects the open PR from your checked-out branch with gh pr view; to watch a different PR, check out its branch first. By default the cloud session is told to fix every CI failure and review... |
| /background prompt | Detach the current session to run as a background agent and free this terminal | Pass a prompt to send one more instruction before detaching. Monitor the session with claude agents. |
| /batch <instruction> | **Skill.** Orchestrate large-scale changes across a codebase in parallel | Researches the codebase, decomposes the work into 5 to 30 independent units, and presents a plan. Once approved, spawns one background subagent per unit in an isolated git worktree. |
| /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 | Switches you into the branch and preserves the original, which you can return to with /resume. To run a copy as a separate background session instead of switching into it, use /fork; to hand a... |
| /btw question | Ask a side question about the current session without adding to the conversation | If you run /btw without a question, Claude Code shows your most recent side question so you can browse earlier answers; if you haven't asked one yet, Claude Code prints a usage line. Before... |
| /bug report | Report a bug or share your conversation | You choose how much session history to include and confirm on a consent screen before anything is sent. When you're signed in to Anthropic on a first-party connection, the report goes to... |
| /cd <path> | Move this session to a new working directory, keeping the conversation and its prompt cache | Type a partial path to see matching directory suggestions; press Tab to accept one. Claude Code prompts you to trust the workspace if you haven't worked in it before, and --resume finds the moved... |
| /chrome | Configure Claude in Chrome settings | Type the command in the Claude Code prompt. |
| /claude-api migrate|managed-agents-onboard|prompt-audit | **Skill.** Load Claude API and Managed Agents reference material for your project's language | Also activates automatically when your code imports anthropic or @anthropic-ai/sdk. Run migrate to upgrade existing Claude API code to a newer model, managed-agents-onboard for a walkthrough that... |
| /clear name | Start a new conversation with empty context | Pass a name to label the previous conversation in the /resume picker. To free up context while continuing the same conversation, use /compact instead. |
| /code-review low|medium|high|xhigh|max|ultra --fix --comment pr#|branch|path | **Skill.** Review the current diff, or a PR number, branch, or path you pass, for correctness bugs and cleanup opportunities | Pass --fix to apply findings, --comment to post them as inline GitHub PR comments, or ultra to run a deep cloud review. With ultra on a github.com PR target, --post preselects posting the finished... |
| /color color|default | Set the prompt bar color for the current session | Available colors: red, blue, green, yellow, purple, orange, pink, cyan. Use default to reset, or run with no argument to pick a random color. |
| /compact instructions | Free up context by summarizing the conversation so far | Optionally pass focus instructions for the summary. See how compaction handles rules, skills, and memory files |
| /config key=value ... | Open the Settings interface to adjust theme, model, output style, and other preferences | From v2.1.181, pass one or more key=value pairs to set a setting directly without opening the interface, for example /config thinking=false. From v2.1.182, named shorthand keys are also accepted,... |
| /context all | Visualize current context usage as a colored grid | Shows optimization suggestions for context-heavy tools, memory bloat, and capacity warnings. When the conversation exceeds the context window, the output includes a warning showing how far over... |
| /copy N | Copy the last assistant response to clipboard | Pass a number N to copy the Nth-latest response: /copy 2 copies the second-to-last. When code blocks are present, shows an interactive picker to select individual blocks or the full response. |
| /cost | Alias for /usage | Type the command in the Claude Code prompt. |
| /dataviz request | **Skill.** Design guidance for charts, graphs, and dashboards | Claude picks the chart form for the data, assigns color by role, validates the palette for colorblind safety and contrast with a bundled script, and applies mark, interaction, and accessibility... |
| /debug description | **Skill.** Enable debug logging for the current session and troubleshoot issues by reading the session debug log | Debug logging is off by default unless you started with claude --debug, so running /debug mid-session starts capturing logs from that point forward. Optionally describe the issue to focus the analysis |
| /deep-research <question> | **Workflow.** Fan out web searches on a question, fetch and cross-check sources, and synthesize a cited report | Type the command in the Claude Code prompt. |
| /design-login | Authorize design-system access for /design-sync with your claude.ai account | Type the command in the Claude Code prompt. |
| /design-sync hint | **Skill.** Convert your repo's React design system and upload it to Claude Design, so designs it produces use your real components | Optionally name the design system, for example /design-sync Acme DS. A first-time sync verifies every component and can take a few hours on a large repo. |
| /desktop | Continue the current session in the Claude Code Desktop app | Requires macOS or x64 Windows and a Claude subscription. Alias: /app |
| /diff | Open an interactive diff viewer showing uncommitted changes and per-turn diffs | Use left/right arrows to switch between the current git diff and individual Claude turns, and up/down to browse files. Press Enter to open the selected file's diff, scroll it with up/down or... |
| /doctor | **Skill.** Run a setup checkup that diagnoses issues and can fix them | Checks installation health, including duplicate or leftover installs, PATH problems, and unparseable settings files. Finds unused skills, MCP servers, and plugins versus their context cost, flags... |
| /effort level|auto | Set the model effort level | Accepts low, medium, high, xhigh, max, or ultracode; available levels depend on the model, and max and ultracode are session-only. auto resets to the model default. |
| /exit | Exit the CLI | In an attached background session, this detaches and the session keeps running. Alias: /quit |
| /export filename | Export the current conversation as plain text | With a filename, writes directly to that file. Without, opens a dialog to copy to clipboard or save to a file |
| /fast on|off | Toggle fast mode on or off | Availability in non-interactive mode with -p is limited; see Toggle fast mode. Requires Claude Code v2.1.205 or later |
| /feedback report | Send product feedback about Claude Code | Opens the same dialog as /bug, with the same consent step, sending rules, and mid-turn behavior |
| /fewer-permission-prompts | **Skill.** Scan your transcripts for common read-only Bash and MCP tool calls, then add a prioritized allowlist to project... | Type the command in the Claude Code prompt. |
| /focus | Toggle the focus view, which shows only your last prompt, a one-line tool-call summary with edit diffstats, and the final response | The tool-call summary also counts the subagents launched in the turn and collapses completed background-task notifications into a single count. The selection persists across sessions; set viewMode... |
| /fork prompt | Copy the current conversation into a new background session and keep working here | Pass a prompt and the copy starts working on it immediately; without one it waits in agent view for its first prompt. Except when the copy edits in place, Claude Code instructs it to create a... |
| /goal condition|clear | Set a goal: Claude keeps working across turns until the condition is met or the goal clears for another reason | With no argument, shows the current or most recently achieved goal. clear, stop, off, reset, none, or cancel removes an active goal early |
| /heapdump | Write a JavaScript heap snapshot and a memory breakdown to ~/Desktop, or your home directory on Linux without a Desktop folder, for... | Attach only the -diagnostics.json file when reporting a memory issue; the .heapsnapshot contains your full conversation and credentials, so don't share it. Doesn't appear in the command menu; type... |
| /help | Show help and available commands | Type the command in the Claude Code prompt. |
| /hooks | View hook configurations for tool events | Type the command in the Claude Code prompt. |
| /ide | Manage IDE integrations and show status | Type the command in the Claude Code prompt. |
| /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... | In non-interactive mode with -p, /import lists what it found and gives you the command that confirms the import. Add --dry-run to preview without writing anything, or --yes to skip the interactive... |
| /init | Initialize project with a CLAUDE.md guide | Set CLAUDE_CODE_NEW_INIT=1 for an interactive flow that also walks through skills, hooks, and personal memory files. If /init finds configuration from a coding agent that /import supports, it... |
| /insights | Generate an HTML report analyzing your recent sessions on this machine: which projects you work in, how you use Claude Code, where... | Not available in cloud sessions. See Analyze your usage patterns for the report location, retention, and cost |
| /install-github-app | Install the Claude GitHub App for a repository, with an optional step to set up GitHub Actions workflows and secrets | Walks you through selecting a repo and configuring the integration |
| /install-slack-app | Install the Claude Slack app | Opens a browser to complete the OAuth flow |
| /keybindings | Open your keyboard shortcuts file | Type the command in the Claude Code prompt. |
| /list-agents | List the subagents and other Claude Code sessions Claude can message, with the name to use for each; agent team teammates aren't listed,... | See cross-session messaging. Also available as /peers. |
| /login | Sign in to your Anthropic account | Type the command in the Claude Code prompt. |
| /logout | Sign out from your Anthropic account | Type the command in the Claude Code prompt. |
| /loop interval prompt | **Skill.** Run a prompt repeatedly while the session stays open | Omit the interval and, where available, Claude self-paces between iterations. Omit the prompt and, where available, Claude runs an autonomous maintenance check or the prompt in .claude/loop.md. |
| /mcp reconnect <server>|enable|disable <server>|all | Manage MCP server connections and OAuth authentication | Run with no argument to open the interactive list, pass reconnect <server> to reconnect one disconnected server, or pass enable/disable with a server name or all to change connection state without... |
| /memory | Edit CLAUDE.md files, enable or disable auto memory, and view auto memory entries | Type the command in the Claude Code prompt. |
| /mobile | Show QR code to download the Claude mobile app | Aliases: /ios, /android |
| /model model | Switch the AI model and save it as your default for new sessions | For models that support it, use left/right arrows to adjust effort level. With no argument, opens a picker; press s on a row to switch for the current session only. |
| /passes | Share a free week of Claude Code with friends | Only visible if your account is eligible |
| /permissions | Manage allow, ask, and deny rules for tool permissions | Opens an interactive dialog where you can view rules by scope, add or remove rules, manage working directories, and review recent auto mode denials. When you run it while Claude is responding,... |
| /plan description | Enter plan mode directly from the prompt | Pass an optional description to enter plan mode and immediately start with that task, for example /plan fix the auth bug |
| /plugin subcommand | Manage Claude Code plugins | Run with no argument to open the plugin menu, or pass a subcommand such as list, install, enable, or disable to act directly. Claude Code can activate a plugin during the install; the install... |
| /powerup | Discover Claude Code features through quick interactive lessons with animated demos | Type the command in the Claude Code prompt. |
| /pr-comments PR | Removed in v2.1.91 | Ask Claude directly to view pull request comments instead. On earlier versions, fetches and displays comments from a GitHub pull request; automatically detects the PR for the current branch, or... |
| /privacy-settings | View and update your privacy settings | Only available for Pro and Max plan subscribers |
| /radio | Open Claude FM lo-fi radio in your browser | Prints the stream URL when no browser is available. Not available on Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, or Claude Platform on AWS |
| /recap | Generate a one-line summary of the current session on demand | See Session recap for the automatic recap that appears after you've been away |
| /release-notes | View the changelog in an interactive version picker | Select a specific version to see its release notes, or choose to show all versions. The notes appear in your transcript without entering the conversation Claude sees |
| /reload-plugins --force | Reload all active plugins to apply pending changes without restarting | Reports counts for each reloaded component and flags any load errors. When the reload would change which MCP tools are loaded and invalidate the prompt cache, the command warns and skips unless... |
| /reload-skills | Re-scan skill and command directories so skills added or changed on disk during the session become available without restarting | Reports how many skills are available and how many were added or removed. Added in v2.1.152 |
| /remote-control | Make this session available for Remote Control from claude.ai | Running it while signed out prints that Remote Control requires a claude.ai subscription and tells you how to sign in; before v2.1.206 it reported Unknown command: /remote-control. Alias: /rc |
| /remote-env | Choose the default environment for cloud agents | Type the command in the Claude Code prompt. |
| /rename name | Rename the current session and show the name on the prompt bar | Without a name, auto-generates one from conversation history. Also available in non-interactive mode (-p); requires Claude Code v2.1.205 or later. |
| /resume session | Resume a conversation by ID or name, or open the session picker | Background sessions appear in the picker marked with bg; one that is still running can't be resumed here, so attach to it from claude agents or stop it there first. Alias: /continue |
| /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... | With no level given, the review reuses the last low through max level you typed; see Review a diff locally for the exact rules. For a deep cloud review, use /code-review ultra. |
| /rewind | Rewind the conversation and/or code to a previous point, or summarize from a selected message | See checkpointing. Aliases: /checkpoint, /undo |
| /run | **Skill.** Launch and drive your project's app to see a change working, not only passing tests | See Run and verify your app. Requires Claude Code v2.1.145 or later |
| /run-skill-generator | **Skill.** Teach /run and /verify how to build, launch, and drive your project's app from a clean environment by writing a per-project skill | Requires Claude Code v2.1.145 or later |
| /sandbox | Toggle sandbox mode | Available on supported platforms only |
| /schedule description | Create, update, list, or run routines, which execute in the cloud | Claude walks you through the setup conversationally. You can also ask about a routine's recent runs. |
| /scroll-speed | Adjust mouse wheel scroll speed interactively, with a ruler you can scroll while the dialog is open to preview the change | Available in fullscreen rendering only and not in the JetBrains IDE terminal |
| /security-review | Analyze the changes on your current branch for security vulnerabilities | Reviews the diff between your branch and origin's default branch, identifying risks like injection, auth issues, and data exposure. Needs an origin remote; if the review fails with an ambiguous... |
| /setup-bedrock | Configure Amazon Bedrock authentication, region, and model pins through an interactive wizard | Only visible when CLAUDE_CODE_USE_BEDROCK=1 is set. First-time Amazon Bedrock users can also access this wizard from the login screen |
| /setup-vertex | Configure Google Cloud's Agent Platform authentication, project, region, and model pins through an interactive wizard | Only visible when CLAUDE_CODE_USE_VERTEX=1 is set. First-time Google Cloud's Agent Platform users can also access this wizard from the login screen |
| /simplify target | **Skill.** Review the changed code for cleanup opportunities and apply the fixes | Four review agents run in parallel, covering reuse of existing helpers, simplification, efficiency, and whether the change is at the right level of abstraction. From v2.1.154, the review doesn't... |
| /skills | List available skills | Type to filter the list by name. Press t to sort by token count. |
| /stats | Alias for /usage | Opens on the Stats tab |
| /status | Open the Settings interface on the Status tab, showing version, model, account, and connectivity | A Session kind row reads background job · attached or background job · unattended in a background session, depending on whether a terminal is attached, and interactive in any other session. Before... |
| /statusline | Configure Claude Code's status line | Describe what you want, or run without arguments to auto-configure from your shell prompt |
| /stickers | Order Claude Code stickers | Type the command in the Claude Code prompt. |
| /stop | Stop the current background session | Only available while attached to a background session; the transcript and any worktree are kept. To detach without stopping, use /exit or press ← |
| /subtask <task> | Spawn a forked subagent: a background subagent that inherits the full conversation and works on the task while you keep working | Its result returns to this conversation when it finishes. To copy the conversation into a separate background session instead, use /fork. |
| /tasks | View and manage background work in the current session, including subagents that have finished | Also available as /bashes |
| /team-onboarding | Generate a team onboarding guide from your Claude Code usage history | Claude analyzes your sessions, commands, and MCP server usage from the past 30 days and produces a markdown guide a teammate can paste as a first message to get set up quickly. For claude.ai... |
| /teleport | Pull a Claude Code on the web session into this terminal | Opens a picker, then fetches the branch and conversation. Also available as /tp. |
| /terminal-setup | Configure terminal keybindings for Shift+Enter and other shortcuts | Only visible in terminals that need it, like VS Code, Cursor, Devin Desktop, Alacritty, or Zed |
| /theme | Change the color theme | Includes an auto option that matches your terminal's light or dark background, light and dark variants, colorblind-accessible (daltonized) themes, ANSI themes that use your terminal's color... |
| /tui default|fullscreen | Set the terminal UI renderer and relaunch into it with your conversation intact | fullscreen enables the flicker-free alt-screen renderer. With no argument, prints the active renderer |
| /ultraplan <prompt> | Removed | Use plan mode instead. Previously sent a planning task to a Claude Code on the web session for review in your browser |
| /ultrareview PR or branch | Run a deep, multi-agent code review in a cloud sandbox with ultrareview | Pass a PR reference to review that pull request, or a branch name to change the comparison base. The preferred invocation is now /code-review ultra, and /ultrareview remains as an alias. |
| /upgrade | Open the upgrade page in your browser to switch to a higher plan tier | When the browser fails to open, the command shows a sign-in prompt without printing the URL |
| /usage | Show session cost, plan usage limits, and activity stats | On a Pro, Max, Team, or Enterprise plan, includes a breakdown of usage by skill, subagent, plugin, and MCP server. See the cost tracking guide for details. |
| /usage-credits | Configure usage credits, or request them from your admin, when you hit a limit | Opens your usage-credits billing settings in the browser, except that Team and Enterprise members without billing access instead send a usage-credits request to their admin from the CLI, after... |
| /verify | **Skill.** Confirm a code change does what it should by building your project's app, running it, and observing the result, rather than... | See Run and verify your app. Requires Claude Code v2.1.145 or later |
| /vim | Removed in v2.1.92 | To toggle between Vim and Normal editing modes, use /config → Editor mode |
| /voice hold|tap|off | Toggle voice dictation, or enable it in a specific mode | Requires a Claude.ai account |
| /web-setup | Connect your GitHub account to Claude Code on the web using your local gh CLI credentials | /schedule prompts for this automatically if GitHub isn't connected |
| /workflows | Open the workflow progress view to watch, pause, resume, or save running and completed workflows | Type the command in the Claude Code prompt. |
Prompt Input Prefixes (5)
| Command / Syntax | What it does | Notes |
|---|---|---|
| / (at start) | Run a command or skill | Shows built-in commands, skills, and plugin or MCP commands as you type. |
| ! (at start) | Shell mode: run a command directly | Adds its output to the session so Claude can respond to it. |
| @ | File path mention with autocomplete | Can also suggest other live sessions for cross-session messaging. |
| :name: | Insert an emoji by shortcode | Two or more characters after the colon shows suggestions. |
| ? (empty input) | Toggle the shortcut help panel | Typing ? with text present inserts the character instead. |
Frequently Asked Questions
How do I see which slash commands my Claude Code version supports?
Type / in the Claude Code prompt. The menu lists built-in commands, your skills, and commands contributed by plugins and MCP servers. Availability can depend on your platform and plan, so the in-product list is authoritative.
What is the difference between / and ! at the start of a message?
/ runs a command or skill. ! enters shell mode: the command runs directly, its output is added to the session, and Claude can respond to it.
Where did the Claude Code keyboard shortcuts go?
Keyboard shortcuts and CLI startup flags are on the Claude Code shortcuts page. This page covers only in-session commands and prompt input prefixes.
Every entry on this page is a literal, typeable token taken from the official documentation linked above. Command sets in AI tools change quickly - the in-product command menu is always authoritative for your installed version.