Claude Code Commands Cheat Sheet (2026)

A complete Claude Code command reference for quick lookup. Browse slash commands A–Z or by task, check CLI commands and flags, keyboard shortcuts, MCP and skills, environment variables, and workflows.

Claude Code commands control a running coding session, while CLI commands and flags control how Claude Code starts, resumes, automates, and connects from the terminal.

This cheat sheet keeps the current slash commands, CLI commands, flags, settings, keyboard shortcuts, MCP command patterns, environment variables, and common workflows in one reference.

Last Updated: Sep 18, 2026

Type / inside Claude Code to see the commands available in your installation. Availability can vary by platform, plan, provider, enabled features, and organization policy. The in-session menu is the final check for your own setup.

Download the Claude Code Commands Cheat Sheet

Save or print the PDF version for a compact offline reference. The web version below is the fuller reference and is updated as Claude Code changes.

Common Claude Code Commands

CommandWhat it does
/helpShow help and commands available in your installation.
/initCreate project instructions; Claude Code also recognizes AGENTS.md when no CLAUDE.md exists.
/model [model]Switch the active model.
/plan [description]Enter Plan Mode for a task.
/context [all]Inspect current context usage.
/compact [instructions]Free context by summarizing the conversation.
/clear [name]Start a fresh conversation.
/resume [session]Return to an earlier conversation.
/diffReview working-tree changes.
/code-review [level] [target]Review a diff, branch, path, or pull request.
/permissionsManage tool permission rules.
/mcp [subcommand]Manage MCP servers and authentication.
/skillsBrowse available skills.
/tasksView background work in the current session.
/doctorDiagnose setup and configuration issues.

Slash Commands vs. CLI Commands

Slash commands run inside an active Claude Code session. CLI commands and flags run in your shell before or while starting Claude Code.

Where you run itExamples
Inside Claude Code/compact, /model, /mcp, /doctor
In your terminalclaude -p “prompt”, claude -c, claude update, claude –model sonnet

All Claude Code Commands A-Z

CommandWhat it does
/add-dir <path>Add another working directory to the current session.
/advisor [model|off]Turn the advisor tool on or off, optionally choosing its model.
/agentsPoint you to Claude-managed subagent creation or the agent files in .claude/agents/ and ~/.claude/agents/.
/artifactsList, attach, open, or copy links to available artifacts.
/auto-mode-setupDraft auto-mode environment rules from the project and recent sessions.
/autocompact [auto|<tokens>]Set the auto-compact window with auto or a token value such as 500k; the choice is saved to settings.
/autofix-pr [prompt]Start a Claude Code web session that watches the current branch’s PR and pushes fixes for CI failures or review comments; an optional prompt can narrow the work.
/background [prompt]Detach the current session and keep it running as a background agent. Alias: /bg.
/batch <instruction>Break a large codebase change into parallel worktree tasks.
/branch [name]Branch the current conversation so you can try a different direction.
/btw [question]Ask a side question about the current session without adding it to the main conversation history; run it with no question to revisit recent side questions.
/bug [report]Report a bug or share selected session context. Alias: /share.
/cd <path>Move the current session to another working directory without losing the conversation.
/chromeConfigure Claude in Chrome integration.
/claude-api [subcommand]Load Claude API and Managed Agents guidance, including migration and audit workflows.
/clear [name]Start a new conversation with empty conversational context while keeping project memory; an optional name labels the previous conversation for later resume.
/code-review [level] [–fix] [–comment] [target]Review the current diff or a path, branch, or PR. Use –fix to apply findings, –comment for PR comments, or ultra for the cloud review flow.
/color [color|default]Change the prompt bar color for the current session.
/compact [instructions]Summarize the conversation to free context while keeping the current task.
/config [key=value …]Open the Settings interface, or pass supported key=value pairs to change settings directly.
/context [all]Show context usage, capacity warnings, and optimization suggestions; pass all to expand the per-item breakdown.
/copy [N]Copy the latest response or the Nth-latest response; when code blocks exist, the picker can copy an individual block or the full response.
/costOpen the Usage view. Alias of /usage.
/dataviz [request]Load bundled chart, graph, and dashboard design guidance.
/debug [description]Enable session debug logging and investigate a runtime problem.
/deep-research <question>Run a multi-source research workflow and synthesize a cited report.
/design [brief]Create UI or graphic design artboards and publish them as an artifact where available.
/design-loginAuthorize access used by design-system synchronization.
/design-sync [hint]Sync a React design system for use with Claude Design.
/desktopContinue the current session in the Claude Code Desktop app. Alias: /app.
/diffReview working-tree changes, including edits made by Claude.
/doctorRun a setup checkup for installation, settings, hooks, skills, plugins, MCP servers, and context overhead, with fixes offered where available.
/effort [level|auto|status]Set or inspect reasoning effort with model-appropriate levels, auto, or status.
/exitExit Claude Code; in an attached background session, detach without stopping it. Alias: /quit.
/export [filename]Export the current conversation as plain text.
/fast [on|off]Turn fast mode on or off.
/feedback [report]Send product feedback or review queued feedback drafts.
/fewer-permission-promptsFind common read-only tool calls and propose permission allowlist entries.
/focusToggle the compact Focus view in fullscreen mode.
/fork [prompt]Copy the current conversation into a separate background session while you keep working in the original session.
/goal [condition|clear]Set a completion condition that keeps Claude working across turns until the condition is met, or clear the active goal.
/heapdumpWrite heap diagnostics for investigating high memory use.
/helpShow help and the commands available in the current installation.
/hooksView configured hook events and commands.
/ideManage IDE integrations and connection status.
/import [codex|gemini] [–dry-run] [–yes]Import supported configuration from Codex or Gemini CLI.
/initCreate or initialize project instructions. Claude Code uses CLAUDE.md, or AGENTS.md when a project has no CLAUDE.md.
/insightsGenerate an HTML report from recent local Claude Code usage.
/install-github-appSet up the Claude GitHub App and optional GitHub Actions workflow.
/install-slack-appOpen the Slack app installation flow.
/keybindingsOpen the custom keyboard-shortcuts configuration file.
/list-agentsList subagents, agent-team teammates, and other messageable Claude Code sessions. Alias: /peers.
/loginSign in to an Anthropic account.
/logoutSign out from the current Anthropic account.
/loop [interval] [prompt]Repeat a prompt while the session stays open. Alias: /proactive.
/mcp [subcommand]Open MCP management, authenticate servers, reconnect a server, or enable and disable individual servers or all servers.
/memoryEdit CLAUDE.md files and manage auto memory.
/mobileShow a QR code for the Claude mobile app. Aliases: /ios, /android.
/model [model]Switch the active model; the picker can save a default for new sessions or apply a model only to the current session.
/output-style [name]List available output styles or switch to a named style.
/passesShare a free week of Claude Code with friends when the account is eligible.
/permissionsManage allow, ask, and deny rules, working directories, recent denials, and auto-mode classifier rules.
/plan [description]Enter Plan Mode, optionally starting with a task description.
/plugin [subcommand]Open plugin management or run plugin subcommands such as list, install, enable, and disable.
/powerupOpen interactive lessons for Claude Code features.
/privacy-settingsView and update privacy settings on eligible plans.
/radioOpen Claude FM lo-fi radio.
/rate-limit-optionsShow options for continuing when a Claude.ai usage limit blocks a request.
/recapGenerate a one-line summary of the current session.
/release-notesOpen the interactive Claude Code changelog.
/reload-plugins [–force]Reload active plugin components without restarting Claude Code; –force permits reloads that would change MCP tools and invalidate prompt cache.
/reload-skillsRe-scan skill and command directories during the current session and report which skills were added or removed.
/remote-controlMake the local session available from claude.ai or the Claude app through Remote Control. Alias: /rc.
/remote-envChoose the default environment for cloud agents.
/rename [name]Rename the current session.
/resume [session]Resume a previous conversation by ID or name, or open the session picker. Alias: /continue.
/review [level] [–fix] [–comment] [target]Alias of /code-review.
/rewindRestore or summarize an earlier checkpoint. Aliases: /checkpoint, /undo.
/runBuild and run the project so Claude can observe a change working.
/run-skill-generatorCreate project guidance that teaches /run and /verify how to launch the app.
/sandboxToggle sandbox mode on supported platforms.
/schedule [description]Create, update, list, or run cloud routines. Alias: /routines.
/scroll-speedAdjust mouse-wheel speed in fullscreen mode.
/security-reviewReview the current branch against the origin default branch for security issues such as injection, authentication flaws, and data exposure.
/setup-bedrockOpen the Amazon Bedrock setup wizard.
/setup-vertexOpen the Google Cloud Agent Platform setup wizard.
/simplify [target]Review changed code for reuse, simplicity, efficiency, and abstraction issues, then apply cleanup fixes; use code review when you want correctness bugs checked too.
/skill-doctorShow each skill’s context cost and usage frequency to identify skills that consume context without being used.
/skillsList skills, filter by name, description, or source, sort by token count, and manage visibility where the skill can be toggled.
/statsOpen the Stats tab in /usage.
/statusShow version, model, account, connectivity, and session status.
/statuslineConfigure the custom status line.
/stickersOpen the Claude Code sticker-ordering flow.
/stopStop the current attached background session while keeping its transcript and worktree.
/subtask <task>Start a forked subagent that inherits the current conversation, works in the background, and reports its result back to this session.
/tasksView and manage background work in the current session. Alias: /bashes.
/team-onboardingGenerate a team onboarding guide from recent Claude Code usage.
/teleportPull a Claude Code web session and its conversation into the local terminal. Alias: /tp.
/terminal-setupConfigure supported terminals for multiline input and related integration settings.
/themeChoose or create a terminal color theme.
/tui [default|fullscreen]Switch between the standard and fullscreen terminal renderers.
/ultrareview [PR or branch]Run the deep cloud review flow. /code-review ultra is the preferred form.
/upgradeOpen the plan upgrade flow.
/usageShow session cost, plan usage limits, and activity statistics; /cost and /stats open views within the same usage surface.
/usage-creditsOpen or request usage-credit settings when a limit is reached.
/verifyBuild and run the project to confirm a code change works in the actual app.
/voice [hold|tap|off]Turn voice dictation on, choose hold/tap behavior, or turn it off.
/web-setupConnect GitHub credentials for Claude Code on the web.
/workflow-authoringLoad the reference for creating or editing dynamic workflow scripts.
/workflowsOpen the workflow progress view to watch and manage workflow runs.

