Skip to content

Command Surface

This page answers “how users access Claude Code’s capabilities.” 97 command entries form the system’s operation surface — the user-facing facade of tool capabilities. Understanding the distinction between commands and tools is key to understanding this system.

Visual companion: Commands page

97 is the post-bucketing entry count. This number comes from ../src/commands/ first-segment path normalization, excluding createMovedToPluginCommand, init, and init-verifiers (three internal wiring entries). It represents the “effective command entry surface,” not all slash commands visible to every user in every context.

Command-Tool Relationship

    flowchart LR
  subgraph User Surface
    U[User /command] --> CMD[Command router<br>src/commands/]
  end
  subgraph Orchestration
    CMD -->|Direct binding| T1[Single tool]
    CMD -->|Multi-tool| T2[Model selects tools]
    CMD -->|Service chain| S[Service calls]
    CMD -->|Independent| I[Internal logic]
  end
  subgraph Capability Surface
    T1 --> TOOL[Tool system<br>src/tools/]
    T2 --> TOOL
  end
  

Commands vs Tools

DimensionCommandsTools
TriggerUser types /commandModel decides to call
Count9743
NatureUser entry pointsSystem capabilities
PermissionsSome require authenticationUnified permission layer
Locationsrc/commands/src/tools/

Key insight: Seeing a /commit command does not mean there’s a CommitTool. Commands are more like product entry points that orchestrate multiple tool capabilities together. Conversely, many tools (like FileEditTool) never need explicit user invocation — the model selects them automatically during the main loop.

Command Overview

MetricValue
Total commands97
Groups7
Total files189 (including group-internal logic)

Seven Groups

1. Setup & Config (22 commands, 73 files)

Installation, authentication, model selection, plugin management, permission settings, and environment configuration.

CommandFunction
/login /logoutAuthentication management
/configRead/write configuration
/modelSwitch model (Sonnet / Opus)
/mcpMCP server management
/permissionsPermission rule management
/plugin /reload-pluginsPlugin install and reload
/themeTerminal theme switching
/upgradeVersion upgrade
/installSystem installation
/install-github-appInstall GitHub App
/install-slack-appInstall Slack App
/terminalSetupTerminal configuration
/add-dirAdd working directory
/remote-env /remote-setupRemote environment config
/sandbox-toggleSandbox on/off
/privacy-settingsPrivacy settings
/rate-limit-optionsRate limit options
/output-styleOutput style
/oauth-refreshOAuth refresh

2. Daily Workflow (23 commands, 44 files)

Day-to-day coding, session recovery, planning, summarization, and task advancement.

CommandFunction
/planEnter plan mode (analyze only, no execution)
/compactManual context compression
/memoryMemory management
/resumeRestore historical session
/sessionSession management
/summaryGenerate session summary
/statusView current status
/tasksTask list
/skillsSkill management
/filesView related files
/contextContext information
/usageUsage viewing
/helpHelp information
/copyCopy to clipboard
/clearClear context
/exitExit
/briefBrief mode
/hooksHook management
/onboardingNew user guide
/rewindUndo operations
/shareShare session
/versionVersion info
/voiceVoice input

3. Review & Git (10 commands, 18 files)

Branch management, commits, PRs, diffs, security reviews, and issue tracking.

CommandFunction
/reviewCode review
/commitGit commit
/commit-push-prCommit + push + create PR in one flow
/diffView differences
/branchBranch operations
/issueIssue management
/pr_commentsPR comment handling
/security-reviewSecurity review
/autofix-prAuto-fix PR
/renameRename

4. Debugging & Diagnostics (18 commands, 26 files)

Problem diagnosis, metric observation, cache debugging, and internal tracing.

CommandFunctionNote
/doctorEnvironment diagnosticsPublic
/costCost viewingPublic
/statsUsage statisticsPublic
/envEnvironment variablesPublic
/exportExport dataPublic
/feedbackFeedbackPublic
/release-notesRelease notesPublic
/ctx_vizContext visualizationFeature-flagged
/debug-tool-callTool call debuggingFeature-flagged
/ant-traceInternal tracingFeature-flagged
/heapdumpHeap memory snapshotFeature-flagged
/break-cacheCache breakingFeature-flagged
/mock-limitsSimulate limitsFeature-flagged
/reset-limitsReset limitsFeature-flagged
/bughunterBug hunterFeature-flagged
/passesExecution passFeature-flagged
/perf-issuePerformance issueFeature-flagged
/insightsInsights panelFeature-flagged

