Claude Code includes slash commands for project setup, context management, permissions, MCP servers, plugins, agents, code review, remote sessions, and CLI automation.
This reference organizes the full command set by real coding tasks first, then provides a complete A-Z command index for quick lookup.
Public commands are separated from internal, leak-based, removed, and community commands so each entry is easier to evaluate before using it in a current Claude Code installation.
Last audited: June 8, 2026
Table Of Contents
- Quick Navigation
- Command Entry Points
- Start and Configure Claude Code
- Manage Context and Sessions
- Use MCP, Plugins, Skills, and Agents
- Review, Debug, and Change Code
- Use GitHub, PR, and Release Workflows
- Work Remotely or Across Devices
- A-Z Slash Command Index
- Claude Code CLI Commands and Flags
- Real Workflows
- Internal, Experimental, and Compatibility Commands
The task sections group commands by setup, context management, code review, MCP, plugins, agents, remote work, and diagnostics. The A-Z index lists every slash command name in one table. The CLI and environment variable sections cover automation, background sessions, enterprise settings, and terminal behavior.
Command Entry Points
These entry points cover the most common command families. The full command tables and A-Z index remain below for complete lookup.
| Need | Start with |
|---|---|
| First project setup | /init, /status, /model |
| Session and context control | /context, /compact, /clear, /cd, /resume |
| Code review | /review, /security-review, /code-review, /diff |
| Debugging | /debug, /plan, /diff |
| MCP setup | /mcp, /mcp__[server]__[prompt] |
| Plugins and skills | /plugin, /skills, /reload-skills, /reload-plugins |
| Agents and background work | /agents, /workflows, claude agents, claude --bg --exec |
| GitHub workflows | /install-github-app, /pr-comments, /ultrareview |
| Usage and costs | /usage, /cost, /stats, /usage-credits |
| Troubleshooting | /doctor, /permissions, /terminal-setup, /release-notes |
Start and Configure Claude Code
Use these commands to configure Claude Code, manage memory, adjust permissions, and control the local environment.
| Command | What it does | Notes |
|---|---|---|
/add-dir <path> | Adds another directory to the working scope. | Useful for monorepos and adjacent projects. |
/color [color] | Changes the session accent color. | Now syncs the accent color to claude.ai/code when Remote Control is connected. |
/config | Opens Claude Code settings. | Editor mode and ultracode keyword trigger settings live here. |
/doctor | Runs diagnostics. | Useful after install or upgrade issues. You can press f to let Claude fix reported issues. |
/effort [low|medium|high|xhigh|max|auto] | Controls reasoning effort. | xhigh is now the default high-effort option for hard Opus 4.8 tasks. Running /effort without arguments opens an interactive slider and confirms when your choice will become the default for new sessions. |
/env | Shows or manages environment settings. | Seen in leak-based references; may not appear in standard public builds. |
/fast [on|off] | Toggles fast mode. | Fast mode is available for supported Opus models. The old CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE path is now a no-op. |
/help | Shows help and available commands. | Good fallback when commands change. |
/hooks | Manages hook scripts and hook events. | SessionStart hooks can reload skills or set the session title, and MessageDisplay hooks can transform or hide displayed assistant text. |
/init | Creates CLAUDE.md for project instructions. | One of the most important setup commands. |
/init-verifiers | Sets up verifier hooks. | Seen in leak-based references; may not appear in standard public builds. |
/keybindings | Customizes keyboard shortcuts. | Rename any custom modelPicker:setAsDefault binding to modelPicker:thisSessionOnly after the 2.1.153 shortcut change. |
/login | Signs in to Claude Code. | Supports current auth flows. |
/logout | Signs out. | Now signs out from the main app instead of being sent to a background session. |
/memory | Opens or edits Claude memory files. | Includes CLAUDE.md workflows. |
/model [model] | Switches the active model. | The model picker now saves the selection as the default for new sessions. Press s to switch only the current session. Gateway model discovery remains opt-in via CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1. |
/output-style [style] | Changes response formatting style. | Useful for concise vs detailed output. |
/permissions | Manages permission mode and recent denials. | Useful when commands are blocked. |
/privacy-settings | Opens privacy or data settings. | Seen in leak-based references; may not appear in standard public builds. |
/sandbox | Opens sandbox controls. | Sandbox status still appears in /status and when a command is blocked. |
/sandbox-toggle | Internal sandbox toggle name. | Leak-based/internal naming. |
/team-onboarding | Generates a teammate ramp-up guide from your local Claude Code usage. | Added in v2.1.101. |
/terminal-setup | Configures terminal integration. | Can disable GPU acceleration in VS Code, Cursor, and Devin Desktop integrated terminals to prevent garbled text. |
/terminalSetup | Internal camelCase form of /terminal-setup. | Leak-based/internal naming. |
/theme | Changes or creates themes. | Supports Auto (match terminal), named custom themes, JSON themes in ~/.claude/themes/, and plugin-shipped themes. |
/scroll-speed | Tunes mouse wheel scroll speed. | Includes a live preview. Useful in VS Code, Cursor, and terminal environments where scroll speed feels off. |
/tui | Switches the terminal UI mode. | Switch terminal UI mode; use /tui fullscreen for flicker-free rendering in the same conversation. |
Vim mode | Editor mode available through /config. | /vim was removed in v2.1.92. Vim mode supports visual modes, and / in NORMAL mode opens reverse history search. |
Manage Context and Sessions
Use these commands to manage conversation state, context size, checkpoints, and session history.
| Command | What it does | Notes |
|---|---|---|
/branch [name] | Branches or forks the current conversation or workflow. | /fork appears as an alias in some references. |
/cd <path> | Moves the current session to a new working directory. | Useful when you need to change folders without breaking the prompt cache mid-session. |
/clear | Clears the current conversation context. | Useful when switching to a different task. |
/compact [focus] | Compresses the session to save context tokens. | Example: /compact keep API decisions only |
/goal | Sets a completion condition and lets Claude keep working across turns until it is met. | Works in interactive mode, -p, and Remote Control. Shows elapsed time, turns, and tokens in an overlay panel. |
/context | Shows how the context window is being used. | Useful before compacting. Newer versions show model-aware per-skill token estimates and plugin names for plugin-sourced skills. |
/copy [N] | Copies the latest response or a selected response. | Common for code and generated text. |
/cost | Opens cost information. | Merged into /usage in v2.1.118; still works as a shortcut to the relevant Usage tab. |
/diff | Opens an interactive diff viewer. | The detail view now supports keyboard scrolling with arrows, j/k, Page Up/Page Down, Space, Home, and End. |
/export [filename] | Exports the conversation. | Commonly used for Markdown exports. |
/rename [name] | Renames the current session. | Useful when juggling multiple tasks. |
/resume [session] | Reopens an earlier session. | Supports named and background sessions. Press Ctrl+A to show all projects. |
/rewind | Rewinds to an earlier checkpoint or state. | Useful when the conversation goes off track. Alias: /undo |
/status | Shows current session and environment status. | Good command to run first. |
/summary | Generates a session summary. | Seen in leak-based references; may not appear in standard public builds. |
/session | Opens session management UI. | Seen in leak-based references; may not appear in standard public builds. |
/share | Shares a session. | Seen in leak-based references; may not appear in standard public builds. |
Use MCP, Plugins, Skills, and Agents
Use these commands to extend Claude Code with skills, agents, plugins, and connected MCP servers.
| Command | What it does | Notes |
|---|---|---|
/agents | Manages subagents. | Use claude agents for the new agent view, which lists running, blocked, and completed Claude Code sessions. |
/bridge | Manages IDE or bridge sessions. | Seen in leak-based references; may not appear in standard public builds. |
/bridge-kick | Force-restarts a bridge connection. | Seen in leak-based references; may not appear in standard public builds. |
/claude-api | Loads the Claude API or SDK helper workflow. | Useful for API-related work. Updated for Opus 4.8 migration guidance in recent versions. |
/less-permission-prompts | Scans transcripts for common read-only Bash and MCP tool calls and proposes a prioritized allowlist for .claude/settings.json. | Added in v2.1.111. |
/mcp | Manages MCP servers. | Also unlocks dynamic MCP slash commands. Reconnect picks up .mcp.json edits without a restart. |
/plugin | Opens plugin management. | Plugin details show component inventory, hook event names, MCP server names, LSP servers, and projected per-session token cost. Plugins in .claude/skills directories now load automatically. |
/plugin list | Lists installed plugins. | Supports --enabled and --disabled filters. |
/reload-plugins | Hot-reloads installed plugins. | Useful while testing plugins and available from Remote Control clients. |
/reload-skills | Re-scans skill directories without restarting Claude Code. | Useful after adding or changing skills during a session. |
/skills | Lists available skills. | Public command. Newer versions add type-to-filter search and show plugin-sourced skill context more clearly. |
Skills and custom slash commands can use disallowed-tools in frontmatter to remove tools while that workflow is active.
MCP Slash Command Pattern
Claude Code can generate commands dynamically from connected MCP servers:
/mcp__[server]__[prompt] [args]Examples:
/mcp__github__list_prs/mcp__github__create_pr/mcp__jira__create_issue/mcp__linear__get_sprint
These commands only appear after the relevant MCP server is connected.
Review, Debug, and Change Code
These commands are the ones most people use during real development work.
| Command | What it does | Notes |
|---|---|---|
/advisor | Architecture or design advice workflow. | Seen in leak-based references; may not appear in standard public builds. |
/batch | Applies one change across many files or worktrees. | Good for repetitive project-wide edits. |
/brief | Brief-output mode toggle. | Seen in leak-based references; may not appear in standard public builds. |
/btw <question> | Asks a side question without pulling in the full task context. | Press c to copy the raw Markdown answer while preserving formatting for later paste. |
/bughunter | Bug-finding workflow. | Seen in leak-based references; may not appear in standard public builds. |
/debug [desc] | Runs a guided debugging workflow. | Good for tracing bugs step by step. |
/usage-credits | Shows usage credits information. | Replaces /extra-usage; the older name remains an alias. |
/feedback | Sends feedback. | Public command. |
/focus | Toggles Focus view. | Focus view is no longer tied to Ctrl+O. |
/files | Lists files in the current context. | Seen in leak-based references; may not appear in standard public builds. |
/insights | Shows usage or session insights. | Public command. |
/loop [interval] | Runs a recurring or scheduled workflow. | Useful for periodic checks and automations. Alias: /proactive. |
/passes | Runs a multi-pass workflow. | Seen in leak-based references; may not appear in standard public builds. |
/plan [desc] | Switches into plan mode. | Useful before larger changes. |
/powerup | Opens interactive feature lessons. | Added in 2026. |
/pr-comments [PR] | Fetches GitHub PR comments. | Public name. |
/pr_comments | Internal underscore form of /pr-comments. | Leak-based/internal naming. |
/rate-limit-options | Opens rate-limit options. | Seen in leak-based references; may not appear in standard public builds. |
/release-notes | Opens release notes. | Public command. |
/review | Reviews current code changes. | One of the most-used coding commands. |
/security-review | Runs a security-focused review. | Useful before merge or release. |
/simplify | Runs a cleanup-only review and applies simplification, reuse, efficiency, and structure fixes. | Use /code-review --fix when you want bug-hunting fixes instead. |
/code-review [effort] | Reviews code for correctness issues. | Use --fix to apply findings to the working tree or --comment to post inline GitHub PR comments. |
/stats | Opens usage statistics. | Merged into /usage in v2.1.118; still works as a shortcut to the relevant Usage tab. |
/tag | Legacy tag command. | Removed in v2.1.92. |
/tasks | Manages background tasks. | Seen in leak-based references; may not appear in standard public builds. |
/ultraplan | Runs a more detailed planning workflow. | Remote-session flows now auto-create a default cloud environment in newer versions. |
/ultrareview [PR#] | Runs a comprehensive cloud code review using parallel multi-agent analysis and critique. | Use it with no arguments to review the current branch, or pass a PR number to review a specific GitHub PR. |
/usage | Shows plan limits, quota usage, cost, and statistics. | Shows category details for skills, subagents, plugins, MCP servers, and large session files; /cost and /stats open its relevant tabs. |
/workflows | Opens dynamic workflow runs. | Use it to view larger background workflows created from workflow-style prompts. |
Use GitHub, PR, and Release Workflows
These commands are related to branches, commits, pull requests, and release workflows.
| Command | What it does | Notes |
|---|---|---|
/commit | Generates a commit message and commits changes. | Common in community and leak-based command lists. |
/commit-push-pr | Commits, pushes, and opens a PR in one flow. | Seen in leak-based references; may not appear in standard public builds. |
/fix-pipeline | Tries to repair a failing CI pipeline. | Common custom/community command. |
/install-github-app | Sets up GitHub app integration. | Public command. |
/issue | Files a GitHub issue. | Seen in leak-based references; may not appear in standard public builds. |
/lint | Runs linting commands. | Common custom/community command. |
/merge-to-main | Handles merge-to-main workflow. | Common custom/community command. |
/pr | Creates a pull request. | Common custom/community command. |
/push | Pushes the current branch. | Common custom/community command. |
/vitest | Runs Vitest-based test workflows. | Common custom/community command. |
Work Remotely or Across Devices
Use these commands when working across IDEs, browsers, desktops, mobile, or remote environments.
| Command | What it does | Notes |
|---|---|---|
/chrome | Opens Chrome integration. | Public command, though availability varies. |
/desktop | Hands off to the desktop app. | Public command. |
/ide | Opens or manages IDE integration. | Public command. |
/mobile | Hands off to mobile or opens mobile integration. | Seen in leak-based references; may not appear in standard public builds. |
/oauth-refresh | Refreshes OAuth tokens. | Seen in leak-based references; may not appear in standard public builds. |
/onboarding | Starts first-run onboarding. | Seen in leak-based references; may not appear in standard public builds. |
/rc | Starts remote control. | Public short form. |
/remote-control | Full remote-control command name. | Public command. Remote-session features continue to expand in newer versions. |
/remote-env | Configures remote environments. | Public command. Remote-session planning features can now auto-create a default cloud environment. |
/remote-setup | Sets up a remote session. | Seen in leak-based references; may not appear in standard public builds. |
/schedule | Manages cloud scheduled tasks. | Public command. |
/teleport | Transfers or bridges sessions. | Public command. |
/voice | Enables push-to-talk voice mode. | Public command. |
A-Z Slash Command Index
This index is for fast lookup. It includes public, generated, internal, leak-based, removed, and community command names so older references and current workflows can be checked in one place.
| Command | Short meaning | Type |
|---|---|---|
/add-dir <path> | Add another directory to scope. | Public |
/advisor | Architecture or design advice. | Leak-based |
/agents | Manage subagents. | Public |
/ant-trace | Internal tracing. | Internal |
/autofix-pr | Auto-fix PR issues. | Internal/leak-based |
/backfill-sessions | Backfill session data. | Internal/leak-based |
/batch | Apply one change across many files. | Public/workflow |
/branch [name] | Branch or fork the conversation. | Public |
/break-cache | Invalidate caches. | Internal/leak-based |
/bridge | Manage IDE or bridge sessions. | Leak-based |
/bridge-kick | Force-restart a bridge connection. | Leak-based |
/brief | Brief output mode. | Leak-based |
/btw <question> | Ask a side question with minimal context. | Public |
/buddy | Temporary April 1st command. | Limited/non-essential |
/bughunter | Bug-finding workflow. | Leak-based |
/cd <path> | Move the session to a new working directory. | Public |
/chrome | Open Chrome integration. | Public |
/claude-api | Load Claude API or SDK helper workflow. | Built-in skill |
/clear | Clear conversation context. | Public |
/code-review [effort] | Review correctness issues. | Public |
/color [color] | Change session accent color. | Public |
/commit | Generate a commit message and commit changes. | Community |
/commit-push-pr | Commit, push, and create a PR. | Leak-based/community |
/compact [focus] | Compact context with optional focus. | Public |
/config | Open settings. | Public |
/context | Show context usage. | Public |
/copy [N] | Copy latest or selected response. | Public |
/cost | Open cost information inside /usage. | Public shortcut |
/ctx_viz | Debug context visualization. | Internal/leak-based |
/debug [desc] | Run a debugging workflow. | Public |
/debug-tool-call | Debug a tool call. | Internal/leak-based |
/desktop | Hand off to desktop app. | Public |
/diff | Open diff viewer. | Public |
/doctor | Run diagnostics. | Public |
/effort [low|medium|high|xhigh|max|auto] | Set reasoning effort. | Public |
/env | Inspect environment settings. | Leak-based |
/exit | Exit Claude Code. | Public |
/export [filename] | Export conversation. | Public |
/fast [on|off] | Toggle fast mode. | Public |
/feedback | Send feedback. | Public |
/files | List files in context. | Leak-based |
/fix-pipeline | Repair failing CI pipelines. | Community |
/focus | Toggle Focus view. | Public |
/goal | Set a completion condition. | Public |
/good-claude | Easter egg command. | Leak-based |
/heapdump | Dump heap for memory analysis. | Internal/leak-based |
/help | Show help and commands. | Public |
/hooks | Manage hook scripts and events. | Public |
/ide | Open or manage IDE integration. | Public |
/init | Create CLAUDE.md. | Public |
/init-verifiers | Set up verifier hooks. | Leak-based |
/install | Install or update flow. | Internal/leak-based |
/install-github-app | Set up GitHub App integration. | Public |
/insights | Show usage or session insights. | Public |
/issue | File a GitHub issue. | Leak-based |
/keybindings | Edit keyboard shortcuts. | Public |
/less-permission-prompts | Propose safe read-only allowlist entries. | Built-in skill |
/lint | Run linting commands. | Community |
/login | Sign in. | Public |
/logout | Sign out. | Public |
/loop [interval] | Run a recurring workflow. | Public/workflow |
/mcp | Manage MCP servers. | Public |
/mcp__[server]__[prompt] [args] | Dynamic MCP prompt command. | MCP-generated |
/memory | Open memory files. | Public |
/merge-to-main | Merge to main. | Community |
/mobile | Mobile integration or handoff. | Leak-based |
/mock-limits | Mock rate limits. | Internal/leak-based |
/model [model] | Switch active model. | Public |
/oauth-refresh | Refresh OAuth tokens. | Leak-based |
/onboarding | First-run onboarding. | Leak-based |
/output-style [style] | Change response style. | Public |
/passes | Multi-pass workflow. | Leak-based |
/perf-issue | Report performance issue. | Internal/leak-based |
/permissions | Manage permission rules. | Public |
/plan [desc] | Enter plan mode. | Public |
/plugin | Manage plugins. | Public |
/plugin list | List installed plugins. | Public |
/powerup | Open interactive lessons. | Public |
/pr | Create a pull request. | Community |
/pr-comments [PR] | Fetch PR review comments. | Public |
/pr_comments | Internal form of /pr-comments. | Internal |
/privacy-settings | Open privacy settings. | Leak-based |
/push | Push current branch. | Community |
/rate-limit-options | Open rate-limit options. | Leak-based |
/rc | Start Remote Control. | Public |
/release-notes | View release notes. | Public |
/reload-plugins | Reload plugins. | Public |
/reload-skills | Re-scan skill directories. | Public |
/remote-control | Start or manage Remote Control. | Public |
/remote-env | Configure remote environments. | Public |
/remote-setup | Set up remote session. | Leak-based |
/rename [name] | Rename current session. | Public |
/reset-limits | Reset rate limits. | Internal/leak-based |
/resume [session] | Resume previous session. | Public |
/review | Review current code changes. | Public |
/rewind | Rewind to an earlier checkpoint. | Public |
/sandbox | Open sandbox controls. | Public |
/sandbox-toggle | Internal sandbox toggle. | Internal |
/schedule | Manage scheduled tasks. | Public |
/scroll-speed | Tune mouse wheel scroll speed. | Public |
/security-review | Run security-focused review. | Public |
/session | Session management UI. | Leak-based |
/share | Share a session. | Leak-based |
/simplify | Run cleanup-only review and apply fixes. | Public |
/skills | List skills. | Public |
/stats | Open stats tab inside /usage. | Public shortcut |
/status | Show session status. | Public |
/statusline | Customize status line. | Leak-based |
/stickers | Easter egg or promo command. | Public/non-essential |
/summary | Generate session summary. | Leak-based |
/tag | Legacy tag command. | Removed |
/tasks | Manage background tasks. | Leak-based |
/team-onboarding | Generate teammate onboarding guide. | Public |
/teleport | Bridge or transfer sessions. | Public |
/terminal-setup | Configure terminal integration. | Public |
/terminalSetup | Internal form of /terminal-setup. | Internal |
/theme | Change or create themes. | Public |
/thinkback | Replay or analyze thinking. | Internal/leak-based |
/thinkback-play | Animated thinking replay. | Internal/leak-based |
/tui | Switch terminal UI mode. | Public |
/ultraplan | Detailed planning workflow. | Leak-based |
/ultrareview [PR#] | Comprehensive cloud code review. | Public/workflow |
/upgrade | Upgrade flow. | Leak-based |
/usage | Show limits, usage, and costs. | Public |
/usage-credits | Show usage credits. | Public |
/version | Show version. | Leak-based |
/vim | Old Vim-mode command. | Removed |
/vitest | Run Vitest workflows. | Community |
/voice | Enable push-to-talk voice mode. | Public |
/workflows | View dynamic workflow runs. | Public |
/x402 | x402 integration. | Internal/leak-based |
Claude Code CLI Commands and Flags
Many users searching for Claude Code commands actually want terminal commands. These are the main ones.
Core CLI Commands
| CLI command | What it does |
|---|---|
claude | Starts interactive Claude Code. |
claude agents | Opens agent view: a single list of running, blocked, and completed Claude Code sessions. |
claude agents --json | Lists active Claude Code sessions as JSON, including blocked and just-dispatched sessions, with id and state fields. |
claude agents --json --all | Includes completed sessions in the JSON agent list. |
claude agents then ! <command> | Starts a shell command as a background session you can attach to or detach from. |
claude "prompt" | Starts interactive Claude Code with an initial prompt. |
claude -p "prompt" | Runs a non-interactive single prompt. |
claude --bg --exec '<command>' | Runs a shell command as a background Claude session. |
claude -c | Continues the last conversation. |
claude -r "name" | Resumes a named session. |
claude update | Updates Claude Code. |
claude mcp list | Lists configured MCP servers. |
claude mcp serve | Runs Claude Code as an MCP server. |
claude plugin init <name> | Scaffolds a new plugin in .claude/skills. |
claude plugin tag | Creates release git tags for plugins with version validation. |
claude plugin details <name> | Shows a plugin’s details, including the LSP servers it provides. |
claude plugin marketplace remove <name> --scope user|project|local | Removes a marketplace from a selected configuration scope. |
Important CLI Flags
| Flag | What it does |
|---|---|
--model | Sets the model. |
--fallback-model | Continues the session with a configured fallback when the primary model is unavailable. |
-w, --worktree | Uses a git worktree. |
-n, --name | Names the session. |
--add-dir | Adds a directory to scope. |
--settings | Loads settings for dispatched background sessions. |
--mcp-config | Uses a specific MCP config for dispatched background sessions. |
--plugin-dir | Uses a plugin directory for dispatched background sessions. |
--agent | Selects an agent. |
--allowedTools | Pre-approves tools. |
--output-format | Sets machine-readable output such as JSON. |
--json-schema | Requests structured output. |
--max-turns | Limits agentic turns. |
--max-budget-usd | Caps spend. |
--console | Uses Anthropic Console auth. |
--verbose | Enables more verbose output. |
--bare | Minimal headless mode. |
--channels | Enables channel or MCP push permission relay. |
--remote | Starts a remote or web-backed session. |
--effort | Sets reasoning effort level. |
--permission-mode | Sets permission behavior such as plan. |
--dangerously-skip-permissions | Skips permission prompts. |
--chrome | Enables Chrome integration mode. |
--plugin-url <url> | Fetches a plugin .zip archive from a URL for the current session. |
--tools | Explicitly allows tools; Grep and Glob now map to the dedicated native search tools on builds with embedded search. |
--transport http|stdio|sse | Selects MCP transport. |
--remote-control-session-name-prefix | Prefixes Remote Control session names. |
--safe-mode | Starts Claude Code with customizations disabled for troubleshooting. |
Useful Environment Variables
| Variable | What it does |
|---|---|
CLAUDE_CODE_CERT_STORE=bundled | Uses bundled CAs only instead of the OS certificate store. |
CLAUDE_CODE_DISABLE_BUNDLED_SKILLS | Hides bundled skills, workflows, and built-in slash commands from the model. |
CLAUDE_CODE_ENABLE_AUTO_MODE=1 | Enables Auto mode on Bedrock, Vertex, and Foundry for supported Opus 4.7 and Opus 4.8 setups. |
CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL | Re-enables the session quality survey for enterprises capturing responses through OpenTelemetry. |
CLAUDE_CODE_PERFORCE_MODE=1 | Makes Edit/Write/NotebookEdit fail on read-only Perforce files with a p4 edit hint. |
CLAUDE_CODE_SAFE_MODE | Starts Claude Code with customizations disabled for troubleshooting. |
CLAUDE_CODE_SCRIPT_CAPS | Limits per-session script invocations. |
CLAUDE_CODE_USE_MANTLE=1 | Enables Amazon Bedrock powered by Mantle. |
DISABLE_UPDATES | Completely blocks all update paths, including manual claude update. Stricter than DISABLE_AUTOUPDATER. |
CLAUDE_CODE_SESSION_ID | Session ID. |
CLAUDE_CODE_USE_POWERSHELL_TOOL | Opts into or out of the PowerShell tool rollout. On Linux and macOS, set it to 1 to enable the PowerShell tool when pwsh is available. |
CLAUDE_CODE_FORCE_SYNC_OUTPUT=1 | Forces synchronized output on terminals where auto-detection misses it, such as Emacs eat. |
CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 | Opts out of the fullscreen alternate-screen renderer and keeps the conversation in the terminal’s native scrollback. |
CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE | Lets Homebrew or WinGet installations run package-manager upgrades in the background, then prompt for restart. |
CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1 | Enables gateway /v1/models discovery for the /model picker. This is now opt-in. |
OTEL_LOG_TOOL_DETAILS=1 | Adds tool parameters such as Bash commands and MCP or skill names to tool decision telemetry events. |
OTEL_RESOURCE_ATTRIBUTES | Adds custom labels to OpenTelemetry metric datapoints, such as team or repository labels. |
Note: Remote Control, /schedule, Claude.ai MCP connectors, and notification preferences are disabled when ANTHROPIC_API_KEY, apiKeyHelper, or ANTHROPIC_AUTH_TOKEN is set. Unset the API key to use those Claude.ai-connected features.
For managed deployments, requiredMinimumVersion and requiredMaximumVersion can keep Claude Code inside an approved version range. The disableBundledSkills setting can hide bundled skills, workflows, and built-in slash commands from the model.
Real Workflows
Start a New Repository
/init
/status
/modelThis initializes CLAUDE.md, checks the environment, and sets the model.
Onboard a New Teammate
/team-onboarding
/init
/memory
This is useful for turning existing local Claude Code usage into a ramp-up guide, then pairing it with the project’s CLAUDE.md and memory files.
Understand an Unfamiliar Codebase
/status
/context
/plan map the project structure and main entry pointsThis gives a quick environment check, shows loaded context, and builds a plan before editing anything.
Review a Pull Request
/review
/security-review
/pr-comments
/diffThis covers review, security, feedback, and final diff inspection.
Prepare a Safe Refactor
/review
/plan refactor the auth flow without changing behavior
/diffThis is a good sequence before touching critical code paths.
Manage a Long Session
/context
/compact keep decisions only
/costThis checks context size, compacts it, and shows the cost impact.
Run a Multi-File Refactor
/review
/code-review --fix
/batch rename OldThing NewThingThis is a clean sequence for review, simplification, and broad edits.
Fix a Bug in Stages
/debug trace the failing checkout flow
/review
/diffThis works well when the issue is unclear, and you want to inspect the final change carefully.
Work With PR Feedback
/pr-comments 123
/review
/diffThis is useful when you want to address reviewer comments and re-check the final patch.
Switch Between Tasks
/rename feature-auth
/clear
/resume feature-authThis keeps sessions separate and makes it easier to return to a task later.
Set Up MCP and Use It Immediately
/mcp
/mcp__github__list_prs
/mcp__jira__create_issueThis goes from the MCP setup to the actual server commands quickly.
Work Across Devices
/remote-control
/remote-env
/teleportThis covers the main remote workflow commands in one place.
Learn What Changed After an Update
/powerup
/help
/release-notesUse this after an update to check release changes, diagnose environment issues, and review any settings affected by the new version.
View Dynamic Workflows
/workflows
/context
/usageUse this when Claude creates a larger background workflow and you want to inspect the run, check loaded context, and review usage impact.
Review Usage and Limits
/usage
/cost
/statsThis is the quickest way to check activity, plan limits, and session cost.
Start a Headless One-Off Task
claude -p "review this diff and list risks"Use this when you want one result and do not need an interactive session.
Run a Deep Cloud Review
/review
/ultrareview
/pr-commentsUse this when a normal review is not enough and you want a deeper cloud-based review pass before merging.
Reduce Repetitive Permission Prompts
/less-permission-prompts
/permissions
/hooksUse this after a few real sessions to identify safe read-only commands and build a cleaner allowlist for future work.
Check Usage from Remote Control
/usage-credits
/context
/exitThis is useful when checking usage and session state from a Remote Control client without going back to the local terminal.
Work Toward a Clear Goal
/goal fix the failing checkout test and stop after tests pass
/context
/reviewUse this when the task has a clear completion condition and you want Claude to keep working across turns until it is met.
Inspect Plugin Cost and Components
claude plugin details plugin-name
/plugin
/contextUse this before enabling a large plugin or debugging plugin-sourced skills and MCP tools.
Internal, Experimental, and Compatibility Commands
These are mostly internal, debug-oriented, experimental, or source-leak command names.
| Command | What it does | Notes |
|---|---|---|
/ant-trace | Anthropic internal tracing. | Internal/leak-based. |
/autofix-pr | Auto-fixes PR issues. | Internal/leak-based. |
/backfill-sessions | Backfills session data. | Internal/leak-based. |
/break-cache | Invalidates caches. | Internal/leak-based. |
/ctx_viz | Debug context visualization. | Internal/leak-based. |
/debug-tool-call | Debugs a specific tool call. | Internal/leak-based. |
/good-claude | Easter egg command. | Leak-based. |
/heapdump | Dumps heap for memory analysis. | Internal/leak-based. |
/mock-limits | Mocks rate limits for testing. | Internal/leak-based. |
/perf-issue | Reports a performance issue. | Internal/leak-based. |
/reset-limits | Resets rate limits. | Internal/leak-based. |
/statusline | Customizes the status line. | Leak-based; may not appear in standard public builds. |
/stickers | Easter egg or promo command. | Public but non-essential. |
/thinkback | Replays or analyzes thinking. | Internal/leak-based. |
/thinkback-play | Animated thinking replay. | Internal/leak-based. |
/upgrade | Runs upgrade flow. | Seen in leak-based references; may not appear in standard public builds. |
/version | Shows Claude Code version. | Seen in leak-based references; may not appear in standard public builds. |
/x402 | x402 payment-protocol integration. | Internal/leak-based. |
/buddy | Temporary April 1st easter egg. | Limited and non-essential. |
/exit | Exits Claude Code. | Core command, but included here as a general utility. |
FAQs:
Q: What is Claude Code?
A: Claude Code is Anthropic’s terminal-based AI coding agent. It runs locally via the CLI (npm install -g @anthropic-ai/claude-code), reads and edits your actual project files, executes shell commands, runs tests, and manages git operations.
Q: What is the difference between a slash command and a prompt in Claude Code?
A: A prompt is what you type to give Claude a coding task: “refactor this function,” “write a test for this endpoint.” A slash command controls the session itself.
Q: What is CLAUDE.md and what goes in it?
A: CLAUDE.md is a Markdown file in your project root that Claude reads at the start of every session in that repository. It acts as a persistent project brief.
Q: What is the difference between /clear and /compact?
A: /clear deletes all conversation history. The context window is empty after running it, but file edits made during the session remain. /compact replaces conversation history with a compressed summary, preserving the thread of what was discussed. Use /compact when you want Claude to remember context from earlier in the session but need to free up token budget. Use /clear when you are switching to a completely different task and do not need any prior context.
Q: What does /plan actually do in Claude Code?
A: /plan toggles plan permission mode. In this mode, Claude proposes each tool action and waits for your approval before executing it. Use it when working in an unfamiliar codebase or before a large refactor you want to review step by step.
Q: How do I create a custom slash command in Claude Code?
A: Create a Markdown file at .claude/commands/[name].md in your project (for team-shared commands) or ~/.claude/commands/[name].md (for personal commands available in all projects). The filename without the .md extension becomes the command name. The file content is the prompt Claude receives when the command runs. Add a YAML-style frontmatter block at the top to set the model, description, allowed tools, or disallowed-tools. Use $ARGUMENTS in the file content to capture whatever text is passed after the command name.
Q: Can Claude Code connect to GitHub?
A: Yes, in two ways. First, /install-github-app sets up the Claude GitHub App, which lets Claude participate in pull request workflows via GitHub Actions. Second, connecting a GitHub MCP server via /mcp exposes GitHub API operations as slash commands directly in your session (e.g., /mcp__github__list_prs, /mcp__github__create_pr).
Q: How do I reduce costs when using Claude Code?
A: Several approaches work well in combination. Switch to Haiku for mechanical tasks (/model haiku) and back to Opus or Sonnet for complex reasoning. Use /effort low for quick iteration tasks where deep reasoning is not necessary. Use /usage as the main usage screen; /cost and /stats now open the relevant tabs inside it. For custom commands that run frequently, add model: haiku to the frontmatter.
Q: What is the difference between /doctor and /status in Claude Code?
A: /doctor actively tests your environment. It reports failures with actionable error messages. /status reads and displays your current configuration, such as the active model, permission mode, connected MCP servers, and tool state. Run /doctor after installation, after upgrading, or when Claude Code behaves unexpectedly. Run /status at the start of a session to confirm settings before starting work.
Q: Can Claude Code be used in a CI/CD pipeline?
A: Yes. Claude Code supports a non-interactive print mode (claude -p "your prompt") that executes a single prompt and exits, making it scriptable in any CI environment. The --output-format json flag structures the output for programmatic parsing. For GitHub specifically, /install-github-app sets up the official Claude GitHub Actions integration. The /hooks command also allows HTTP webhooks on lifecycle events, which can trigger external CI systems when Claude completes a task or uses a specific tool.
Q: What MCP servers work with Claude Code?
A: Any server that implements the Model Context Protocol can be connected. Once connected via /mcp, each server’s prompts appear as slash commands in the /mcp__[server]__[prompt] format.
Q: What is the difference between /focus and Ctrl+O in Claude Code?
A: As of v2.1.110, Ctrl+O only toggles between the normal and verbose transcript. Focus view is now controlled separately with /focus. If you want the cleaner, stripped-down focus view, use /focus. If you want transcript verbosity changes, use Ctrl+O.
Q: What does /effort do in Claude Code now?
A: /effort controls how much reasoning Claude uses for a task. Current builds support xhigh for hard Opus tasks, including Opus 4.8. Running /effort without arguments opens an interactive slider and confirms when your chosen level will persist as the default for new sessions.
Related Resources
- awesome-claude-code: A curated list of tools, IDE integrations, frameworks, and resources for developers working with Anthropic’s Claude Code.
- Best Agent Skills: 10 Best Free Agent Skills for Claude Code & AI Workflows.
- Claude Code Slash Commands Cheatsheet On Github: The most complete, verified reference for every Claude Code slash command.
- OpenAI Codex Commands Cheat Sheet: CLI commands, slash commands, flags, config keys, environment variables, sandbox settings, MCP, and real workflows.
- AI Coding Agents: 7 Best CLI AI Coding Agents.
- Best Web Dev Tools: 10 Best Free AI Tools for Frontend Developers.
- Claude Timeline: See all Claude AI release dates from Anthropic, including Claude 1, 2, 3, 4, and the latest Opus.








