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

Top 15 commands to learn first
CommandUseExampleDetails
/initRead the repository and create initial CLAUDE.md guidance for its structure, commands and conventions./initCommand details
/planEnter the read-only planning phase and optionally give Claude the change to investigate./plan add rate limiting to the public APICommand details
/clearBegin with an empty context and optionally label the prior conversation for easy retrieval./clear auth-refactorCommand details
/compactReplace 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 planCommand details
/contextInspect the context cost of messages, tools and memory. Pass all to reveal the individual items./contextCommand details
/resumeReopen a previous conversation by name or ID, or select one from the displayed list./resume auth-refactorCommand details
/rewindOpen checkpoints and choose whether to restore files, conversation context or both./rewindCommand details
/modelSelect a supported model, using either the picker or a supplied name. The picker offers session-only selection./model sonnetCommand details
/diffInspect all current uncommitted changes, including edits made outside the assistant session./diffCommand details
/code-reviewReview 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 1234Command details
/btwAsk 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
/mcpInspect MCP status and sign-ins. Reconnect, turn on or turn off the named servers./mcp reconnect githubCommand details
/memoryReview or edit the instructions and saved memory Claude loads into a session./memoryCommand details
/permissionsInspect and change scoped allow, ask and deny rules and additional working directories./permissionsCommand details
/usageInspect recent activity, available limits and costs for the session and eligible plan./usageCommand details

Sessions and context

Sessions and context
CommandUseAliasesDocumentation
/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, /newOfficial 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
/exitClose the interactive session. If attached to a background agent, detach while its work continues./quitOfficial docs
/export [filename]Save the conversation as plain text, or choose clipboard or file output interactively.—Official docs
/recapRead 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./continueOfficial docs
/rewindOpen checkpoints and choose whether to restore files, conversation context or both./checkpoint, /undoOfficial docs
/stopStop the attached background agent while keeping its transcript and associated worktree.—Official docs

Planning and agents

Planning and agents
CommandUseAliasesDocumentation
/agentsGet 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./bgOfficial 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-agentsInspect available peers for messaging, including teammates, subagents and local sessions when enabled./peersOfficial docs
/loop [interval] [prompt]Repeat the request during this open session at the interval provided or using the session's pacing./proactiveOfficial 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./routinesOfficial docs
/subtask <task>Delegate a bounded side task to a background subagent and receive its result here.—Official docs
/tasksInspect active and finished background shells and subagent work in the current session./bashesOfficial docs
/workflow-authoringLoad the guidance for writing or editing reusable multi-agent workflow scripts.—Official docs
/workflowsSee ongoing and completed workflows and use the panel to pause, resume or save them.—Official docs

Review and verify

Review and verify
CommandUseAliasesDocumentation
/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./reviewOfficial docs
/diffInspect 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
/runStart and drive the application so you can observe the behavior of a proposed change.—Official docs
/run-skill-generatorWrite a project-specific launch procedure that the run and verification skills can reuse.—Official docs
/security-reviewInspect 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
/verifyBuild or run the application and exercise the changed behavior through its normal user path.—Official docs

Project setup and memory

Project setup and memory
CommandUseAliasesDocumentation
/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-promptsReview repeatedly approved read-only commands in past sessions and prepare narrowly scoped project rules for them.—Official docs
/hooksInspect 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
/initRead the repository and create initial CLAUDE.md guidance for its structure, commands and conventions.—Official docs
/memoryReview or edit the instructions and saved memory Claude loads into a session.—Official docs
/reload-skillsRescan commands and skill directories so the open session can see package changes.—Official docs
/skill-doctorCompare skill context cost with usage and identify skills to review or turn off.—Official docs
/skillsFind available skills and manage whether the selected entries appear to Claude and in the command menu.—Official docs
/team-onboardingDraft a teammate setup guide from the previously used commands, sessions and integrations.—Official docs

Models and settings

Models and settings
CommandUseAliasesDocumentation
/advisor [model|off]Choose a model Claude can consult for strategic input during a task, or turn the advisor off.—Official docs
/auto-mode-setupPrepare 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./settingsOfficial 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
/focusToggle fullscreen's simplified turn view with the prompt, a condensed tool summary and answer.—Official docs
/keybindingsOpen 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
/permissionsInspect and change scoped allow, ask and deny rules and additional working directories./allowed-toolsOfficial docs
/sandboxToggle command sandboxing on a supported platform.—Official docs
/scroll-speedAdjust the mouse-wheel speed in a supported fullscreen terminal and see the effect before closing the panel.—Official docs
/statuslineConfigure which session or project details appear in the terminal status bar.—Official docs
/terminal-setupSet up supported terminal keybindings or platform settings for inserting a newline.—Official docs
/themeChoose 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