5. Bridge & Remote (7 commands, 12 files)

IDE bridging, cross-device connection, and remote control.

CommandFunction
/ideIDE integration (VS Code / JetBrains)
/bridgeBridge control
/bridge-kickDisconnect Bridge
/desktopDesktop app connection
/mobileMobile connection
/chromeChrome extension connection
/teleportTeleport

6. Experimental Surface (13 commands, 24 files)

Product-surface exploration entries that reveal direction.

CommandFunctionStatus
/ultraplanLong-duration planning (Opus-class model)Feature-flagged
/advisorAI advisor modeFeature-flagged
/thinkback /thinkback-playThought retrospection and replayFeature-flagged
/fastFast mode (switch to faster model)Public
/good-claudePositive feedbackPublic
/stickersSticker systemFeature-flagged
/statuslineStatus line configFeature-flagged
/btwBy the wayFeature-flagged
/colorColor configPublic
/effortReasoning effort adjustmentFeature-flagged
/extra-usageExtra usage trackingFeature-flagged
/tagSession taggingFeature-flagged

7. Agents & Extensions (4 commands, 7 files)

Sub-agent management, Vim mode, and internal migration commands.

CommandFunction
/agentsSub-agent management
/vimVim mode toggle
/keybindingsShortcut configuration
/backfill-sessionsSession data backfill (internal migration)

Command-to-Tool Mapping

Commands and tools are not one-to-one. A single command may orchestrate multiple tools, and a single tool may serve multiple commands. Here are the primary mapping relationships:

CommandUnderlying Tool / Execution PathMapping Type
/planEnterPlanModeTool → ExitPlanModeToolDirect binding
/compactsrc/services/compact/compact.tsDirect service call
/memorymemdir/*, SessionMemory/*Service orchestration
/resumeSessionMemory + setCostStateForRestore()Multi-service coordination
/commitBashTool (git commands) + model orchestrationTool + model
/reviewFileReadTool + GrepTool + AgentTool (Verify)Multi-tool orchestration
/commit-push-prBashTool × 3 (commit → push → gh pr create)Tool chain
/diffBashTool (git diff)Single tool
/voicevoice.ts + voiceStreamSTT.ts → model inputService chain
/mcpMCPTool register/unregister + config writeConfig + tool
/pluginPluginInstallationManager.tsService call
/agentsAgentTool + SendMessageTool + TaskStopToolMulti-tool
/tasksTaskCreateTool / TaskGetTool / TaskListToolTool family
/doctorEnvironment check scripts (bypasses tool system)Independent path
/costcost-tracker.ts readState read
/vimsrc/vim/ mode switchingUI layer

Reading this table:

  • “Direct binding” means 1:1 command-to-tool correspondence
  • “Multi-tool orchestration” means the model automatically selects multiple tools based on context
  • “Service chain” means the command triggers a sequence of service calls, not going through the standard tool system
  • “Independent path” means the command entirely bypasses tools and model, executing internal logic directly

This also explains why the command count (97) far exceeds the tool count (43) — commands are user-facing product entries, tools are model-facing capability surfaces; the mapping between them is not linear.

Feature-Flagged Commands

Of the 97 commands, a significant portion is controlled by feature flags and only appears under specific conditions. Their existence signals system evolution direction.

Key feature-flagged clusters:

  • Diagnostic tools: ctx_viz, debug-tool-call, ant-trace, heapdump — internal debugging capabilities
  • Experimental surface: ultraplan, advisor, thinkback — product direction exploration
  • Remote connections: bridge, desktop, mobile — cross-interface extension

Reading Order

  1. Tool Plane — Understand the capabilities behind commands
  2. Runtime Loop — See how commands enter the main loop
  3. Signals & Extensions — See the relationship between experimental commands and signals