Start and Configure Claude Code

Use these commands for initial project setup, model and permission choices, terminal configuration, memory, providers, and session-wide settings.

CommandWhat it does
/add-dir <path>Add another working directory to the current session.
/auto-mode-setupDraft auto-mode environment rules from the project and recent sessions.
/autocompact [auto|<tokens>]Set the auto-compact window with auto or a token value such as 500k; the choice is saved to settings.
/cd <path>Move the current session to another working directory without losing the conversation.
/color [color|default]Change the prompt bar color for the current session.
/config [key=value …]Open the Settings interface, or pass supported key=value pairs to change settings directly.
/doctorRun a setup checkup for installation, settings, hooks, skills, plugins, MCP servers, and context overhead, with fixes offered where available.
/effort [level|auto|status]Set or inspect reasoning effort with model-appropriate levels, auto, or status.
/fast [on|off]Turn fast mode on or off.
/helpShow help and the commands available in the current installation.
/hooksView configured hook events and commands.
/ideManage IDE integrations and connection status.
/import [codex|gemini] [–dry-run] [–yes]Import supported configuration from Codex or Gemini CLI.
/initCreate or initialize project instructions. Claude Code uses CLAUDE.md, or AGENTS.md when a project has no CLAUDE.md.
/keybindingsOpen the custom keyboard-shortcuts configuration file.
/loginSign in to an Anthropic account.
/logoutSign out from the current Anthropic account.
/memoryEdit CLAUDE.md files and manage auto memory.
/model [model]Switch the active model; the picker can save a default for new sessions or apply a model only to the current session.
/permissionsManage allow, ask, and deny rules, working directories, recent denials, and auto-mode classifier rules.
/privacy-settingsView and update privacy settings on eligible plans.
/sandboxToggle sandbox mode on supported platforms.
/setup-bedrockOpen the Amazon Bedrock setup wizard.
/setup-vertexOpen the Google Cloud Agent Platform setup wizard.
/statuslineConfigure the custom status line.
/terminal-setupConfigure supported terminals for multiline input and related integration settings.
/themeChoose or create a terminal color theme.
/tui [default|fullscreen]Switch between the standard and fullscreen terminal renderers.
/upgradeOpen the plan upgrade flow.

Manage Context and Sessions

These commands manage context size, conversation state, checkpoints, background work, session naming, and session history.

CommandWhat it does
/background [prompt]Detach the current session and keep it running as a background agent. Alias: /bg.
/branch [name]Branch the current conversation so you can try a different direction.
/btw [question]Ask a side question about the current session without adding it to the main conversation history; run it with no question to revisit recent side questions.
/clear [name]Start a new conversation with empty conversational context while keeping project memory; an optional name labels the previous conversation for later resume.
/compact [instructions]Summarize the conversation to free context while keeping the current task.
/context [all]Show context usage, capacity warnings, and optimization suggestions; pass all to expand the per-item breakdown.
/copy [N]Copy the latest response or the Nth-latest response; when code blocks exist, the picker can copy an individual block or the full response.
/costOpen the Usage view. Alias of /usage.
/export [filename]Export the current conversation as plain text.
/focusToggle the compact Focus view in fullscreen mode.
/fork [prompt]Copy the current conversation into a separate background session while you keep working in the original session.
/goal [condition|clear]Set a completion condition that keeps Claude working across turns until the condition is met, or clear the active goal.
/recapGenerate a one-line summary of the current session.
/rename [name]Rename the current session.
/resume [session]Resume a previous conversation by ID or name, or open the session picker. Alias: /continue.
/rewindRestore or summarize an earlier checkpoint. Aliases: /checkpoint, /undo.
/statsOpen the Stats tab in /usage.
/statusShow version, model, account, connectivity, and session status.
/stopStop the current attached background session while keeping its transcript and worktree.
/subtask <task>Start a forked subagent that inherits the current conversation, works in the background, and reports its result back to this session.
/tasksView and manage background work in the current session. Alias: /bashes.
/usageShow session cost, plan usage limits, and activity statistics; /cost and /stats open views within the same usage surface.

Use MCP, Plugins, Skills, and Agents

Use these commands to extend Claude Code with MCP servers, plugins, skills, subagents, background work, and dynamic workflows.

CommandWhat it does
/agentsPoint you to Claude-managed subagent creation or the agent files in .claude/agents/ and ~/.claude/agents/.
/batch <instruction>Break a large codebase change into parallel worktree tasks.
/claude-api [subcommand]Load Claude API and Managed Agents guidance, including migration and audit workflows.
/dataviz [request]Load bundled chart, graph, and dashboard design guidance.
/deep-research <question>Run a multi-source research workflow and synthesize a cited report.
/fewer-permission-promptsFind common read-only tool calls and propose permission allowlist entries.
/list-agentsList subagents, agent-team teammates, and other messageable Claude Code sessions. Alias: /peers.
/loop [interval] [prompt]Repeat a prompt while the session stays open. Alias: /proactive.
/mcp [subcommand]Open MCP management, authenticate servers, reconnect a server, or enable and disable individual servers or all servers.
/plugin [subcommand]Open plugin management or run plugin subcommands such as list, install, enable, and disable.
/reload-plugins [–force]Reload active plugin components without restarting Claude Code; –force permits reloads that would change MCP tools and invalidate prompt cache.
/reload-skillsRe-scan skill and command directories during the current session and report which skills were added or removed.
/run-skill-generatorCreate project guidance that teaches /run and /verify how to launch the app.
/skill-doctorShow each skill’s context cost and usage frequency to identify skills that consume context without being used.
/skillsList skills, filter by name, description, or source, sort by token count, and manage visibility where the skill can be toggled.
/subtask <task>Start a forked subagent that inherits the current conversation, works in the background, and reports its result back to this session.
/workflow-authoringLoad the reference for creating or editing dynamic workflow scripts.
/workflowsOpen the workflow progress view to watch and manage workflow runs.

Review, Debug, and Change Code

These commands help you plan changes, inspect diffs, review code, debug failures, verify behavior, and run larger changes in parallel.

CommandWhat it does
/advisor [model|off]Turn the advisor tool on or off, optionally choosing its model.
/autofix-pr [prompt]Start a Claude Code web session that watches the current branch’s PR and pushes fixes for CI failures or review comments; an optional prompt can narrow the work.
/batch <instruction>Break a large codebase change into parallel worktree tasks.
/code-review [level] [–fix] [–comment] [target]Review the current diff or a path, branch, or PR. Use –fix to apply findings, –comment for PR comments, or ultra for the cloud review flow.
/debug [description]Enable session debug logging and investigate a runtime problem.
/diffReview working-tree changes, including edits made by Claude.
/plan [description]Enter Plan Mode, optionally starting with a task description.
/review [level] [–fix] [–comment] [target]Alias of /code-review.
/runBuild and run the project so Claude can observe a change working.
/security-reviewReview the current branch against the origin default branch for security issues such as injection, authentication flaws, and data exposure.
/simplify [target]Review changed code for reuse, simplicity, efficiency, and abstraction issues, then apply cleanup fixes; use code review when you want correctness bugs checked too.
/ultrareview [PR or branch]Run the deep cloud review flow. /code-review ultra is the preferred form.
/verifyBuild and run the project to confirm a code change works in the actual app.

Use GitHub, PR, and Release Workflows

These commands handle pull request review, GitHub integration, cloud autofix work, release notes, and web session setup.

CommandWhat it does
/autofix-pr [prompt]Start a Claude Code web session that watches the current branch’s PR and pushes fixes for CI failures or review comments; an optional prompt can narrow the work.
/code-review [level] [–fix] [–comment] [target]Review the current diff or a path, branch, or PR. Use –fix to apply findings, –comment for PR comments, or ultra for the cloud review flow.
/install-github-appSet up the Claude GitHub App and optional GitHub Actions workflow.
/release-notesOpen the interactive Claude Code changelog.
/review [level] [–fix] [–comment] [target]Alias of /code-review.
/security-reviewReview the current branch against the origin default branch for security issues such as injection, authentication flaws, and data exposure.
/ultrareview [PR or branch]Run the deep cloud review flow. /code-review ultra is the preferred form.
/web-setupConnect GitHub credentials for Claude Code on the web.

Work Remotely or Across Devices

Use these commands for desktop, browser, mobile, Remote Control, cloud environments, artifacts, voice, and web-session handoff.