MCP, plugins and integrations
CommandUseAliasesDocumentation
/artifactsSee available artifacts and select one to attach, open or share on supporting sessions.—Official docs
/chromeManage 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-loginAuthorize 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
/ideCheck or manage connections to supported development environments and their active files.—Official docs
/install-github-appStart the authorized workflow for connecting a GitHub repository and any selected Claude Actions configuration.—Official docs
/install-slack-appOpen 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

Cloud and other devices
CommandUseAliasesDocumentation
/desktopMove the current conversation into the supported Claude Code desktop app./appOfficial docs
/mobileDisplay a QR code for finding the Claude mobile app./ios, /androidOfficial docs
/remote-controlEnable continuing this session through the supported web or mobile interface./rcOfficial docs
/remote-envSelect the environment that new remote sessions will use by default.—Official docs
/setup-bedrockOpen provider-specific setup for credentials, region and model when the Bedrock mode is enabled.—Official docs
/setup-vertexConfigure the Google Cloud project, region and available model when Vertex AI mode is active.—Official docs
/teleportBring a selected remote session, its code branch and its conversation back to the terminal./tpOfficial docs
/web-setupConnect the GitHub identity used by Claude Code cloud sessions.—Official docs

Account and usage

Account and usage
CommandUseAliasesDocumentation
/costOpen the usage panel for costs and plan limits.—Official docs
/insightsBuild a local HTML report about recent Claude Code use, recurring problems and possible workflow improvements.—Official docs
/loginAuthenticate a Claude account or switch the signed-in identity.—Official docs
/logoutSign the current Claude account out of this machine.—Official docs
/passesView options for sharing trial access if the account is eligible.—Official docs
/privacy-settingsReview the account privacy settings available to supported plans.—Official docs
/rate-limit-optionsSee options for waiting, resuming after limits reset, buying credits or changing plan when the account qualifies.—Official docs
/statsOpen the activity view in the usage panel.—Official docs
/statusCheck the current version, account, model and connectivity.—Official docs
/upgradeOpen the provider's page for changing the current subscription plan.—Official docs
/usageInspect recent activity, available limits and costs for the session and eligible plan.—Official docs
/usage-creditsOpen credit management or request purchase approval from a billing administrator.—Official docs

Help and troubleshooting

Help and troubleshooting
CommandUseAliasesDocumentation
/bug [report]Prepare an issue report and decide what session context to include before sharing it./shareOfficial docs
/debug [description]Begin or focus debug logging for a problem noticed in the current session.—Official docs
/doctorCheck the installation, path, settings and runtime health and review proposed fixes before applying them./checkupOfficial docs
/feedback [report]Prepare product feedback or review and edit any existing drafts before sending.—Official docs
/heapdumpSave diagnostics for a memory issue. Review the separate diagnostics report for sharing because the snapshot can contain private session data.—Official docs
/helpList help and the commands available in this installation.—Official docs
/powerupOpen short interactive walkthroughs of Claude Code features.—Official docs
/release-notesRead the changelog for a selected version without changing the current conversation context.—Official docs

Extras

Extras
CommandUseAliasesDocumentation
/radioOpen the Claude FM stream or display a link if a browser is unavailable.—Official docs
/stickersOpen 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

Terminal commands
Command or flagUse
claudeOpen 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 -cReopen 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 updateCheck for and install the available Claude Code release.
claude gatewayStart 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 loginSign in to the client and choose Console billing if that is the intended account.
claude auth logoutRemove the current Claude sign-in from this installation.
claude auth statusPrint whether the client is authenticated, in machine-readable or plain text form.
claude agentsOpen the view for monitoring background jobs and sending further instructions.
claude attach <id>Connect this terminal to the selected background session.
claude auto-mode defaultsPrint the shipped auto-mode rule configuration in JSON.
claude auto-mode resetReplace customized auto-mode rules with the defaults.
claude daemon statusInspect whether the process supervising background sessions is running.
claude daemon stop --anyStop the background supervisor to end or troubleshoot its process.
claude doctorReport 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 mcpOpen 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 pluginManage 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-controlStart 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-runnerRun Claude Code cloud jobs using infrastructure your organization manages.
claude setup-tokenProduce 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

