Skip to main content
Commands are user-facing actions invoked with a / prefix in the REPL (e.g., /commit, /review). They live in src/commands/ and are registered in src/commands.ts.

Command types

Sends a formatted prompt to the LLM with injected tools. Used for AI-powered operations like code review and commits.Examples: /review, /commit, /security-review

Command definition pattern

const command = {
  type: 'prompt',
  name: 'my-command',
  description: 'What this command does',
  progressMessage: 'working...',
  allowedTools: ['Bash(git *)', 'FileRead(*)'],
  source: 'builtin',
  async getPromptForCommand(args, context) {
    return [{ type: 'text', text: '...' }]
  },
} satisfies Command

Command catalog

CommandSourceDescription
/commitcommit.tsCreate a git commit with an AI-generated message
/commit-push-prcommit-push-pr.tsCommit, push, and create a PR in one step
/branchbranch/Create or switch git branches
/diffdiff/View file changes (staged, unstaged, or against a ref)
/pr_commentspr_comments/View and address PR review comments
/rewindrewind/Revert to a previous state
CommandSourceDescription
/reviewreview.tsAI-powered code review of staged/unstaged changes
/security-reviewsecurity-review.tsSecurity-focused code review
/advisoradvisor.tsGet architectural or design advice
/bughunterbughunter/Find potential bugs in the codebase
CommandSourceDescription
/compactcompact/Compress conversation context to fit more history
/contextcontext/Visualize current context (files, memory, etc.)
/resumeresume/Restore a previous conversation session
/sessionsession/Manage sessions (list, switch, delete)
/shareshare/Share a session via link
/exportexport/Export conversation to a file
/summarysummary/Generate a summary of the current session
/clearclear/Clear the conversation history
CommandSourceDescription
/configconfig/View or modify Claude Code settings
/permissionspermissions/Manage tool permission rules
/themetheme/Change the terminal color theme
/output-styleoutput-style/Change output formatting style
/colorcolor/Toggle color output
/keybindingskeybindings/View or customize keybindings
/vimvim/Toggle vim mode for input
/efforteffort/Adjust response effort level
/modelmodel/Switch the active model
/privacy-settingsprivacy-settings/Manage privacy/data settings
/fastfast/Toggle fast mode (shorter responses)
/briefbrief.tsToggle brief output mode
CommandSourceDescription
/memorymemory/Manage persistent memory (CLAUDE.md files)
/add-diradd-dir/Add a directory to the project context
/filesfiles/List files in the current context
CommandSourceDescription
/mcpmcp/Manage MCP server connections
/pluginplugin/Install, remove, or manage plugins
/reload-pluginsreload-plugins/Reload all installed plugins
/skillsskills/View and manage skills
CommandSourceDescription
/loginlogin/Authenticate with Anthropic
/logoutlogout/Sign out
/oauth-refreshoauth-refresh/Refresh OAuth tokens
CommandSourceDescription
/taskstasks/Manage background tasks
/agentsagents/Manage sub-agents
/ultraplanultraplan.tsxGenerate a detailed execution plan
/planplan/Enter planning mode
CommandSourceDescription
/doctordoctor/Run environment diagnostics
/statusstatus/Show system and session status
/statsstats/Show session statistics
/costcost/Display token usage and estimated cost
/versionversion.tsShow Claude Code version
/usageusage/Show detailed API usage
/extra-usageextra-usage/Show extended usage details
/rate-limit-optionsrate-limit-options/View rate limit configuration
CommandSourceDescription
/installinstall.tsxInstall or update Claude Code
/upgradeupgrade/Upgrade to the latest version
/initinit.tsInitialize a project (create CLAUDE.md)
/init-verifiersinit-verifiers.tsSet up verifier hooks
/onboardingonboarding/Run the first-time setup wizard
/terminalSetupterminalSetup/Configure terminal integration
CommandSourceDescription
/bridgebridge/Manage IDE bridge connections
/bridge-kickbridge-kick.tsForce-restart the IDE bridge
/ideide/Open in IDE
/desktopdesktop/Hand off to the desktop app
/mobilemobile/Hand off to the mobile app
/teleportteleport/Transfer session to another device
CommandSourceDescription
/remote-envremote-env/Configure remote environment
/remote-setupremote-setup/Set up remote session
/envenv/View environment variables
/sandbox-togglesandbox-toggle/Toggle sandbox mode
CommandSourceDescription
/helphelp/Show help and available commands
/exitexit/Exit Claude Code
/copycopy/Copy content to clipboard
/feedbackfeedback/Send feedback to Anthropic
/release-notesrelease-notes/View release notes
/renamerename/Rename the current session
/tagtag/Tag the current session
/insightsinsights.tsShow codebase insights
/voicevoice/Toggle voice input mode
/chromechrome/Chrome extension integration
/issueissue/File a GitHub issue
/statuslinestatusline.tsxCustomize the status line
/thinkbackthinkback/Replay Claude’s thinking process
/thinkback-playthinkback-play/Animated thinking replay
/passespasses/Multi-pass execution
/x402x402/x402 payment protocol integration
/stickersstickers/Easter egg — stickers
/good-claudegood-claude/Easter egg — praise Claude
These commands are intended for internal development and debugging. They are not part of the stable public interface.
CommandSourceDescription
/ant-traceant-trace/Anthropic-internal tracing
/autofix-prautofix-pr/Auto-fix PR issues
/backfill-sessionsbackfill-sessions/Backfill session data
/break-cachebreak-cache/Invalidate caches
/btwbtw/”By the way” interjection
/ctx_vizctx_viz/Context visualization (debug)
/debug-tool-calldebug-tool-call/Debug a specific tool call
/heapdumpheapdump/Dump heap for memory analysis
/hookshooks/Manage hook scripts
/mock-limitsmock-limits/Mock rate limits for testing
/perf-issueperf-issue/Report performance issues
/reset-limitsreset-limits/Reset rate limit counters
Commands are registered in src/commands.ts. To find the source for a specific command, look in the corresponding src/commands/<name>/ directory or src/commands/<name>.ts file.

Build docs developers (and LLMs) love