CommandWhat it does
/artifactsList, attach, open, or copy links to available artifacts.
/background [prompt]Detach the current session and keep it running as a background agent. Alias: /bg.
/chromeConfigure Claude in Chrome integration.
/desktopContinue the current session in the Claude Code Desktop app. Alias: /app.
/design [brief]Create UI or graphic design artboards and publish them as an artifact where available.
/design-loginAuthorize access used by design-system synchronization.
/design-sync [hint]Sync a React design system for use with Claude Design.
/install-slack-appOpen the Slack app installation flow.
/mobileShow a QR code for the Claude mobile app. Aliases: /ios, /android.
/remote-controlMake the local session available from claude.ai or the Claude app through Remote Control. Alias: /rc.
/remote-envChoose the default environment for cloud agents.
/schedule [description]Create, update, list, or run cloud routines. Alias: /routines.
/teleportPull a Claude Code web session and its conversation into the local terminal. Alias: /tp.
/voice [hold|tap|off]Turn voice dictation on, choose hold/tap behavior, or turn it off.
/web-setupConnect GitHub credentials for Claude Code on the web.

Usage, Diagnostics, and Account Commands

Use these commands to inspect usage, diagnose problems, report issues, review activity, and manage plan or credit options.

CommandWhat it does
/bug [report]Report a bug or share selected session context. Alias: /share.
/costOpen the Usage view. Alias of /usage.
/debug [description]Enable session debug logging and investigate a runtime problem.
/doctorRun a setup checkup for installation, settings, hooks, skills, plugins, MCP servers, and context overhead, with fixes offered where available.
/feedback [report]Send product feedback or review queued feedback drafts.
/heapdumpWrite heap diagnostics for investigating high memory use.
/insightsGenerate an HTML report from recent local Claude Code usage.
/passesShare a free week of Claude Code with friends when the account is eligible.
/powerupOpen interactive lessons for Claude Code features.
/rate-limit-optionsShow options for continuing when a Claude.ai usage limit blocks a request.
/recapGenerate a one-line summary of the current session.
/release-notesOpen the interactive Claude Code changelog.
/statsOpen the Stats tab in /usage.
/usageShow session cost, plan usage limits, and activity statistics; /cost and /stats open views within the same usage surface.
/usage-creditsOpen or request usage-credit settings when a limit is reached.

Interface and Utility Commands

These commands control terminal presentation, navigation, and general session utilities.

CommandWhat it does
/color [color|default]Change the prompt bar color for the current session.
/exitExit Claude Code; in an attached background session, detach without stopping it. Alias: /quit.
/focusToggle the compact Focus view in fullscreen mode.
/keybindingsOpen the custom keyboard-shortcuts configuration file.
/output-style [name]List available output styles or switch to a named style.
/radioOpen Claude FM lo-fi radio.
/scroll-speedAdjust mouse-wheel speed in fullscreen mode.
/statuslineConfigure the custom status line.
/stickersOpen the Claude Code sticker-ordering flow.
/terminal-setupConfigure supported terminals for multiline input and related integration settings.
/themeChoose or create a terminal color theme.
/tui [default|fullscreen]Switch between the standard and fullscreen terminal renderers.

MCP Slash Commands and Custom Commands

The built-in /mcp command manages MCP server connections. MCP servers can also publish prompts that appear as slash commands after the server is connected.

MCP Prompt Command Pattern

/mcp__[server]__[prompt] [args]

Examples:

/mcp__github__list_prs
/mcp__github__pr_review 456
/mcp__jira__create_issue "Bug in login flow" high

MCP prompt commands are discovered dynamically, so there is no fixed universal A-Z list for them. Their names depend on the connected servers and the prompts those servers expose.

Skills, Plugins, and User Commands

Skills, plugins, and local project configuration can contribute additional slash commands. Type / to search the combined command menu in your current installation. Use /skills to inspect skills, /plugin for plugins, and /reload-skills or /reload-plugins after changing them during a session.

Project and personal commands can be stored as Markdown-based skills or command definitions under Claude Code configuration directories. These custom entries are intentionally excluded from the fixed A-Z table because each installation can have a different set.

Claude Code CLI Commands

CLI commandWhat it does
claudeStart an interactive Claude Code session.
claude “query”Start an interactive session with an initial prompt.
claude -p “query”Run one non-interactive prompt and exit.
cat file | claude -p “query”Pipe file content into a non-interactive prompt.
claude -cContinue the most recent conversation for the current directory.
claude -c -p “query”Continue the latest conversation non-interactively.
claude -r “<session>” “query”Resume a named or identified session with an optional prompt.
claude updateUpdate Claude Code.
claude gateway –config <file>Start the self-hosted Claude apps gateway with a gateway configuration.
claude install [version]Install or reinstall the native binary, optionally choosing a release channel or version.
claude auth loginSign in; auth-specific flags can select Console or SSO flows.
claude auth logoutSign out from the Anthropic account.
claude auth statusPrint authentication status.
claude agentsOpen agent view or print background-session data with its flags.
claude attach <id>Attach the terminal to a background session.
claude auto-mode defaultsPrint built-in auto-mode classifier rules.
claude auto-mode configPrint the effective auto-mode configuration.
claude auto-mode resetRemove the user-level auto-mode configuration and restore defaults.
claude daemon statusShow background-session supervisor status.
claude daemon stop –anyStop the on-demand supervisor and, unless preserved, its hosted sessions.
claude doctorPrint read-only installation and settings diagnostics.
claude import [codex|gemini]Start an import flow for supported coding-agent configuration.
claude logs <id>Print recent output from a background session.
claude mcpOpen MCP configuration commands.
claude mcp add [options] <name> …Add an MCP server.
claude mcp add-json <name> ‘<json>’Add an MCP server from JSON configuration.
claude mcp add-from-claude-desktopImport MCP servers from Claude Desktop where supported.
claude mcp get <name>Show one configured MCP server.
claude mcp listList configured MCP servers.
claude mcp login <name>Authenticate a configured MCP server from the terminal.
claude mcp logout <name>Clear stored OAuth credentials for an MCP server.
claude mcp remove <name>Remove an MCP server.
claude mcp reset-project-choicesReset approvals for project-scoped MCP servers.
claude mcp serveRun Claude Code itself as a stdio MCP server.
claude pluginManage Claude Code plugins. Alias: claude plugins.
claude plugin evalRun a plugin eval suite and produce scored JSON and HTML reports.
claude plugin install <plugin> –marketplace <source>Add a marketplace when needed, then install a plugin from it.
claude plugin install/update … –accept-command <sha256>Accept the exact setup command shown by an earlier JSON preview.
claude plugin validate –jsonValidate a plugin and print a machine-readable report.
claude project purge [path]Delete local Claude Code state for one project or selected projects.
claude remote-controlStart a Remote Control server without a local interactive session.
claude respawn <id>Restart a background session with its conversation intact.
claude rm <id>Remove a background session from agent view while keeping its transcript.
claude self-hosted-runnerStart or manage a self-hosted environment runner.
claude self-hosted-runner –drain-marker-file <path>Mark SIGTERM shutdowns as intentional host drains when the marker file exists.
claude self-hosted-runner –remove-session-stateDelete each runner session’s local state directory after the session ends.
claude setup-tokenGenerate a long-lived OAuth token for CI or scripts.
claude stop <id>Stop a background session. Alias: claude kill.
claude ultrareview [target]Run a deep cloud code review non-interactively.

Claude Code CLI Flags