Common command-line flags
Command or flagUse
--print, -pUse a noninteractive request and send the resulting answer to standard output.
--continue, -cRestore the most recent conversation for the working directory.
--resume, -rSelect an earlier session by name or ID, or use the session picker.
--modelSelect the model name or identifier for this run.
--effortSet the supported reasoning effort that applies during this session.
--permission-modeChoose the starting permission policy, such as plan mode.
--worktree, -wOpen in a separate Git worktree so changes stay isolated.
--add-dirAllow this session to work with one or more additional directories.
--allowed-toolsSet the specific tools or commands approved without a new prompt.
--output-formatChoose text or a machine-readable output format for print mode.
--max-turnsLimit how many agent iterations a print-mode run may take.
--mcp-configLoad MCP connection definitions from the specified JSON input.
--append-system-promptAdd project or workflow instructions to the usual system prompt.
--bg, --backgroundLaunch a background session and return control to the shell.
--safe-modeRun without customizations to help isolate configuration problems.

Keyboard shortcuts and input prefixes

Keyboard shortcuts and input prefixes
Key or prefixUse
/ at startOpen the command or skill picker.
! at startEnter shell command mode for the prompt.
@Mention a file path in the request.
:Begin an emoji shortcode.
? on empty inputOpen or close the keyboard help panel.
\ + EnterInsert a new line in a regular terminal prompt.
Option+EnterInsert a new line after setting macOS Option to work as Meta.
Shift+EnterInsert a new line where the terminal forwards this shortcut.
Ctrl+JAdd a new line without submitting the request.
Paste directlyInsert a multiline code block or log into the current input.
Ctrl+CInterrupt the active operation or clear the current input.
Ctrl+X Ctrl+KEnd background subagents for this conversation and stop artifact auto-replies in the session.
Ctrl+DLeave the Claude Code session.
Ctrl+G or Ctrl+X Ctrl+EEdit the current prompt in the default editor.
Ctrl+LRefresh the terminal's displayed screen.
Ctrl+OSwitch the transcript view on or off.
Ctrl+RSearch 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+BMove selected running work to the background.
Ctrl+TShow or hide the current to-do checklist.
Ctrl+SPut aside the current prompt or bring back a stashed one.
Ctrl+ZSuspend the terminal process where supported.
Left/Right arrowsMove between tabs in a dialog.
TabAccept the suggested completion or open the comment option in a permission dialog.
Up/Down arrows or Ctrl+P/Ctrl+NMove in a multiline prompt or step through prompt history.
EscClose an open dialog or interrupt the current response.
Esc + EscClear the unsent draft or open the checkpoint view for an empty prompt.
Ctrl+Enter or Ctrl+X Ctrl+SSubmit 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 modeRotate 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+AMove the insertion point before the first character on the line.
Ctrl+EPlace the cursor after the last character on the line.
Ctrl+KCut characters after the cursor through the end of the line.
Ctrl+UCut characters before the cursor through the beginning of the line.
Ctrl+WDelete to the preceding word boundary.
Ctrl+YReinsert recently cut text.
Alt+Y (after Ctrl+Y)Rotate through previously cut text after using Ctrl+Y.
Alt+BMove to the previous word boundary.
Alt+FMove to the next word boundary.
Alt+DDelete forward through the end of the word.
Ctrl+_ or Ctrl+Shift+-Undo the most recent prompt edit.

Removed commands and common mix-ups

Removed commands and common mix-ups
CommandCurrent status
/pr-commentsThis legacy command was removed in the version listed by the directory. Ask Claude to summarize the pull request comments directly.
/ultraplanUse regular plan mode for the workflow once handled by this retired cloud planning command.
/vimChoose the preferred editor mode in /config after removal of this older shortcut.
/redoTo return farther forward in available session history, pick the later checkpoint through /rewind.
/historyUse Ctrl+R for past prompts or /resume to choose an earlier conversation.
/searchUse prompt history search or open the fullscreen transcript to find text within the conversation.
/todosUse Ctrl+T to toggle the task checklist. /tasks is for background work.