Claude Code Commands
Search Claude Code slash commands, terminal flags, and keyboard shortcuts. Find commands for context, Git, permissions, MCP, plugins, and session management.
Type / in a Claude Code session to open its command picker. Commands that start with claude run in your terminal, and flags modify how that process starts. Open the documentation beside a command for its arguments and availability.
This directory capture is dated 3 December 2026. Your installed version and plan determine which commands are available. Claude Code command documentation
225 reference entries
Top 15 commands to learn first
| Command | Use | Example | Details |
|---|---|---|---|
/init | Read the repository and create initial CLAUDE.md guidance for its structure, commands and conventions. | /init | Command details |
/plan | Enter the read-only planning phase and optionally give Claude the change to investigate. | /plan add rate limiting to the public API | Command details |
/clear | Begin with an empty context and optionally label the prior conversation for easy retrieval. | /clear auth-refactor | Command details |
/compact | Replace earlier conversation detail with a compact summary. Include the filenames or decisions that need to survive. | /compact keep the failing test names and the fix plan | Command details |
/context | Inspect the context cost of messages, tools and memory. Pass all to reveal the individual items. | /context | Command details |
/resume | Reopen a previous conversation by name or ID, or select one from the displayed list. | /resume auth-refactor | Command details |
/rewind | Open checkpoints and choose whether to restore files, conversation context or both. | /rewind | Command details |
/model | Select a supported model, using either the picker or a supplied name. The picker offers session-only selection. | /model sonnet | Command details |
/diff | Inspect all current uncommitted changes, including edits made outside the assistant session. | /diff | Command details |
/code-review | Review the working diff or a specified branch, path or pull request. Select effort and explicitly request edits or external comments when needed. | /code-review high 1234 | Command details |
/btw | Ask a short question in a side panel. Its response stays outside the history used for the main task. | /btw what does the -z flag in grep do? | Command details |
/mcp | Inspect MCP status and sign-ins. Reconnect, turn on or turn off the named servers. | /mcp reconnect github | Command details |
/memory | Review or edit the instructions and saved memory Claude loads into a session. | /memory | Command details |
/permissions | Inspect and change scoped allow, ask and deny rules and additional working directories. | /permissions | Command details |
/usage | Inspect recent activity, available limits and costs for the session and eligible plan. | /usage | Command details |
Sessions and context
| Command | Use | Aliases | Documentation |
|---|---|---|---|
/add-dir <path> | Add another directory to the current session's working scope without changing the primary project. | — | Official docs |
/autocompact [auto|<tokens>] | View or save the context threshold that triggers automatic summarization. Use auto to restore the model default. | — | Official docs |
/branch [name] | Copy the conversation at its current point and move into the copy. The earlier branch remains available from the session picker. | — | Official docs |
/btw [question] | Ask a short question in a side panel. Its response stays outside the history used for the main task. | — | Official docs |
/cd <path> | Make another folder the session's primary working directory while retaining the conversation. | — | Official docs |
/clear [name] | Begin with an empty context and optionally label the prior conversation for easy retrieval. | /reset, /new | Official docs |
/compact [instructions] | Replace earlier conversation detail with a compact summary. Include the filenames or decisions that need to survive. | — | Official docs |
/context [all] | Inspect the context cost of messages, tools and memory. Pass all to reveal the individual items. | — | Official docs |
/copy [N] | Copy an answer to the clipboard. Supply its position to select an earlier response or choose a code block where offered. | — | Official docs |
/exit | Close the interactive session. If attached to a background agent, detach while its work continues. | /quit | Official docs |
/export [filename] | Save the conversation as plain text, or choose clipboard or file output interactively. | — | Official docs |
/recap | Read a short status line about what the current session has been doing. | — | Official docs |
/rename [name] | Give the session a label for the prompt bar and resume list, or accept a suggested name. | — | Official docs |
/resume [session] | Reopen a previous conversation by name or ID, or select one from the displayed list. | /continue | Official docs |
/rewind | Open checkpoints and choose whether to restore files, conversation context or both. | /checkpoint, /undo | Official docs |
/stop | Stop the attached background agent while keeping its transcript and associated worktree. | — | Official docs |
Planning and agents
| Command | Use | Aliases | Documentation |
|---|---|---|---|
/agents | Get guidance for creating and editing project or personal subagents in their definition files. | — | Official docs |
/background [prompt] | Detach the current conversation and let it work in the background, optionally with one final instruction. | /bg | Official docs |
/batch <instruction> | Plan a large change as independent tasks. After approval, Claude can assign them to separate Git worktrees. | — | Official docs |
/deep-research <question> | Start a background workflow that compares web sources and builds a sourced research report. | — | Official docs |
/fork [prompt] | Create a separate background conversation from the current state without switching out of this session. | — | Official docs |
/goal [condition|clear] | Set a completion condition across turns, inspect the active condition or clear it. | — | Official docs |
/list-agents | Inspect available peers for messaging, including teammates, subagents and local sessions when enabled. | /peers | Official docs |
/loop [interval] [prompt] | Repeat the request during this open session at the interval provided or using the session's pacing. | /proactive | Official docs |
/plan [description] | Enter the read-only planning phase and optionally give Claude the change to investigate. | — | Official docs |
/schedule [description] | Create or review cloud routines for recurring work that needs to run independently of this terminal. | /routines | Official docs |
/subtask <task> | Delegate a bounded side task to a background subagent and receive its result here. | — | Official docs |
/tasks | Inspect active and finished background shells and subagent work in the current session. | /bashes | Official docs |
/workflow-authoring | Load the guidance for writing or editing reusable multi-agent workflow scripts. | — | Official docs |
/workflows | See ongoing and completed workflows and use the panel to pause, resume or save them. | — | Official docs |
Review and verify
| Command | Use | Aliases | Documentation |
|---|---|---|---|
/autofix-pr [prompt] | Send approved review or CI follow-up for the current branch's pull request to a cloud session. Add a prompt to narrow what it may fix. | — | Official docs |
/code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [pr#|branch|path] | Review the working diff or a specified branch, path or pull request. Select effort and explicitly request edits or external comments when needed. | /review | Official docs |
/diff | Inspect all current uncommitted changes, including edits made outside the assistant session. | — | Official docs |
/review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [pr#|branch|path] | Run the same review workflow as /code-review with its effort and targeting options. | — | Official docs |
/run | Start and drive the application so you can observe the behavior of a proposed change. | — | Official docs |
/run-skill-generator | Write a project-specific launch procedure that the run and verification skills can reuse. | — | Official docs |
/security-review | Inspect a branch diff for defensive security concerns. The captured reference indicates the range is determined using the origin remote. | — | Official docs |
/simplify [target] | Review recently changed code for avoidable complexity or duplication and apply suitable cleanups to the selected scope. | — | Official docs |
/ultrareview [PR or branch] | Request the cloud review mode for a branch or pull request. The captured guide treats /code-review ultra as the preferred spelling. | — | Official docs |
/verify | Build or run the application and exercise the changed behavior through its normal user path. | — | Official docs |
Project setup and memory
| Command | Use | Aliases | Documentation |
|---|---|---|---|
/claude-api [migrate|upgrade|managed-agents-onboard|prompt-audit|cost-optimize|build-eval|hillclimb] | Load Claude API and SDK guidance or start a supported workflow for migrations, prompt review, evaluation or usage. | — | Official docs |
/fewer-permission-prompts | Review repeatedly approved read-only commands in past sessions and prepare narrowly scoped project rules for them. | — | Official docs |
/hooks | Inspect the lifecycle hooks in effect and where each hook's configuration is defined. | — | Official docs |
/import [codex|gemini|cursor] [--dry-run] [--yes] | Bring supported settings and reusable instructions from another coding tool. Use a dry run to inspect the proposed import. | — | Official docs |
/init | Read the repository and create initial CLAUDE.md guidance for its structure, commands and conventions. | — | Official docs |
/memory | Review or edit the instructions and saved memory Claude loads into a session. | — | Official docs |
/reload-skills | Rescan commands and skill directories so the open session can see package changes. | — | Official docs |
/skill-doctor | Compare skill context cost with usage and identify skills to review or turn off. | — | Official docs |
/skills | Find available skills and manage whether the selected entries appear to Claude and in the command menu. | — | Official docs |
/team-onboarding | Draft a teammate setup guide from the previously used commands, sessions and integrations. | — | Official docs |
Models and settings
| Command | Use | Aliases | Documentation |
|---|---|---|---|
/advisor [model|off] | Choose a model Claude can consult for strategic input during a task, or turn the advisor off. | — | Official docs |
/auto-mode-setup | Prepare suggested environment rules for auto mode from the repository and recent sessions, then review them before saving. | — | Official docs |
/color [color|default] | Change the prompt bar color for this conversation and reset to the default when needed. | — | Official docs |
/config [key=value ...] | Open the configuration panel or apply supported key-value settings directly. | /settings | Official docs |
/effort [level|auto|status] | Select a supported effort level, restore automatic behavior or inspect the current choice. | — | Official docs |
/fast [on|off] | Toggle the lower-latency, higher-priced mode when the current model supports it. | — | Official docs |
/focus | Toggle fullscreen's simplified turn view with the prompt, a condensed tool summary and answer. | — | Official docs |
/keybindings | Open the user's shortcut configuration for editing. | — | Official docs |
/model [model] | Select a supported model, using either the picker or a supplied name. The picker offers session-only selection. | — | Official docs |
/output-style [style] | Show or select a response style such as a more compact output format. | — | Official docs |
/permissions | Inspect and change scoped allow, ask and deny rules and additional working directories. | /allowed-tools | Official docs |
/sandbox | Toggle command sandboxing on a supported platform. | — | Official docs |
/scroll-speed | Adjust the mouse-wheel speed in a supported fullscreen terminal and see the effect before closing the panel. | — | Official docs |
/statusline | Configure which session or project details appear in the terminal status bar. | — | Official docs |
/terminal-setup | Set up supported terminal keybindings or platform settings for inserting a newline. | — | Official docs |
/theme | Choose the interface's color theme, including custom and accessible options where available. | — | Official docs |
/tui [default|fullscreen] | Switch the renderer while keeping the current conversation. | — | Official docs |
/update-config [request] | Describe a settings change and let Claude locate the applicable configuration file. | — | Official docs |
MCP, plugins and integrations
| Command | Use | Aliases | Documentation |
|---|---|---|---|
/artifacts | See available artifacts and select one to attach, open or share on supporting sessions. | — | Official docs |
/chrome | Manage the Claude in Chrome extension connection for browser-assisted work. | — | Official docs |
/dataviz [request] | Apply the bundled guidance for chart selection, dashboard design and accessible labeling. | — | Official docs |
/design [brief] | Draft an editable browser-based design from a description and export a visual where artifacts are supported. | — | Official docs |
/design-login | Authorize the Claude account used for uploading a design system. | — | Official docs |
/design-sync [hint] | Prepare React repository components for use in Claude Design using the design-system synchronization workflow. | — | Official docs |
/ide | Check or manage connections to supported development environments and their active files. | — | Official docs |
/install-github-app | Start the authorized workflow for connecting a GitHub repository and any selected Claude Actions configuration. | — | Official docs |
/install-slack-app | Open the browser flow for adding Claude to a Slack workspace. | — | Official docs |
/mcp [reconnect <server>|enable|disable [<server>|all]] | Inspect MCP status and sign-ins. Reconnect, turn on or turn off the named servers. | — | Official docs |
/plugin [subcommand] | Browse available plugins and install, enable, disable or list them. | — | Official docs |
/reload-plugins [--force] | Refresh active plugins without restarting. Forced changes can reload the tool set and reset cached context. | — | Official docs |
Cloud and other devices
| Command | Use | Aliases | Documentation |
|---|---|---|---|
/desktop | Move the current conversation into the supported Claude Code desktop app. | /app | Official docs |
/mobile | Display a QR code for finding the Claude mobile app. | /ios, /android | Official docs |
/remote-control | Enable continuing this session through the supported web or mobile interface. | /rc | Official docs |
/remote-env | Select the environment that new remote sessions will use by default. | — | Official docs |
/setup-bedrock | Open provider-specific setup for credentials, region and model when the Bedrock mode is enabled. | — | Official docs |
/setup-vertex | Configure the Google Cloud project, region and available model when Vertex AI mode is active. | — | Official docs |
/teleport | Bring a selected remote session, its code branch and its conversation back to the terminal. | /tp | Official docs |
/web-setup | Connect the GitHub identity used by Claude Code cloud sessions. | — | Official docs |
Account and usage
| Command | Use | Aliases | Documentation |
|---|---|---|---|
/cost | Open the usage panel for costs and plan limits. | — | Official docs |
/insights | Build a local HTML report about recent Claude Code use, recurring problems and possible workflow improvements. | — | Official docs |
/login | Authenticate a Claude account or switch the signed-in identity. | — | Official docs |
/logout | Sign the current Claude account out of this machine. | — | Official docs |
/passes | View options for sharing trial access if the account is eligible. | — | Official docs |
/privacy-settings | Review the account privacy settings available to supported plans. | — | Official docs |
/rate-limit-options | See options for waiting, resuming after limits reset, buying credits or changing plan when the account qualifies. | — | Official docs |
/stats | Open the activity view in the usage panel. | — | Official docs |
/status | Check the current version, account, model and connectivity. | — | Official docs |
/upgrade | Open the provider's page for changing the current subscription plan. | — | Official docs |
/usage | Inspect recent activity, available limits and costs for the session and eligible plan. | — | Official docs |
/usage-credits | Open credit management or request purchase approval from a billing administrator. | — | Official docs |
Help and troubleshooting
| Command | Use | Aliases | Documentation |
|---|---|---|---|
/bug [report] | Prepare an issue report and decide what session context to include before sharing it. | /share | Official docs |
/debug [description] | Begin or focus debug logging for a problem noticed in the current session. | — | Official docs |
/doctor | Check the installation, path, settings and runtime health and review proposed fixes before applying them. | /checkup | Official docs |
/feedback [report] | Prepare product feedback or review and edit any existing drafts before sending. | — | Official docs |
/heapdump | Save diagnostics for a memory issue. Review the separate diagnostics report for sharing because the snapshot can contain private session data. | — | Official docs |
/help | List help and the commands available in this installation. | — | Official docs |
/powerup | Open short interactive walkthroughs of Claude Code features. | — | Official docs |
/release-notes | Read the changelog for a selected version without changing the current conversation context. | — | Official docs |
Extras
| Command | Use | Aliases | Documentation |
|---|---|---|---|
/radio | Open the Claude FM stream or display a link if a browser is unavailable. | — | Official docs |
/stickers | Open the order page for Claude Code stickers. | — | Official docs |
/voice [hold|tap|off] | Choose hold-to-talk, tap-to-toggle or disabled dictation on a supported account. | — | Official docs |
Terminal commands
| Command or flag | Use |
|---|---|
claude | Open an interactive Claude Code conversation rooted in the current folder. |
claude "query" | Launch the interactive session and submit the quoted text as its first request. |
claude -p "query" | Process one request in print mode, write the answer and leave the process. |
cat file | claude -p "query" | Supply file text or command output on standard input for a print-mode request. |
claude -c | Reopen the most recent conversation associated with the current folder. |
claude -c -p "query" | Send a new request to the last conversation and return its answer without opening the interactive UI. |
claude -r "<session>" "query" | Continue the selected saved session and immediately send a request. |
claude update | Check for and install the available Claude Code release. |
claude gateway | Start the administrator-managed gateway used by certain supported model providers. |
claude install [version] | Install or repair the native client, optionally choosing a release or release channel. |
claude auth login | Sign in to the client and choose Console billing if that is the intended account. |
claude auth logout | Remove the current Claude sign-in from this installation. |
claude auth status | Print whether the client is authenticated, in machine-readable or plain text form. |
claude agents | Open the view for monitoring background jobs and sending further instructions. |
claude attach <id> | Connect this terminal to the selected background session. |
claude auto-mode defaults | Print the shipped auto-mode rule configuration in JSON. |
claude auto-mode reset | Replace customized auto-mode rules with the defaults. |
claude daemon status | Inspect whether the process supervising background sessions is running. |
claude daemon stop --any | Stop the background supervisor to end or troubleshoot its process. |
claude doctor | Report installation and configuration issues directly from the shell without opening an interactive session. |
claude import [source] | Copy supported settings from an existing coding client. |
claude logs <id> | Read recent output from the selected background job. |
claude mcp | Open the shell interface for listing and changing server registrations. |
claude mcp login <name> | Start authentication for the MCP server registered under that name. |
claude mcp logout <name> | Remove the saved authorization for the named MCP server. |
claude plugin | Manage Claude Code plugins and marketplace configuration from the terminal. |
claude project purge [path] | Remove local conversation and history data for the selected project. Verify the path before using a destructive command. |
claude remote-control | Start the process that makes local work available from supported mobile or web clients. |
claude respawn <id> | Restart a background job using the saved conversation it already had. |
claude rm <id> | Remove a selected background session from the agent list. |
claude self-hosted-runner | Run Claude Code cloud jobs using infrastructure your organization manages. |
claude setup-token | Produce a reusable authentication grant for approved scripts or CI. Store it through the project's credential store. |
claude stop <id> | End the background job with the supplied identifier. |
claude ultrareview [target] | Submit the requested target for cloud code review and print its results. |
Common command-line flags
| Command or flag | Use |
|---|---|
--print, -p | Use a noninteractive request and send the resulting answer to standard output. |
--continue, -c | Restore the most recent conversation for the working directory. |
--resume, -r | Select an earlier session by name or ID, or use the session picker. |
--model | Select the model name or identifier for this run. |
--effort | Set the supported reasoning effort that applies during this session. |
--permission-mode | Choose the starting permission policy, such as plan mode. |
--worktree, -w | Open in a separate Git worktree so changes stay isolated. |
--add-dir | Allow this session to work with one or more additional directories. |
--allowed-tools | Set the specific tools or commands approved without a new prompt. |
--output-format | Choose text or a machine-readable output format for print mode. |
--max-turns | Limit how many agent iterations a print-mode run may take. |
--mcp-config | Load MCP connection definitions from the specified JSON input. |
--append-system-prompt | Add project or workflow instructions to the usual system prompt. |
--bg, --background | Launch a background session and return control to the shell. |
--safe-mode | Run without customizations to help isolate configuration problems. |
Keyboard shortcuts and input prefixes
| Key or prefix | Use |
|---|---|
/ at start | Open the command or skill picker. |
! at start | Enter shell command mode for the prompt. |
@ | Mention a file path in the request. |
: | Begin an emoji shortcode. |
? on empty input | Open or close the keyboard help panel. |
\ + Enter | Insert a new line in a regular terminal prompt. |
Option+Enter | Insert a new line after setting macOS Option to work as Meta. |
Shift+Enter | Insert a new line where the terminal forwards this shortcut. |
Ctrl+J | Add a new line without submitting the request. |
Paste directly | Insert a multiline code block or log into the current input. |
Ctrl+C | Interrupt the active operation or clear the current input. |
Ctrl+X Ctrl+K | End background subagents for this conversation and stop artifact auto-replies in the session. |
Ctrl+D | Leave the Claude Code session. |
Ctrl+G or Ctrl+X Ctrl+E | Edit the current prompt in the default editor. |
Ctrl+L | Refresh the terminal's displayed screen. |
Ctrl+O | Switch the transcript view on or off. |
Ctrl+R | Search backward through earlier prompts. |
Ctrl+V or Cmd+V (iTerm2) or Alt+V (Windows and WSL) | Paste a clipboard image using the shortcut for the terminal. |
Ctrl+B | Move selected running work to the background. |
Ctrl+T | Show or hide the current to-do checklist. |
Ctrl+S | Put aside the current prompt or bring back a stashed one. |
Ctrl+Z | Suspend the terminal process where supported. |
Left/Right arrows | Move between tabs in a dialog. |
Tab | Accept the suggested completion or open the comment option in a permission dialog. |
Up/Down arrows or Ctrl+P/Ctrl+N | Move in a multiline prompt or step through prompt history. |
Esc | Close an open dialog or interrupt the current response. |
Esc + Esc | Clear the unsent draft or open the checkpoint view for an empty prompt. |
Ctrl+Enter or Ctrl+X Ctrl+S | Submit messages currently waiting in the input queue. |
Shift+Tab, or Alt+M on Windows when the Node or Bun runtime doesn't enable VT input mode | Rotate between permission modes using the shortcut your runtime supports. |
Option+P (macOS) or Alt+P (Windows/Linux) | Open the model picker from the terminal. |
Option+T (macOS) or Alt+T (Windows/Linux) | Change the extended thinking toggle when available. |
Option+O (macOS) or Alt+O (Windows/Linux) | Toggle the supported fast response mode. |
Ctrl+A | Move the insertion point before the first character on the line. |
Ctrl+E | Place the cursor after the last character on the line. |
Ctrl+K | Cut characters after the cursor through the end of the line. |
Ctrl+U | Cut characters before the cursor through the beginning of the line. |
Ctrl+W | Delete to the preceding word boundary. |
Ctrl+Y | Reinsert recently cut text. |
Alt+Y (after Ctrl+Y) | Rotate through previously cut text after using Ctrl+Y. |
Alt+B | Move to the previous word boundary. |
Alt+F | Move to the next word boundary. |
Alt+D | Delete forward through the end of the word. |
Ctrl+_ or Ctrl+Shift+- | Undo the most recent prompt edit. |
Removed commands and common mix-ups
| Command | Current status |
|---|---|
/pr-comments | This legacy command was removed in the version listed by the directory. Ask Claude to summarize the pull request comments directly. |
/ultraplan | Use regular plan mode for the workflow once handled by this retired cloud planning command. |
/vim | Choose the preferred editor mode in /config after removal of this older shortcut. |
/redo | To return farther forward in available session history, pick the later checkpoint through /rewind. |
/history | Use Ctrl+R for past prompts or /resume to choose an earlier conversation. |
/search | Use prompt history search or open the fullscreen transcript to find text within the conversation. |
/todos | Use Ctrl+T to toggle the task checklist. /tasks is for background work. |