FlagWhat it does
–add-dirAdd one or more working directories to the session.
–advisor <model>Choose an advisor model for the current session.
–agentStart with a specific custom agent.
–agentsDefine custom subagents from JSON at launch.
–allow-dangerously-skip-permissionsMake bypass-permissions mode available in the permission-mode cycle.
–allowedTools, –allowed-toolsPre-approve matching tools or tool calls.
–append-subagent-system-promptAppend text to subagent system prompts in non-interactive runs.
–append-subagent-system-prompt-fileRead appended subagent system-prompt text from a file.
–append-system-promptAppend text to Claude Code’s default system prompt.
–append-system-prompt-fileAppend system-prompt text from a file.
–autocompact <auto|tokens>Set the auto-compact window for this invocation.
–ax-screen-readerUse screen-reader friendly terminal output.
–bareStart with most project and user customizations skipped.
–betasSend additional Anthropic beta headers for API-key sessions.
–bg, –backgroundStart the session as a background agent.
–channelsEnable selected MCP channel sources for the session.
–chromeEnable Chrome integration.
–cloudCreate a cloud session or send a message to an existing web session.
–continue, -cContinue the most recent eligible conversation.
–dangerously-load-development-channelsLoad development channels that are not on the approved allowlist.
–dangerously-skip-permissionsStart with permission prompts bypassed.
–debugEnable debug mode, optionally filtering debug categories.
–debug-file <path>Write debug output to a specific file.
–disable-slash-commandsDisable commands and skills for the session.
–disallowedTools, –disallowed-toolsDeny matching tools or tool calls.
–effortChoose the reasoning effort level for the session.
–environment <environment-id>Dispatch a cloud session to a self-hosted environment.
–exclude-dynamic-system-prompt-sectionsMove machine-specific system-prompt sections into the first user message.
–execRun a shell command as a PTY-backed background job with –bg.
–fallback-modelSet one or more fallback models.
–fork-sessionCreate a new session ID when resuming or continuing.
–forward-subagent-textInclude subagent text and thinking in stream-json output.
–from-prOpen sessions associated with a pull request or merge request.
–ideConnect to an available IDE at startup.
–initRun Setup hooks with the init matcher before a print-mode session.
–init-onlyRun setup and SessionStart hooks, then exit.
–include-hook-eventsInclude supported hook lifecycle events in stream-json output.
–include-partial-messagesInclude partial streaming events in stream-json output.
–input-formatChoose text or stream-json input for print mode.
–json-schemaRequire final structured output that matches a JSON Schema.
–maintenanceRun Setup hooks with the maintenance matcher before print mode.
–max-budget-usdCap API spend for a print-mode run.
–max-turnsCap agentic turns in print mode.
–mcp-configLoad MCP configuration from JSON files or inline JSON.
–modelChoose the model for the current invocation.
–name, -nAssign a display name to the session.
–no-chromeDisable Chrome integration for the session.
–no-session-persistenceDo not save the print-mode session to disk.
–output-formatChoose text, json, or stream-json output in print mode.
–permission-modeChoose the starting permission mode.
–permission-prompt-toolDelegate print-mode permission prompts to an MCP tool.
–permission-promptsChoose how print-mode permission prompts are handled; use none to deny anything that would prompt on an unattended host.
–plugin-dirLoad one plugin directory, a zip archive, or a folder whose child directories are plugins.
–plugin-urlLoad a plugin zip archive from a URL for this session.
–print, -pRun without the interactive terminal UI.
–prompt-suggestionsEmit predicted next-prompt messages in compatible stream-json runs.
–ref <branch>Choose the source ref for a self-hosted environment dispatch.
–remoteDeprecated alias for –cloud that remains accepted.
–remote-control, –rcStart an interactive session with Remote Control enabled.
–remote-control-session-name-prefix <prefix>Prefix automatically generated Remote Control session names.
–replay-user-messagesEcho stream-json input messages back to stdout.
–restrictedStart with a reduced, evaluation-oriented tool and settings surface.
–resume, -rResume a specific session or open the resume picker.
–safe-modeStart with customizations disabled for troubleshooting.
–session-idUse a specific UUID as the session ID.
–setting-sourcesChoose which user, project, and local setting sources load.
–settingsLoad session overrides from a JSON file or inline JSON.
–strict-mcp-configIgnore MCP configurations outside –mcp-config.
–system-promptReplace the default system prompt with supplied text.
–system-prompt-fileReplace the default system prompt with file contents.
–system-prompt-snapshot offRe-render the system prompt on every request while iterating on prompt text.
–teleportResume a Claude Code web session locally.
–teammate-modeChoose how agent-team teammates are displayed.
–tmuxCreate a tmux or compatible pane layout for a worktree session.
–toolsRestrict which built-in tools Claude can use.
–verboseShow verbose turn-by-turn output.
–version, -vPrint the Claude Code version.
–worktree, -wStart Claude Code in an isolated Git worktree.

Claude Code Settings

These settings cover reader-relevant additions from the latest releases. Add them to the applicable user, project, local, or managed settings file.

SettingWhat it controls
bashEditDiffEnabledIncludes a diff in the Bash tool result when a Bash command edits files.
bashOutputMaxCharsRaises the inline Bash output limit, up to 128K characters, before output is saved to a file.
managedMcpServersLets an organization provide HTTP or SSE MCP servers to every user.
maxEffortLevelCaps the maximum reasoning effort globally or for individual models.
syncClaudeAiPluginsSet to false to stop plugins enabled on the signed-in claude.ai account from syncing to terminal sessions.
syncClaudeAiSkillsSet to false to stop skills enabled on the signed-in claude.ai account from syncing to terminal sessions.
taskOutputMaxCharsRaises the inline background-task output limit, up to 128K characters, before output is saved to a file.

Claude Code Keyboard Shortcuts

General Keyboard Shortcuts

ShortcutAction
Ctrl+CInterrupt a running operation; with no operation running, clear the prompt input.
Ctrl+Enter or Ctrl+X Ctrl+SInterrupt the current turn and send every queued message immediately.
Ctrl+X Ctrl+KStop all background subagents in the session after confirmation.
Ctrl+DExit Claude Code; when input contains text, delete the next character.
Ctrl+G or Ctrl+X Ctrl+EOpen the current prompt in the default text editor.
Ctrl+LRedraw the terminal screen without losing the conversation.
Ctrl+OOpen or close the transcript viewer.
Ctrl+RSearch prompt history in reverse.
Ctrl+V / Cmd+V / Alt+VPaste an image from the clipboard, depending on platform and terminal.
Ctrl+BMove a running Bash command or agent to the background.
Ctrl+TShow or hide Claude’s task checklist.
Ctrl+SStash the current prompt, or restore the stashed prompt when the input is empty.
Ctrl+ZSuspend Claude Code on Unix systems.
Left / Right arrowsMove between tabs in dialogs and menus.
TabAccept autocomplete, or open/close a comment field on supported permission prompts.
Up / Down or Ctrl+P / Ctrl+NMove within multiline input, then browse prompt history at the first or last row.
EscInterrupt Claude or close the current dialog.
Esc EscClear and save a draft, or open rewind controls when the input is empty.
Shift+TabCycle permission modes; some Windows runtimes use Alt+M.
Option+P / Alt+PSwitch model without clearing the prompt.
Option+T / Alt+TToggle extended thinking where the active model permits it.
Option+O / Alt+OToggle fast mode.

Text Editing Shortcuts

ShortcutAction
Ctrl+AMove to the start of the current logical line.
Ctrl+EMove to the end of the current logical line.
Ctrl+KDelete from the cursor to the end of the line.
Ctrl+UDelete from the cursor to the start of the line.
Ctrl+WDelete the previous word.
Ctrl+YPaste text deleted by line or word editing shortcuts.
Alt+YCycle through earlier deleted text after Ctrl+Y.
Alt+BMove back one word.
Alt+FMove forward one word.
Alt+DDelete the next word.
Ctrl+_ or Ctrl+Shift+-Undo the last edit to the prompt input.

Multiline Input

ShortcutAction
\ + EnterInsert a newline in any terminal.
Option+EnterInsert a newline on macOS terminals configured to send Option as Meta.
Shift+EnterInsert a newline in terminals that expose this key combination.
Ctrl+JInsert a newline without terminal-specific configuration.
Paste directlyInsert multiline code, logs, or text as pasted input.

Quick Input Commands

ShortcutAction
/ at startOpen the command and skill menu.
! at startRun a shell command directly and add its output to the session.
@Open file-path autocomplete and, where available, other live-session mentions.
:Open emoji shortcode suggestions.
? on empty inputShow or hide the shortcut help panel.

Transcript Viewer Shortcuts

