Skip to main content
Commands control Claude Code from inside a session. They provide a quick way to switch models, manage permissions, clear context, run a workflow, and more. Type / to see every command available to you, or type / followed by letters to filter. The table below lists all the commands included in Claude Code. Entries marked Skill are bundled skills. They use the same mechanism as skills you write yourself: a prompt handed to Claude, which Claude can also invoke automatically when relevant. Everything else is a built-in command whose behavior is coded into the CLI. To add your own commands, see skills. Not every command appears for every user. Availability depends on your platform, plan, and environment. For example, /desktop only shows on macOS and Windows, and /upgrade only shows on Pro and Max plans. In the table below, <arg> indicates a required argument and [arg] indicates an optional one.
CommandPurpose
/add-dir <path>Add a working directory for file access during the current session. Most .claude/ configuration is not discovered from the added directory
/agentsManage agent configurations
/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 remote session is told to fix every CI failure and review comment; pass a prompt to give it different instructions, for example /autofix-pr only fix lint and type errors. Requires the gh CLI and access to Claude Code on the web
/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 agent per unit in an isolated git worktree. Each agent implements its unit, runs tests, and opens a pull request. Requires a git repository. Example: /batch migrate src/ from Solid to React
/btw <question>Ask a quick side question without adding to the conversation
/chromeConfigure Claude in Chrome settings
/claude-apiSkill. Load Claude API reference material for your project’s language (Python, TypeScript, Java, Go, Ruby, C#, PHP, or cURL) and Managed Agents reference. Covers tool use, streaming, batches, structured outputs, and common pitfalls. Also activates automatically when your code imports anthropic or @anthropic-ai/sdk
/clearClear conversation history and free up context. Aliases: /reset, /new
/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
/compact [instructions]Compact conversation with optional focus instructions
/configOpen the Settings interface to adjust theme, model, output style, and other preferences. Alias: /settings
/contextVisualize current context usage as a colored grid. Shows optimization suggestions for context-heavy tools, memory bloat, and capacity warnings
/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. Press w in the picker to write the selection to a file instead of the clipboard, which is useful over SSH
/costShow token usage statistics. See cost tracking guide for subscription-specific details
/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
/desktopContinue the current session in the Claude Code Desktop app. macOS and Windows only. Alias: /app
/diffOpen 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
/doctorDiagnose and verify your Claude Code installation and settings
/effort [low|medium|high|max|auto]Set the model effort level. low, medium, and high persist across sessions. max applies to the current session only and requires Opus 4.6. auto resets to the model default. Without an argument, shows the current level. Takes effect immediately without waiting for the current response to finish
/exitExit the CLI. 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
/extra-usageConfigure extra usage to keep working when rate limits are hit
/fast [on|off]Toggle fast mode on or off
/feedback [report]Submit feedback about Claude Code. Alias: /bug
/branch [name]Create a branch of the current conversation at this point. Alias: /fork
/helpShow help and available commands
/hooksView hook configurations for tool events
/ideManage IDE integrations and show status
/initInitialize 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
/insightsGenerate a report analyzing your Claude Code sessions, including project areas, interaction patterns, and friction points
/install-github-appSet up the Claude GitHub Actions app for a repository. Walks you through selecting a repo and configuring the integration
/install-slack-appInstall the Claude Slack app. Opens a browser to complete the OAuth flow
/keybindingsOpen or create your keybindings configuration file
/loginSign in to your Anthropic account
/logoutSign out from your Anthropic account
/loop [interval] [prompt]Skill. Run a prompt repeatedly while the session stays open. Omit the interval and Claude self-paces between iterations. Omit the prompt and Claude runs an autonomous maintenance check, or the prompt in .claude/loop.md if present. Example: /loop 5m check if the deploy finished. See Run prompts on a schedule
/mcpManage MCP server connections and OAuth authentication
/memoryEdit CLAUDE.md memory files, enable or disable auto-memory, and view auto-memory entries
/mobileShow QR code to download the Claude mobile app. Aliases: /ios, /android
/model [model]Select or change the AI model. For models that support it, use left/right arrows to adjust effort level. The change takes effect immediately without waiting for the current response to finish
/passesShare a free week of Claude Code with friends. Only visible if your account is eligible
/permissionsManage 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. Alias: /allowed-tools
/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
/pluginManage Claude Code plugins
/powerupDiscover Claude Code features through quick interactive lessons with animated demos
/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 pass a PR URL or number. Requires the gh CLI
/privacy-settingsView and update your privacy settings. Only available for Pro and Max plan subscribers
/release-notesView the changelog in an interactive version picker. Select a specific version to see its release notes, or choose to show all versions
/reload-pluginsReload all active plugins to apply pending changes without restarting. Reports counts for each reloaded component and flags any load errors
/remote-controlMake this session available for remote control from claude.ai. Alias: /rc
/remote-envConfigure the default remote environment for web sessions started with --remote
/rename [name]Rename the current session and show the name on the prompt bar. Without a name, auto-generates one from conversation history
/resume [session]Resume a conversation by ID or name, or open the session picker. Alias: /continue
/reviewDeprecated. Install the code-review plugin instead: claude plugin install code-review@claude-plugins-official
/rewindRewind the conversation and/or code to a previous point, or summarize from a selected message. See checkpointing. Alias: /checkpoint
/sandboxToggle sandbox mode. Available on supported platforms only
/schedule [description]Create, update, list, or run Cloud scheduled tasks. Claude walks you through the setup conversationally
/security-reviewAnalyze pending changes on the current branch for security vulnerabilities. Reviews the git diff and identifies risks like injection, auth issues, and data exposure
/setup-bedrockConfigure Amazon Bedrock authentication, region, and model pins through an interactive wizard. Only visible when CLAUDE_CODE_USE_BEDROCK=1 is set. First-time Bedrock users can also access this wizard from the login screen
/setup-vertexConfigure Google Vertex AI authentication, project, region, and model pins through an interactive wizard. Only visible when CLAUDE_CODE_USE_VERTEX=1 is set. First-time Vertex AI users can also access this wizard from the login screen
/simplify [focus]Skill. Review your recently changed files for code reuse, quality, and efficiency issues, then fix them. Spawns three review agents in parallel, aggregates their findings, and applies fixes. Pass text to focus on specific concerns: /simplify focus on memory efficiency
/skillsList available skills
/statsVisualize daily usage, session history, streaks, and model preferences
/statusOpen the Settings interface (Status tab) showing version, model, account, and connectivity. Works while Claude is responding, without waiting for the current response to finish
/statuslineConfigure Claude Code’s status line. Describe what you want, or run without arguments to auto-configure from your shell prompt
/stickersOrder Claude Code stickers
/tasksList and manage background tasks. Also available as /bashes
/teleportPull a Claude Code on the web session into this terminal: opens a picker, then fetches the branch and conversation. Also available as /tp. Requires a claude.ai subscription
/terminal-setupConfigure terminal keybindings for Shift+Enter and other shortcuts. Only visible in terminals that need it, like VS Code, Alacritty, or Warp
/themeChange the color theme. Includes light and dark variants, colorblind-accessible (daltonized) themes, and ANSI themes that use your terminal’s color palette
/ultraplan <prompt>Draft a plan in an ultraplan session, review it in your browser, then execute remotely or send it back to your terminal
/upgradeOpen the upgrade page to switch to a higher plan tier
/usageShow plan usage limits and rate limit status
/vimRemoved in v2.1.92. To toggle between Vim and Normal editing modes, use /config → Editor mode
/voiceToggle push-to-talk voice dictation. Requires a Claude.ai account
/web-setupConnect 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

MCP prompts

MCP servers can expose prompts that appear as commands. These use the format /mcp__<server>__<prompt> and are dynamically discovered from connected servers. See MCP prompts for details.

See also