/ prefix in the Claude Code REPL. For example, typing /review triggers an AI-powered code review and /cost displays your current token usage. Commands live in src/commands/ and are registered in src/commands.ts.
Command types
There are three command types, each with different behavior:| Type | Description | Examples |
|---|---|---|
PromptCommand | Sends a formatted prompt to the LLM with injected tools | /review, /commit |
LocalCommand | Runs in-process, returns plain text | /cost, /version |
LocalJSXCommand | Runs in-process, returns React JSX | /install, /doctor |
Command definition pattern
All commands follow this TypeScript shape:type— one of'prompt','local', or'local-jsx'allowedTools— restricts which agent tools the LLM can call when handling this commandgetPromptForCommand— constructs the prompt sent to the model (only forPromptCommand)
Command categories
Git & Code Quality
Commands for git workflows, code review, and code quality analysis.
Session & Context
Commands for managing conversation sessions, context, and memory.
Configuration
Commands for settings, permissions, themes, keybindings, and IDE integration.
Diagnostics & Setup
Commands for environment diagnostics, installation, remote setup, and status monitoring.
All categories at a glance
| Category | Commands |
|---|---|
| Git & version control | /commit, /commit-push-pr, /branch, /diff, /pr_comments, /rewind |
| Code quality | /review, /security-review, /advisor, /bughunter |
| Session management | /compact, /context, /resume, /session, /share, /export, /summary, /clear |
| Memory & knowledge | /memory, /add-dir, /files |
| Tasks & agents | /tasks, /agents, /ultraplan, /plan |
| Settings | /config, /permissions, /model, /effort, /privacy-settings |
| Appearance | /theme, /output-style, /color, /fast, /brief |
| Input & editing | /vim, /keybindings |
| MCP & plugins | /mcp, /plugin, /reload-plugins, /skills |
| Authentication | /login, /logout, /oauth-refresh |
| IDE & desktop | /bridge, /bridge-kick, /ide, /desktop, /mobile, /teleport |
| Diagnostics & status | /doctor, /status, /stats, /cost, /version, /usage, /rate-limit-options |
| Installation & setup | /install, /upgrade, /init, /onboarding, /terminalSetup |
| Remote & environment | /remote-env, /remote-setup, /env, /sandbox-toggle |
| Misc | /help, /exit, /feedback, /voice, /copy, /release-notes, /rename, /tag |