ShortcutAction
?Toggle the transcript-viewer shortcut panel in fullscreen mode.
{ / }Jump to the previous or next user prompt in fullscreen mode.
Ctrl+EToggle expanded transcript content in the classic renderer.
[Write the conversation into native terminal scrollback in fullscreen mode.
vOpen the conversation in the configured external editor.
q / Ctrl+C / EscExit transcript view.

Voice Input

ShortcutAction
Hold or tap SpaceRecord voice input when voice dictation is enabled; tap mode is available through /voice.

Claude Code Environment Variables

Claude Code reads environment variables for authentication, model selection, providers, request routing, terminal behavior, MCP, telemetry, automation, and feature controls.

Authentication, Models, and Providers

VariableWhat it controls
ANTHROPIC_API_KEYAPI key used for Anthropic API authentication.
ANTHROPIC_AUTH_TOKENBearer token used for the Authorization header.
ANTHROPIC_AWS_API_KEYWorkspace API key for Claude Platform on AWS.
ANTHROPIC_AWS_BASE_URLOverrides the Claude Platform on AWS endpoint.
ANTHROPIC_AWS_WORKSPACE_IDSets the Claude Platform on AWS workspace ID.
ANTHROPIC_BASE_URLOverrides the Anthropic API base URL for a proxy or gateway.
ANTHROPIC_BEDROCK_BASE_URLOverrides the Amazon Bedrock endpoint.
ANTHROPIC_BEDROCK_MANTLE_BASE_URLOverrides the Bedrock Mantle endpoint.
ANTHROPIC_BEDROCK_REGION_PREFIXChooses the preferred cross-region Bedrock inference prefix.
ANTHROPIC_BEDROCK_SERVICE_TIERSets the Bedrock service tier.
ANTHROPIC_BETASAdds Anthropic beta header values to API requests.
ANTHROPIC_CUSTOM_HEADERSAdds custom HTTP headers to model requests.
ANTHROPIC_CUSTOM_MODEL_OPTIONAdds a custom model ID to the model picker.
ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTIONSets the model-picker description for the custom model entry.
ANTHROPIC_CUSTOM_MODEL_OPTION_NAMESets the model-picker display name for the custom model entry.
ANTHROPIC_CUSTOM_MODEL_OPTION_SUPPORTED_CAPABILITIESDeclares capabilities supported by the custom model entry.
ANTHROPIC_DEFAULT_FABLE_MODELSets the model ID used by the Fable alias.
ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTIONSets the model-picker description for the pinned Fable model.
ANTHROPIC_DEFAULT_FABLE_MODEL_NAMESets the model-picker display name for the pinned Fable model.
ANTHROPIC_DEFAULT_FABLE_MODEL_SUPPORTED_CAPABILITIESDeclares capabilities supported by the pinned Fable model.
ANTHROPIC_DEFAULT_HAIKU_MODELSets the model ID used by the Haiku alias.
ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTIONSets the model-picker description for the pinned Haiku model.
ANTHROPIC_DEFAULT_HAIKU_MODEL_NAMESets the model-picker display name for the pinned Haiku model.
ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIESDeclares capabilities supported by the pinned Haiku model.
ANTHROPIC_DEFAULT_MODELSets the model used for new sessions.
ANTHROPIC_DEFAULT_OPUS_MODELSets the model ID used by the Opus alias.
ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTIONSets the model-picker description for the pinned Opus model.
ANTHROPIC_DEFAULT_OPUS_MODEL_NAMESets the model-picker display name for the pinned Opus model.
ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIESDeclares capabilities supported by the pinned Opus model.
ANTHROPIC_DEFAULT_SONNET_MODELSets the model ID used by the Sonnet alias.
ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTIONSets the model-picker description for the pinned Sonnet model.
ANTHROPIC_DEFAULT_SONNET_MODEL_NAMESets the model-picker display name for the pinned Sonnet model.
ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIESDeclares capabilities supported by the pinned Sonnet model.
ANTHROPIC_FEDERATION_RULE_IDConfigures Anthropic federation rule ID.
ANTHROPIC_FOUNDRY_API_KEYConfigures Anthropic foundry API key.
ANTHROPIC_FOUNDRY_AUTH_TOKENConfigures Anthropic foundry auth token.
ANTHROPIC_FOUNDRY_BASE_URLConfigures Anthropic foundry base url.
ANTHROPIC_FOUNDRY_RESOURCEConfigures Anthropic foundry resource.
ANTHROPIC_MODELSets the active model when no higher-priority model choice overrides it.
ANTHROPIC_ORGANIZATION_IDConfigures Anthropic organization ID.
ANTHROPIC_PROFILESelects an Anthropic authentication profile.
ANTHROPIC_SMALL_FAST_MODEL_AWS_REGIONConfigures Anthropic small fast model AWS region.
ANTHROPIC_VERTEX_BASE_URLOverrides the Google Cloud Agent Platform endpoint.
ANTHROPIC_VERTEX_PROJECT_IDSets the Google Cloud project for Agent Platform requests.
ANTHROPIC_WORKSPACE_IDConfigures Anthropic workspace ID.
API_FORCE_IDLE_TIMEOUTOverrides or disables the streaming body idle timeout.
API_TIMEOUT_MSSets the API request timeout in milliseconds.
AWS_BEARER_TOKEN_BEDROCKSets an Amazon Bedrock bearer token.
FALLBACK_FOR_ALL_PRIMARY_MODELSApplies fallback behavior across primary models.
VERTEX_REGION_CLAUDE_3_5_HAIKUOverrides the Google Cloud Agent Platform region for Claude 3 5 Haiku.
VERTEX_REGION_CLAUDE_3_5_SONNETOverrides the Google Cloud Agent Platform region for Claude 3 5 Sonnet.
VERTEX_REGION_CLAUDE_3_7_SONNETOverrides the Google Cloud Agent Platform region for Claude 3 7 Sonnet.
VERTEX_REGION_CLAUDE_4_0_OPUSOverrides the Google Cloud Agent Platform region for Claude 4 0 Opus.
VERTEX_REGION_CLAUDE_4_0_SONNETOverrides the Google Cloud Agent Platform region for Claude 4 0 Sonnet.
VERTEX_REGION_CLAUDE_4_1_OPUSOverrides the Google Cloud Agent Platform region for Claude 4 1 Opus.
VERTEX_REGION_CLAUDE_4_5_OPUSOverrides the Google Cloud Agent Platform region for Claude 4 5 Opus.
VERTEX_REGION_CLAUDE_4_5_SONNETOverrides the Google Cloud Agent Platform region for Claude 4 5 Sonnet.
VERTEX_REGION_CLAUDE_4_6_OPUSOverrides the Google Cloud Agent Platform region for Claude 4 6 Opus.
VERTEX_REGION_CLAUDE_4_6_SONNETOverrides the Google Cloud Agent Platform region for Claude 4 6 Sonnet.
VERTEX_REGION_CLAUDE_4_7_OPUSOverrides the Google Cloud Agent Platform region for Claude 4 7 Opus.
VERTEX_REGION_CLAUDE_4_8_OPUSOverrides the Google Cloud Agent Platform region for Claude 4 8 Opus.
VERTEX_REGION_CLAUDE_5_OPUSOverrides the Google Cloud Agent Platform region for Claude 5 Opus.
VERTEX_REGION_CLAUDE_5_SONNETOverrides the Google Cloud Agent Platform region for Claude 5 Sonnet.
VERTEX_REGION_CLAUDE_FABLE_5Overrides the Google Cloud Agent Platform region for Claude Fable 5.
VERTEX_REGION_CLAUDE_FABLE_5_1Overrides the Google Cloud Agent Platform region for Claude Fable 5 1.
VERTEX_REGION_CLAUDE_HAIKU_4_5Overrides the Google Cloud Agent Platform region for Claude Haiku 4 5.

Claude Code Runtime and Behavior

VariableWhat it controls
CLAUDE_AFK_COUNTDOWN_MSConfigures afk countdown milliseconds.
CLAUDE_AFK_TIMEOUT_MSConfigures afk timeout milliseconds.
CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTSConfigures agent SDK disable builtin agents.
CLAUDE_AGENT_SDK_MCP_NO_PREFIXConfigures agent SDK MCP no prefix.
CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MSConfigures async agent stall timeout milliseconds.
CLAUDE_AUTOCOMPACT_PCT_OVERRIDESets an earlier auto-compaction trigger percentage.
CLAUDE_AUTO_BACKGROUND_TASKSForces long-running agent tasks to move to the background automatically.
CLAUDE_AX_PREPARK_MSConfigures ax prepark milliseconds.
CLAUDE_AX_SCREEN_READERConfigures ax screen reader.
CLAUDE_AX_STARTUP_QUIET_MSConfigures ax startup quiet milliseconds.
CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIRConfigures bash maintain project working dir.
CLAUDE_BYTE_STREAM_IDLE_TIMEOUT_MSConfigures byte stream idle timeout milliseconds.
CLAUDE_CLIENT_PRESENCE_FILEPoints to a presence marker that suppresses mobile notifications while the computer is active.
CLAUDE_CODE_ACCESSIBILITYKeeps the native terminal cursor visible for accessibility tools.
CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MDLoads CLAUDE.md and related memory files from directories added with –add-dir.
CLAUDE_CODE_ALT_SCREEN_FULL_REPAINTForces full-frame repainting in fullscreen mode.
CLAUDE_CODE_ALWAYS_ENABLE_EFFORTSends the effort parameter for compatible custom or gateway model IDs.
CLAUDE_CODE_API_KEY_HELPER_TTL_MSSets how often apiKeyHelper credentials are refreshed.
CLAUDE_CODE_ARTIFACT_AUTO_OPENConfigures code artifact auto open.
CLAUDE_CODE_ARTIFACT_COMMENTSConfigures code artifact comments.
CLAUDE_CODE_ARTIFACT_COMMENTS_AUTOREACTConfigures code artifact comments autoreact.
CLAUDE_CODE_ATTRIBUTION_HEADERConfigures code attribution header.
CLAUDE_CODE_AUTO_BACKGROUND_WORKER_CHECKIN_SECONDSConfigures code auto background worker checkin seconds.
CLAUDE_CODE_AUTO_COMPACT_WINDOWSets the auto-compact context window in tokens.
CLAUDE_CODE_AUTO_CONNECT_IDEOverrides automatic IDE connection behavior.
CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MSConfigures code AWS chain resolve timeout milliseconds.
CLAUDE_CODE_BRIDGE_SESSION_IDExposes the active Remote Control session ID to subprocesses.
CLAUDE_CODE_BG_TASKS_REPORT_RUNNINGControls whether remote and headless sessions report that background agents are still running.
CLAUDE_CODE_BS_AS_CTRL_BACKSPACEConfigures code bs as ctrl backspace.
CLAUDE_CODE_CERT_STOREChooses CA certificate stores for TLS connections.
CLAUDE_CODE_CHILD_SESSIONMarks subprocesses directly spawned by Claude Code tools or hooks.
CLAUDE_CODE_CLIENT_CERTSets the client certificate file for mTLS.
CLAUDE_CODE_CLIENT_KEYSets the client private key file for mTLS.
CLAUDE_CODE_CLIENT_KEY_PASSPHRASESets the passphrase for an encrypted mTLS client key.
CLAUDE_CODE_DEBUG_LOGS_DIROverrides the debug log file path.
CLAUDE_CODE_DEBUG_LOG_LEVELSets the minimum debug-log severity.
CLAUDE_CODE_DISABLE_1M_CONTEXTDisables 1M-context model behavior and variants.
CLAUDE_CODE_DISABLE_ADAPTIVE_THINKINGDisables adaptive thinking.
CLAUDE_CODE_DISABLE_ADMIN_ENV_UNIONDisables admin env union.
CLAUDE_CODE_DISABLE_ADVISOR_TOOLDisables advisor tool.
CLAUDE_CODE_DISABLE_AGENT_VIEWDisables agent view.
CLAUDE_CODE_DISABLE_ALTERNATE_SCREENDisables alternate screen.
CLAUDE_CODE_DISABLE_ARTIFACTDisables artifact.
CLAUDE_CODE_DISABLE_ATTACHMENTSDisables attachments.
CLAUDE_CODE_DISABLE_AUTO_MEMORYDisables auto memory.
CLAUDE_CODE_DISABLE_BACKGROUND_TASKSDisables background tasks.
CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_DEFAULTDisables bedrock content type default.
CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_GUARDDisables bedrock content type guard.
CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFFDisables background exit handoff.
CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAPDisables background shell pressure reap.
CLAUDE_CODE_DISABLE_BUNDLED_SKILLSDisables bundled skills.
CLAUDE_CODE_DISABLE_CFC_PROMPTDisables CFC prompt.
CLAUDE_CODE_DISABLE_CLAUDE_MDSDisables Claude mds.
CLAUDE_CODE_DISABLE_CRONDisables cron.
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETASDisables experimental betas.
CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTSDisables explore plan agents.
CLAUDE_CODE_DISABLE_FAST_MODEDisables fast mode.
CLAUDE_CODE_DISABLE_FEEDBACK_SURVEYDisables feedback survey.
CLAUDE_CODE_DISABLE_FILE_CHECKPOINTINGDisables file checkpointing.
CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONSDisables Git instructions.
CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAPDisables legacy model remap.
CLAUDE_CODE_DISABLE_MOUSEDisables mouse.
CLAUDE_CODE_DISABLE_MOUSE_CLICKSDisables mouse clicks.
CLAUDE_CODE_DISABLE_MTLS_RELOAD_ON_STALE_CONNECTIONDisables mTLS reload on stale connection.
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFICDisables nonessential traffic.
CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACKDisables nonstreaming fallback.
CLAUDE_CODE_DISABLE_NOTIFICATION_PRESENCE_CHECKDisables notification presence check.
CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALLDisables official marketplace autoinstall.
CLAUDE_CODE_DISABLE_PERMISSION_PROMPT_NOTIFY_HOOKSDisables permission prompt notify hooks.
CLAUDE_CODE_DISABLE_POLICY_SKILLSDisables policy skills.
CLAUDE_CODE_DISABLE_TERMINAL_TITLEDisables terminal title.
CLAUDE_CODE_DISABLE_THINKINGDisables thinking.
CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENTDisables unknown model window enforcement.
CLAUDE_CODE_DISABLE_VIRTUAL_SCROLLDisables virtual scroll.
CLAUDE_CODE_DISABLE_WORKFLOWSDisables workflows.
CLAUDE_CODE_EFFORT_LEVELSets the effort level and takes precedence over command-line and in-session choices.
CLAUDE_CODE_ENABLE_APPEND_SUBAGENT_PROMPTEnables append subagent prompt.
CLAUDE_CODE_ENABLE_AWAY_SUMMARYEnables away summary.
CLAUDE_CODE_ENABLE_BACKGROUND_PLUGIN_REFRESHEnables background plugin refresh.
CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTELEnables feedback survey for OpenTelemetry.
CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMINGEnables fine grained tool streaming.
CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERYEnables gateway model discovery.
CLAUDE_CODE_ENABLE_PROMPT_SUGGESTIONEnables prompt suggestion.
CLAUDE_CODE_ENABLE_TASKSEnables tasks.
CLAUDE_CODE_ENABLE_TELEMETRYEnables telemetry.
CLAUDE_CODE_ENABLE_TODO_TOOLSEnables todo tools.
CLAUDE_CODE_EXIT_AFTER_STOP_DELAYConfigures code exit after stop delay.
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMSConfigures code experimental agent teams.
CLAUDE_CODE_EXTRA_BODYConfigures code extra body.
CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENSConfigures code file read max output tokens.
CLAUDE_CODE_FORCE_SESSION_PERSISTENCEForces session persistence behavior.
CLAUDE_CODE_FORCE_STRIKETHROUGHForces strikethrough behavior.
CLAUDE_CODE_FORWARD_SUBAGENT_TEXTIncludes subagent text and thinking in compatible stream-json output.
CLAUDE_CODE_GIT_BASH_PATHSets the Git Bash executable path on Windows.
CLAUDE_CODE_GLOB_HIDDENControls whether the Glob tool includes hidden files.
CLAUDE_CODE_GLOB_NO_IGNOREControls whether the Glob tool ignores .gitignore rules.
CLAUDE_CODE_GLOB_TIMEOUT_SECONDSSets the Glob tool discovery timeout.
CLAUDE_CODE_GOAL_CHECKIN_MINUTESSets how often Claude checks on background work tied to an active goal.
CLAUDE_CODE_GATEWAY_HINT_HEADERSSends request-class, agent, tool-duration, and compaction hints to an LLM gateway when set to 1.
CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MSSets the timeout for an LLM gateway’s /v1/models discovery request.
CLAUDE_CODE_HIDE_CWDConfigures code hide cwd.
CLAUDE_CODE_IDE_HOST_OVERRIDEConfigures code IDE host override.
CLAUDE_CODE_IDE_SKIP_AUTO_INSTALLConfigures code IDE skip auto install.
CLAUDE_CODE_IDE_SKIP_VALID_CHECKConfigures code IDE skip valid check.
CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTSSets the maximum number of concurrently running subagents.
CLAUDE_CODE_MAX_CONTEXT_TOKENSOverrides the assumed context-window size for the active model.
CLAUDE_CODE_MAX_OUTPUT_TOKENSSets the maximum output tokens for model requests.
CLAUDE_CODE_MAX_RETRIESSets the API request retry count.
CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTHSets how many nested subagent layers can be created.
CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCYSets the parallel tool and subagent execution limit.
CLAUDE_CODE_MAX_TURNSSets a default turn cap when no CLI turn limit is supplied.
CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSIONCaps WebSearch calls in one session.
CLAUDE_CODE_MCP_ALLOWLIST_ENVRestricts stdio MCP servers to a safe baseline environment plus configured variables.
CLAUDE_CODE_MCP_AUTO_BACKGROUND_MSSets when a long MCP tool call moves to the background.
CLAUDE_CODE_MCP_STARTUP_WAIT_MSSets how long the first non-interactive turn waits for MCP servers to connect; use 0 to skip the wait.
CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUTSets the idle timeout for MCP tool calls.
CLAUDE_CODE_MESSAGING_SOCKETExposes the cross-session inbox socket path to hooks and shell commands.
CLAUDE_CODE_MESSAGING_TOKENExposes the per-session inbox authentication token to hooks and shell commands.
CLAUDE_CODE_NATIVE_CURSORConfigures code native cursor.
CLAUDE_CODE_NEW_INITConfigures code new init.
CLAUDE_CODE_NO_FLICKERConfigures code no flicker.
CLAUDE_CODE_OAUTH_REFRESH_TOKENConfigures code OAuth refresh token.
CLAUDE_CODE_OAUTH_SCOPESConfigures code OAuth scopes.
CLAUDE_CODE_OAUTH_TOKENConfigures code OAuth token.
CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTHConfigures Claude Code OpenTelemetry content max length.
CLAUDE_CODE_OTEL_DIAG_STDERRConfigures Claude Code OpenTelemetry diag stderr.
CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MSConfigures Claude Code OpenTelemetry flush timeout milliseconds.
CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MSConfigures Claude Code OpenTelemetry headers helper debounce milliseconds.
CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MSConfigures Claude Code OpenTelemetry shutdown timeout milliseconds.
CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATEControls package-manager background upgrades for supported installations.
CLAUDE_CODE_PERFORCE_MODEAdds Perforce-aware handling for read-only files.
CLAUDE_CODE_PLUGIN_CACHE_DIRConfigures code plugin cache dir.
CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MSConfigures code plugin Git timeout milliseconds.
CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILUREConfigures code plugin keep marketplace on failure.
CLAUDE_CODE_PLUGIN_PREFER_HTTPSConfigures code plugin prefer HTTPS.
CLAUDE_CODE_PROCESS_WRAPPERRuns Claude Code child processes through a required corporate launcher.
CLAUDE_CODE_PROJECT_DIR_NAMEOverrides the project directory name used under a custom Claude config directory.
CLAUDE_CODE_PROMPT_CACHE_TTLSets the main conversation prompt-cache TTL.
CLAUDE_CODE_PROPAGATE_TRACEPARENTConfigures code propagate traceparent.
CLAUDE_CODE_PROVIDER_MANAGED_BY_HOSTMarks the provider as managed by a host platform.
CLAUDE_CODE_REMOTE_SESSION_IDExposes the cloud or remote session identifier.
CLAUDE_CODE_RESUME_PROMPTConfigures code resume prompt.
CLAUDE_CODE_RETRY_WATCHDOGUses extended retry behavior for unattended sessions.
CLAUDE_CODE_SAFE_MODEStarts Claude Code with customizations disabled for troubleshooting.
CLAUDE_CODE_SCRIPT_CAPSSets limits for script invocations.
CLAUDE_CODE_SCROLL_SPEEDSets terminal scroll speed.
CLAUDE_CODE_SEND_FEEDBACKConfigures code send feedback.
CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MSConfigures code sessionend hooks timeout milliseconds.
CLAUDE_CODE_SESSION_IDExposes or sets the current session identifier where supported.
CLAUDE_CODE_SIMPLEEnables the minimal environment used by bare mode.
CLAUDE_CODE_SIMPLE_SYSTEM_PROMPTUses the simplified system-prompt behavior for minimal runs.
CLAUDE_CODE_SKIP_ANTHROPIC_AWS_AUTHSkips anthropic AWS auth.
CLAUDE_CODE_SKIP_AWS_CRED_CACHESkips AWS cred cache.
CLAUDE_CODE_SKIP_BEDROCK_AUTHSkips bedrock auth.
CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORSSkips fast mode network errors.
CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECKSkips fast mode org check.
CLAUDE_CODE_SKIP_FOUNDRY_AUTHSkips foundry auth.
CLAUDE_CODE_SKIP_MANTLE_AUTHSkips mantle auth.
CLAUDE_CODE_SKIP_PROMPT_HISTORYSkips prompt history.
CLAUDE_CODE_SKIP_VERTEX_AUTHSkips vertex auth.
CLAUDE_CODE_STOP_HOOK_BLOCK_CAPCaps repeated Stop or SubagentStop hook blocking.
CLAUDE_CODE_SUBAGENT_MODELSets the default model for subagents, teammates, and workflow agents.
CLAUDE_CODE_SUBAGENT_MODEL_FORCEForces the configured subagent model across agent types.
CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTLSets the prompt-cache TTL used by subagents.
CLAUDE_CODE_SUBPROCESS_ENV_SCRUBConfigures code subprocess env scrub.
CLAUDE_CODE_SYNC_PLUGIN_INSTALLConfigures plugin install.
CLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MSConfigures plugin install timeout milliseconds.
CLAUDE_CODE_SYNC_SKILLSConfigures skills.
CLAUDE_CODE_SYNC_SKILLS_INSTALL_TIMEOUT_MSConfigures skills install timeout milliseconds.
CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MSConfigures skills wait timeout milliseconds.
CLAUDE_CODE_SYNTAX_HIGHLIGHTConfigures code syntax highlight.
CLAUDE_CODE_TASK_LIST_IDShares a task list across Claude Code sessions that use the same ID.
CLAUDE_CODE_TEAM_TEARDOWN_PARK_TIMEOUT_MSConfigures code team teardown park timeout milliseconds.
CLAUDE_CODE_TMPDIROverrides Claude Code’s internal temporary directory.
CLAUDE_CODE_TMUX_TRUECOLORAllows 24-bit truecolor output inside tmux.
CLAUDE_CODE_TOOL_MEMORY_CGROUP_EXCLUDEChooses process types excluded from the Linux tool-memory cap.
CLAUDE_CODE_TOOL_MEMORY_LIMITCaps tool-process memory on Linux and WSL.
CLAUDE_CODE_USER_DIALOG_TIMEOUT_MSSets a deadline for remote-client dialogs and held-message approvals.
CLAUDE_CODE_USE_ANTHROPIC_AWSUses Claude Platform on AWS.
CLAUDE_CODE_USE_BEDROCKUses Amazon Bedrock.
CLAUDE_CODE_USE_FOUNDRYUses Microsoft Foundry.
CLAUDE_CODE_USE_MANTLEUses the Amazon Bedrock Mantle endpoint.
CLAUDE_CODE_USE_NATIVE_FILE_SEARCHUses Node.js file APIs for configuration discovery rather than bundled ripgrep.
CLAUDE_CODE_USE_POWERSHELL_TOOLControls availability of the native PowerShell tool.
CLAUDE_CODE_USE_VERTEXUses Google Cloud’s Agent Platform.
CLAUDE_CODE_WEBFETCH_CACHE_TTL_MSSets the WebFetch response-cache lifetime.
CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTSSets the Workflow tool’s per-run concurrent-agent limit from 1 to 256.
CLAUDE_CODE_WORKFLOW_PREFIX_STAGGER_MSSets the maximum stagger for same-prefix workflow agents.
CLAUDE_CONFIG_DIROverrides the default ~/.claude configuration directory.
CLAUDE_DISABLE_ADOPTStops in-flight background work when a session moves to the background rather than carrying that work over.
CLAUDE_EFFORTExposes the current effort level to Bash and hook subprocesses.
CLAUDE_ENABLE_BYTE_WATCHDOGForces the byte-level streaming idle watchdog on or off.
CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCKEnables the byte-level streaming watchdog for Bedrock event streams.
CLAUDE_ENABLE_STREAM_WATCHDOGConfigures enable stream watchdog.
CLAUDE_ENV_FILEConfigures env file.
CLAUDE_PIDConfigures pid.
CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIXPrefixes automatically generated Remote Control session names.
CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MSSets the streaming first-byte timeout.
CLAUDE_STREAM_IDLE_TIMEOUT_MSSets the event-level streaming idle timeout.
CLAUDE_SUBAGENT_BG_SHELL_MAX_MSSets the lifetime limit for background shell commands owned by subagents.
CLAUDE_GATEWAY_DRAIN_TIMEOUT_MSSets how long the Claude apps gateway lets in-flight requests finish after SIGTERM.
CLAUDE_GATEWAY_PROXY_IS_EGRESS_BOUNDARYSends destination hostnames to the configured forward proxy instead of resolving them locally when set to 1.

MCP, Networking, Telemetry, and Other Variables

VariableWhat it controls
BASH_DEFAULT_TIMEOUT_MSSets the default Bash command timeout.
BASH_MAX_OUTPUT_LENGTHSets the maximum Bash output returned to Claude.
BASH_MAX_TIMEOUT_MSSets the maximum Bash timeout Claude can request.
BETA_TRACING_ENDPOINTSets the OTLP endpoint used for detailed beta tracing.
CCR_FORCE_BUNDLEForces cloud dispatch to bundle and upload the local repository.
CLAUDECODEMarks subprocesses launched from Claude Code or its IDE integrations.
DEBUGEnables debug logging.
DISABLE_AUTOUPDATERDisables autoupdater.
DISABLE_AUTO_COMPACTDisables auto compact.
DISABLE_COMPACTDisables compact.
DISABLE_COST_WARNINGSDisables cost warnings.
DISABLE_DOCTOR_COMMANDDisables doctor command.
DISABLE_ERROR_REPORTINGDisables error reporting.
DISABLE_EXTRA_USAGE_COMMANDDisables extra usage command.
DISABLE_FEEDBACK_COMMANDDisables feedback command.
DISABLE_GROWTHBOOKDisables growthbook.
DISABLE_INSTALLATION_CHECKSDisables installation checks.
DISABLE_INSTALL_GITHUB_APP_COMMANDDisables install github app command.
DISABLE_INTERLEAVED_THINKINGDisables interleaved thinking.
DISABLE_LOGIN_COMMANDDisables login command.
DISABLE_LOGOUT_COMMANDDisables logout command.
DISABLE_PROMPT_CACHINGDisables prompt caching.
DISABLE_PROMPT_CACHING_FABLEDisables prompt caching fable.
DISABLE_PROMPT_CACHING_HAIKUDisables prompt caching haiku.
DISABLE_PROMPT_CACHING_OPUSDisables prompt caching opus.
DISABLE_PROMPT_CACHING_SONNETDisables prompt caching sonnet.
DISABLE_TELEMETRYDisables telemetry and feature-flag fetching.
DISABLE_UPDATESBlocks all update paths, including manual updates.
DISABLE_UPGRADE_COMMANDDisables upgrade command.
DO_NOT_TRACKOpts out of telemetry using the common DO_NOT_TRACK convention.
ENABLE_BETA_TRACING_DETAILEDEnables detailed beta tracing when a tracing endpoint is configured.
ENABLE_CLAUDEAI_MCP_SERVERSControls loading of MCP connectors configured in Claude.ai.
ENABLE_PROMPT_CACHING_1HRequests a one-hour prompt-cache TTL.
ENABLE_TOOL_SEARCHControls deferred MCP tool discovery and ToolSearch behavior.
FORCE_AUTOUPDATE_PLUGINSForces autoupdate plugins.
FORCE_HYPERLINKForces hyperlink.
FORCE_PROMPT_CACHING_5MForces prompt caching 5m.
HTTPS_PROXYSets the HTTPS proxy.
HTTP_PROXYSets the HTTP proxy.
IS_DEMOConfigures is demo.
MAX_MCP_OUTPUT_TOKENSSets the MCP output-token limit for tools without their own limit.
MAX_STRUCTURED_OUTPUT_RETRIESSets retries for structured-output validation.
MAX_THINKING_TOKENSSets the fixed thinking-token budget where fixed thinking is used.
MCP_CLIENT_SECRETSupplies an MCP OAuth client secret when requested by MCP configuration.
MCP_CONNECTION_NONBLOCKINGConfigures MCP connection nonblocking.
MCP_CONNECT_TIMEOUT_MSSets the MCP connection timeout.
MCP_DISCOVERY_CACHEConfigures MCP discovery cache.
MCP_DISCOVERY_CACHE_MAX_STALE_SConfigures MCP discovery cache max stale s.
MCP_DISCOVERY_CACHE_STRIKESConfigures MCP discovery cache strikes.
MCP_DISCOVERY_CACHE_TTL_SConfigures MCP discovery cache TTL s.
MCP_OAUTH_CALLBACK_PORTSets the local OAuth callback port for MCP authentication.
MCP_PROTOCOL_NEGOTIATIONConfigures MCP protocol negotiation.
MCP_REMOTE_SERVER_CONNECTION_BATCH_SIZESets parallel startup connections for remote MCP servers.
MCP_SDK_GENERATIONChooses the MCP client runtime generation.
MCP_SERVER_CONNECTION_BATCH_SIZESets parallel startup connections for local stdio MCP servers.
MCP_TIMEOUTSets the MCP server startup timeout.
MCP_TOOL_TIMEOUTSets the overall MCP tool execution timeout.
NO_PROXYLists hosts that bypass configured proxies.
OTEL_ATTRIBUTE_VALUE_LENGTH_LIMITSets the OpenTelemetry attribute-value length limit.
OTEL_EXPORTER_OTLP_ENDPOINTSets the OpenTelemetry OTLP endpoint.
OTEL_EXPORTER_OTLP_HEADERSSets headers sent to the OTLP exporter.
OTEL_EXPORTER_OTLP_PROTOCOLSets the OTLP transport protocol.
OTEL_LOGS_EXPORTERSelects the OpenTelemetry logs exporter.
OTEL_LOG_ASSISTANT_RESPONSESControls logging of assistant response text in OpenTelemetry events.
OTEL_LOG_RAW_API_BODIESControls logging of raw API request and response bodies.
OTEL_LOG_TOOL_CONTENTControls logging of tool input and output content.
OTEL_LOG_TOOL_DETAILSControls logging of detailed tool metadata.
OTEL_LOG_USER_PROMPTSControls logging of user prompt text.
OTEL_METRICS_EXPORTERSelects the OpenTelemetry metrics exporter.
OTEL_METRICS_INCLUDE_ACCOUNT_UUIDControls whether account UUID is attached to metrics.
OTEL_METRICS_INCLUDE_ENTRYPOINTControls whether the session entrypoint is attached to metrics.
OTEL_METRICS_INCLUDE_REPOSITORYAdds vcs.* repository attributes to OpenTelemetry metrics and events.
OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTESControls whether OTEL_RESOURCE_ATTRIBUTES are copied to metric labels.
OTEL_METRICS_INCLUDE_SESSION_IDControls whether session ID is attached to metrics.
OTEL_METRICS_INCLUDE_VERSIONControls whether Claude Code version is attached to metrics.
OTEL_METRIC_EXPORT_INTERVALSets the OpenTelemetry metric export interval.
OTEL_RESOURCE_ATTRIBUTESAdds resource attributes to OpenTelemetry data.
SLASH_COMMAND_TOOL_CHAR_BUDGETSets the metadata character budget exposed to the Skill tool; the legacy name remains accepted.
TASK_MAX_OUTPUT_LENGTHSets the output limit for subagent results before they are saved to disk.
USE_BUILTIN_RIPGREPChooses bundled ripgrep or a system-installed rg binary.

Deprecated or No-Op Environment Variables

Older variableCurrent note
ANTHROPIC_SMALL_FAST_MODELDeprecated background-model variable; use ANTHROPIC_DEFAULT_HAIKU_MODEL.
ENABLE_PROMPT_CACHING_1H_BEDROCKDeprecated alias; use ENABLE_PROMPT_CACHING_1H.
CLAUDE_CODE_CONNECT_TIMEOUT_MSRemoved and no longer changes behavior; use API_TIMEOUT_MS for request timing.
CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSIONRemoved and no longer changes behavior; current limits use concurrency and spawn-depth controls.
CLAUDE_CODE_ENABLE_AUTO_MODECompatibility variable with no current effect; auto mode is available through permission modes.
CLAUDE_CODE_ENABLE_OPUS_4_7_FAST_MODERemoved fast-mode rollout variable.
CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDENo-op compatibility variable from an older fast-mode rollout.

Older, Removed, and Replaced Command Names

Old commandUse now
/pr-comments [PR]Ask Claude directly to inspect pull-request comments, or use the current code-review/GitHub workflow.
/tagLegacy command name; do not rely on it in current installations.
/ultraplanUse Plan Mode through /plan.
/vimSet Editor mode through /config.

Useful Claude Code Workflows

Start a New Repository

/init
/status
/model

Create project guidance, confirm the environment, and choose the model before starting work.

Understand an Unfamiliar Codebase

/status
/context
/plan map the project structure and main entry points

Check the session, inspect loaded context, and plan the investigation before editing.

Review a Pull Request

/code-review high 123
/security-review
/diff

Run a correctness review, check security-sensitive changes, and inspect the final diff.

Prepare a Safe Refactor

/review
/plan refactor the auth flow without changing behavior
/diff

Review the current state, plan the refactor, then inspect the resulting change.

Manage a Long Session

/context
/compact keep decisions and unresolved issues
/usage

Check what is filling context, compact deliberately, and review current usage.

Run a Multi-File Change

/review
/code-review --fix
/batch rename OldThing NewThing

Review first, apply review fixes where appropriate, then fan out a large repetitive change.

Debug a Failure

/debug trace the failing checkout flow
/review
/diff

Collect debugging information, review the change, and inspect the resulting patch.

Switch Between Tasks

/rename feature-auth
/clear
/resume feature-auth

Name a conversation, start a fresh task, then return to the earlier session later.

Set Up and Use MCP

/mcp
/mcp__github__list_prs

Configure or authenticate the server, then run a prompt published by that server.

Work Across Devices

/remote-control
/remote-env
/teleport

Expose a local session remotely, choose a cloud environment, or pull a web session back to the terminal.

Review Usage and Limits

/usage
/cost
/stats

Open the usage view and its cost or statistics tabs.

Start a Headless One-Off Task

claude -p "review this diff and list risks"

Run one non-interactive task and return the result to the shell.

Reduce Repetitive Permission Prompts

/fewer-permission-prompts
/permissions
/hooks

Find common read-only calls, adjust rules, and inspect hook behavior.

Work Toward a Clear Goal

/goal fix the failing checkout test and stop after tests pass
/context
/review

Give Claude a completion condition, then monitor context and review the result.

Custom, Community, and Internal Commands

NameWhere it can appear
/ant-traceInternal tracing name seen in source-oriented references.
/backfill-sessionsInternal session-data maintenance name.
/break-cacheInternal cache-maintenance name.
/bridgeOlder or internal bridge-session name.
/bridge-kickOlder or internal bridge restart name.
/briefNon-standard brief-output command name.
/bughunterCommunity or experimental bug-finding workflow name.
/commitCommon community custom command for generating and creating a commit.
/commit-push-prCommon custom workflow that commits, pushes, and opens a PR.
/ctx_vizInternal context-debugging name.
/debug-tool-callInternal tool-call debugging name.
/envNon-standard environment-inspection command name.
/filesNon-standard context-file listing command name.
/fix-pipelineCommunity CI repair command name.
/good-claudeEaster-egg or experimental name found in source-oriented lists.
/init-verifiersExperimental verifier-setup name.
/issueCommunity GitHub issue command name.
/lintCommon community custom command for lint workflows.
/merge-to-mainCommunity merge workflow name.
/mock-limitsInternal rate-limit testing name.
/oauth-refreshInternal or older OAuth refresh name.
/perf-issueInternal performance-reporting name.
/prCommon community custom command for pull-request creation.
/pr_commentsOlder internal underscore form associated with the removed /pr-comments command.
/pushCommon community custom command for pushing the current branch.
/remote-setupOlder or experimental remote-session setup name.
/reset-limitsInternal rate-limit testing name.
/sessionNon-standard session-management UI name found in older references.
/summaryNon-standard session-summary name found in older references.
/thinkbackInternal thinking-analysis name.
/thinkback-playInternal animated thinking-replay name.
/vitestCommunity custom command for Vitest workflows.
/x402Experimental integration name found in source-oriented lists.

FAQs

Q: What is the difference between a slash command and a CLI command in Claude Code?
A: A slash command starts with / and runs inside an active Claude Code session. A CLI command or flag runs in your shell, such as claude -p, claude update, or claude --model sonnet.

Q: How do I see all commands available in my Claude Code installation?
A: Type / on an empty prompt and start typing to filter the command menu. The menu reflects commands, skills, plugins, and MCP prompts available in that installation, subject to platform, account, provider, and policy restrictions.

Q: What is the difference between /clear and /compact?
A: /clear starts a new conversation with empty conversational context. /compact summarizes the current conversation so you can continue the same task with less context pressure.

Q: What does /plan do?
A: /plan enters Plan Mode and can take an optional task description. Use it when you want Claude to inspect and plan before making changes.

Q: How do I create custom commands?
A: Create a Claude Code skill or command definition in the appropriate project or user configuration directory. Custom skills can appear in the / menu and can accept arguments. Use /reload-skills after changing skill files during a running session.

Q: Can MCP servers add slash commands?
A: Yes. MCP servers can publish prompts that appear as commands in the form /mcp__servername__promptname. The exact list depends on the servers connected to your installation.

Q: What is the difference between /doctor and /status?
A: /doctor runs a diagnostic checkup and can propose fixes. /status shows current version, model, account, connectivity, and session information.

Q: How do I review a pull request now that /pr-comments is gone?
A: Ask Claude directly to inspect the pull-request comments, or use /code-review or /review for the review workflow. Use the GitHub App or GitHub CLI integration when the task needs repository or PR access.

Q: Can Claude Code run non-interactively in CI or scripts?
A: Yes. Use claude -p "prompt" for a non-interactive run. Flags such as --output-format, --json-schema, --max-turns, and --max-budget-usd control machine-readable and bounded runs.

Q: How do I change keyboard shortcuts?
A: Run /keybindings to open the keybindings configuration. Built-in editing and terminal shortcuts can also depend on your terminal, operating system, and editor mode.

Related Resources

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest & top AI tools sent directly to your email.

Subscribe now to explore the latest & top AI tools and resources, all in one convenient newsletter. No spam, we promise!