Claude Code – Complete Command Reference

Uncategorized

Source: code.claude.com/docs (updated April 2026)


🔷 Built-in Slash Commands

Type / in a session to see all available commands. Some are plan/platform-dependent.

CommandDescription
/add-dir <path>Add a working directory for file access in the current session
/agentsManage agent configurations
/btw <question>Ask a quick side question without adding to the conversation history
/branch [name]Create a branch (fork) of the current conversation. Alias: /fork
/chromeConfigure Claude in Chrome settings
/clearClear conversation history and free up context. Aliases: /reset, /new
/color [color|default]Set the prompt bar color (red, blue, green, yellow, purple, orange, pink, cyan)
/compact [instructions]Compact conversation with optional focus instructions
/configOpen Settings (theme, model, output style, etc.). Alias: /settings
/contextVisualize context usage as a colored grid with optimization suggestions
/copy [N]Copy the last (or Nth-last) assistant response to clipboard
/costShow token usage statistics
/desktopContinue current session in the Claude Code Desktop app (macOS/Windows). Alias: /app
/diffOpen interactive diff viewer showing uncommitted changes and per-turn diffs
/doctorDiagnose and verify your Claude Code installation and settings
/effort [low|medium|high|max|auto]Set the model effort level (max requires Opus 4.6, session-only)
/exitExit the CLI. Alias: /quit
/export [filename]Export current conversation as plain text
/extra-usageConfigure extra usage when rate limits are hit
/fast [on|off]Toggle fast mode on or off
/feedback [report]Submit feedback about Claude Code. Alias: /bug
/helpShow help and all available commands
/hooksView hook configurations for tool events
/ideManage IDE integrations and show status
/initInitialize project with a CLAUDE.md guide
/insightsGenerate a report analyzing your Claude Code sessions
/install-github-appSet up Claude GitHub Actions for a repository
/install-slack-appInstall the Claude Slack app (opens OAuth flow)
/keybindingsOpen or create your keybindings configuration file
/loginSign in to your Anthropic account
/logoutSign out from your Anthropic account
/mcpManage MCP server connections and OAuth authentication
/memoryEdit CLAUDE.md memory files and manage auto-memory
/mobileShow QR code to download the Claude mobile app. Aliases: /ios, /android
/model [model]Select or change the AI model
/passesShare a free week of Claude Code with friends (if eligible)
/permissionsManage allow/ask/deny rules for tool permissions. Alias: /allowed-tools
/plan [description]Enter plan mode (optionally with a task description)
/pluginManage Claude Code plugins
/pr-comments [PR]Fetch and display GitHub pull request comments (requires gh CLI)
/privacy-settingsView/update privacy settings (Pro/Max plans only)
/release-notesView the full changelog
/reload-pluginsReload all active plugins to apply changes without restarting
/remote-controlMake this session available for remote control from claude.ai. Alias: /rc
/remote-envConfigure the default remote environment for web sessions
/rename [name]Rename the current session (or auto-generate a name)
/resume [session]Resume a conversation by ID or name. Alias: /continue
/rewindRewind conversation/code to a previous point. Alias: /checkpoint
/sandboxToggle sandbox mode (supported platforms only)
/schedule [description]Create, list, or run Cloud scheduled tasks
/security-reviewAnalyze pending branch changes for security vulnerabilities
/terminal-setupConfigure terminal for optimal Claude Code use
/upgradeUpgrade your Claude plan (Pro/Max subscribers)

🔷 Bundled Skills (appear alongside slash commands)

CommandDescription
/simplifySimplify code or content
/batchRun batch operations
/debugDebug code issues
/loopRun iterative loops

🔷 CLI Commands (used outside a session)

CommandDescription
claudeStart interactive session
claude "query"Start session with initial prompt
claude -p "query"Query via SDK, then exit (print mode)
cat file | claude -p "query"Process piped content
claude -cContinue most recent conversation
claude -c -p "query"Continue via SDK
claude -r "<session>" "query"Resume session by ID or name
claude updateUpdate to latest version
claude auth loginSign in to Anthropic account
claude auth logoutLog out
claude auth statusShow authentication status
claude agentsList all configured subagents
claude auto-mode defaultsPrint built-in auto-mode classifier rules as JSON
claude mcpConfigure MCP servers
claude pluginManage plugins. Alias: claude plugins
claude remote-controlStart a Remote Control server

🔷 Key CLI Flags

FlagDescription
--add-dirAdd additional working directories
--agentSpecify an agent for the current session
--agentsDefine custom subagents dynamically via JSON
--allow-dangerously-skip-permissionsAdd bypassPermissions to the Shift+Tab mode cycle
--allowedToolsTools that execute without prompting
--append-system-promptAppend custom text to the default system prompt
--append-system-prompt-fileAppend system prompt text from a file
--bareMinimal mode: skip hooks, skills, plugins, MCP, CLAUDE.md
--betasBeta headers for API requests (API key users only)
--chromeEnable Chrome browser integration
--continue, -cLoad most recent conversation
--dangerously-skip-permissionsSkip all permission prompts
--debug ["category"]Enable debug mode (optional category filter)
--debug-file <path>Write debug logs to a file
--disable-slash-commandsDisable all skills and commands for this session
--disallowedToolsRemove tools from the model’s context entirely
--effort [low|medium|high|max|auto]Set effort level for the session
--fallback-modelEnable fallback model when default is overloaded (print mode)
--fork-sessionCreate a new session ID when resuming
--from-prResume sessions linked to a GitHub PR
--system-promptReplace the default system prompt entirely
--system-prompt-fileLoad replacement system prompt from a file

🔷 Keyboard Shortcuts (Interactive Mode)

ShortcutDescription
Ctrl+CCancel current input or generation
Ctrl+DExit Claude Code session
Ctrl+G / Ctrl+X Ctrl+EOpen in default text editor
Ctrl+LRedraw the screen
Ctrl+OToggle verbose output
Ctrl+RReverse search command history
Ctrl+V / Cmd+VPaste image from clipboard
Ctrl+BBackground running tasks
Ctrl+TToggle task list
Ctrl+X Ctrl+KKill all background agents (press twice to confirm)
Left/Right arrowsCycle through dialog tabs
Shift+TabCycle through permission modes
?Show available shortcuts for your environment

🔷 Special Input Prefixes

PrefixDescription
!Bash mode — run a shell command directly, bypassing Claude’s conversational mode
#Add a comment/note to the conversation without triggering a response

📝 Tips

  • Type /help inside any session to see the full live list for your version and plan.
  • Custom slash commands can be added to .claude/commands/ (project) or ~/.claude/commands/ (global).
  • Bundled skills can also be invoked via natural language — Claude decides when to use them.
  • Note: availability of some commands depends on your plan (Pro/Max), platform (macOS/Windows/Linux), or environment.

Leave a Reply