Skip to content

Shortcuts & Built-ins Cheat Sheet

A quick reference for busy engineers. For complete details, see the official interactive mode docs.

ShortcutAction
Ctrl+CCancel current operation
Esc EscOpen rewind menu (undo changes)
/ Navigate command history
Shift+EnterInsert newline (multi-line input)
TabAuto-complete commands and paths
Ctrl+DExit Claude Code
ShortcutAction
Shift+TabToggle permission modes
Alt+MCycle through modes (normal → plan)
Ctrl+OToggle verbose output
Ctrl+GOpen external editor
Ctrl+BBackground current operation
CommandDescription
/clearClear conversation history
/compact [focus]Summarize context (optional focus area)
/resumeResume a previous session
/rename [name]Rename current session
/rewindRestore to previous checkpoint
CommandDescription
/contextShow what’s consuming context window
/costShow token usage and estimated cost (API users)
/statsShow usage patterns (subscribers)
/statusShow session status
CommandDescription
/model [name]Switch models: haiku, sonnet, opus
/configView or modify settings
/planEnter plan mode
CommandDescription
/copyCopy last response to clipboard
/exportExport conversation
CommandDescription
/mcpManage MCP server connections
/mcp listList all configured MCP servers
/mcp enable [name]Enable a specific MCP server
/mcp disable [name]Disable a specific MCP server
/permissionsManage tool permissions
CommandDescription
/todosView current task list
/tasksView background tasks
CommandDescription
/initGenerate CLAUDE.md from codebase analysis
/hooksConfigure hooks via interactive menu
/terminal-setupInstall Shift+Enter key binding
CommandDescription
/teleportResume remote sessions at claude.ai/code
/helpShow all available commands

Use @ to reference files in your prompt:

@src/main.py explain this file
Compare @src/v1/api.py and @src/v2/api.py

Use ! at the start of a line to run shell commands:

!git status
!npm test
ModelBest ForCost
haikuQuick questions, simple tasks, CI/CD$
sonnetDaily coding, balanced performance$$
opusComplex architecture, hard problems$$$$

Switch with /model haiku or /model opus.

Toggle with Shift+Tab:

ModeBehavior
DefaultAsks permission for file changes and commands
Auto-acceptAutomatically approves safe operations
  1. Start fresh between tasks: Use /clear when switching context
  2. Save tokens: Use /compact proactively, before hitting limits
  3. Undo mistakes: Double-tap Esc to access rewind
  4. Track spending: /cost for API users, /stats for subscribers
  5. Debug context: /context shows what’s eating your tokens