Claude Code: Commands Reference

🇬🇧 English claude-codecommandsreferenceenglish
📋 Table of Contents (17 sections)
  1. Commands Reference
  2. Overview
  3. Git & Version Control
  4. Code Quality
  5. Session & Context
  6. Configuration & Settings
  7. Memory & Knowledge
  8. MCP & Plugins
  9. Authentication
  10. Tasks & Agents
  11. Diagnostics & Status
  12. Installation & Setup
  13. IDE & Desktop Integration
  14. Remote & Environment
  15. Misc
  16. Internal / Debug Commands
  17. See Also

Commands Reference

Complete catalog of all slash commands in Claude Code.


Overview

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

TypeDescriptionExample
PromptCommandSends a formatted prompt to the LLM with injected tools/review, /commit
LocalCommandRuns in-process, returns plain text/cost, /version
LocalJSXCommandRuns in-process, returns React JSX/install, /doctor

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

Git & Version Control

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

Code Quality

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

Session & Context

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

Configuration & Settings

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

Memory & Knowledge

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

MCP & Plugins

CommandSourceDescription
/mcpmcp/Manage MCP server connections
/pluginplugin/Install, remove, or manage plugins
/reload-pluginsreload-plugins/Reload all installed plugins
/skillsskills/View and manage skills

Authentication

CommandSourceDescription
/loginlogin/Authenticate with Anthropic
/logoutlogout/Sign out
/oauth-refreshoauth-refresh/Refresh OAuth tokens

Tasks & Agents

CommandSourceDescription
/taskstasks/Manage background tasks
/agentsagents/Manage sub-agents
/ultraplanultraplan.tsxGenerate a detailed execution plan
/planplan/Enter planning mode

Diagnostics & Status

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

Installation & Setup

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

IDE & Desktop 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

Remote & Environment

CommandSourceDescription
/remote-envremote-env/Configure remote environment
/remote-setupremote-setup/Set up remote session
/envenv/View environment variables
/sandbox-togglesandbox-toggle/Toggle sandbox mode

Misc

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
/stickersstickers/Easter egg — stickers
/good-claudegood-claude/Easter egg — praise Claude
/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

Internal / Debug Commands

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

See Also

← Back to claudecodeanalysis