Commands Module
110 files · ~8K lines101 Slash Commands — from /compact to /stickers. Each command owns its own directory and handler function. Commands are the user's direct control interface, separate from the LLM-controlled tool system.
Commands are Human, Tools are Claude
101 Commands — Color-Coded by Category
Every slash command, grouped by category. Each color is a different functional area.
/compact/clear/context/summarize/trim/history+ more/model/temperature/config/fast/slow/api-key/timeout+ more/mcp/mcp-restart/mcp-logs/mcp-add/mcp-remove/mcp-inspect+ more/help/doctor/status/debug/version/info/env+ more/stickers/color/voice/dream/penguin/theme/fun+ more/exit/quit/reset/new/abort/kill+ moreCommand Categories
101 commands grouped by what they do.
/compact/clear/context/summarizeControl what's in the context window. /compact triggers summarization, /clear resets entirely.
/model/temperature/config/fastChange model, tune parameters, adjust session settings mid-conversation.
/mcp/mcp-restart/mcp-logs/mcp-addList connected MCP servers, view their tools, restart failed connections, tail logs.
/help/doctor/status/debugDynamic help from registered commands, environment diagnostics, connection status.
/stickers/color/voice/dreamCollectible companion stickers, terminal color themes, voice input, /dream for free-form generation.
/exit/quit/reset/newTerminate or reset the current session. /exit with a summary, /quit immediate.
Command Lifecycle — '/' to Execution
The path from user keypress to command handler call.
Commands vs Tools — Key Distinction
Hidden Gems — The Unusual Commands
These commands reveal that Claude Code wants to be charming, not just functional.
/dreamhidden gemA free-form creative generation command. Sends the prompt directly to Claude without the system prompt constraining it to coding mode. For creative writing, brainstorming, or just chatting.
/stickersfully shippedBrowse and equip collectible companion pets — cats, dogs, crabs, rockets. They appear in the terminal as ASCII art stickers. Fully implemented cosmetic feature in production.
/voicespeech-to-textActivates voice input mode via the system microphone. Speech-to-text transcribed and sent as a regular message. The REPL shows a recording indicator.
/penguineaster eggRenders ASCII art of a penguin in the terminal. No other function. Ships in production. Someone on the Claude Code team really likes penguins.
Key Files
commands/compact/~8KB/compact — triggers context compaction with a user summary
commands/model/~5KB/model — switch LLM model mid-session
commands/mcp/~10KB/mcp — manage MCP server connections, list tools, restart servers
commands/stickers/~6KB/stickers — browse and equip cosmetic sticker companions
commands/doctor/~8KB/doctor — environment diagnostics, dependency checks, config validation
commands/help/~4KB/help — dynamic help text generated from registered commands
/compact calls services/compact directly. /mcp interfaces with services/mcp for server management.
QueryEngine intercepts slash commands before they reach the LLM — the routing logic lives there.
Commands vs Tools: understand why /compact is a command but BashTool is a tool.