Shortcuts & Built-ins Cheat Sheet
A quick reference for busy engineers. For complete details, see the official interactive mode docs.
Keyboard Shortcuts
Section titled “Keyboard Shortcuts”Essential (use these daily)
Section titled “Essential (use these daily)”| Shortcut | Action |
|---|---|
| Ctrl+C | Cancel current operation |
| Esc Esc | Open rewind menu (undo changes) |
| ↑ / ↓ | Navigate command history |
| Shift+Enter | Insert newline (multi-line input) |
| Tab | Auto-complete commands and paths |
| Ctrl+D | Exit Claude Code |
Modes & Navigation
Section titled “Modes & Navigation”| Shortcut | Action |
|---|---|
| Shift+Tab | Toggle permission modes |
| Alt+M | Cycle through modes (normal → plan) |
| Ctrl+O | Toggle verbose output |
| Ctrl+G | Open external editor |
| Ctrl+B | Background current operation |
Built-in Commands
Section titled “Built-in Commands”Session Management
Section titled “Session Management”| Command | Description |
|---|---|
/clear | Clear conversation history |
/compact [focus] | Summarize context (optional focus area) |
/resume | Resume a previous session |
/rename [name] | Rename current session |
/rewind | Restore to previous checkpoint |
Visibility & Status
Section titled “Visibility & Status”| Command | Description |
|---|---|
/context | Show what’s consuming context window |
/cost | Show token usage and estimated cost (API users) |
/stats | Show usage patterns (subscribers) |
/status | Show session status |
Models & Modes
Section titled “Models & Modes”| Command | Description |
|---|---|
/model [name] | Switch models: haiku, sonnet, opus |
/config | View or modify settings |
/plan | Enter plan mode |
Copy & Export
Section titled “Copy & Export”| Command | Description |
|---|---|
/copy | Copy last response to clipboard |
/export | Export conversation |
Tools & MCP
Section titled “Tools & MCP”| Command | Description |
|---|---|
/mcp | Manage MCP server connections |
/mcp list | List all configured MCP servers |
/mcp enable [name] | Enable a specific MCP server |
/mcp disable [name] | Disable a specific MCP server |
/permissions | Manage tool permissions |
| Command | Description |
|---|---|
/todos | View current task list |
/tasks | View background tasks |
Project Setup
Section titled “Project Setup”| Command | Description |
|---|---|
/init | Generate CLAUDE.md from codebase analysis |
/hooks | Configure hooks via interactive menu |
/terminal-setup | Install Shift+Enter key binding |
Remote & Advanced
Section titled “Remote & Advanced”| Command | Description |
|---|---|
/teleport | Resume remote sessions at claude.ai/code |
/help | Show all available commands |
Input Syntax
Section titled “Input Syntax”File References
Section titled “File References”Use @ to reference files in your prompt:
@src/main.py explain this fileCompare @src/v1/api.py and @src/v2/api.pyInline Commands
Section titled “Inline Commands”Use ! at the start of a line to run shell commands:
!git status!npm testModel Quick Reference
Section titled “Model Quick Reference”| Model | Best For | Cost |
|---|---|---|
haiku | Quick questions, simple tasks, CI/CD | $ |
sonnet | Daily coding, balanced performance | $$ |
opus | Complex architecture, hard problems | $$$$ |
Switch with /model haiku or /model opus.
Permission Modes
Section titled “Permission Modes”Toggle with Shift+Tab:
| Mode | Behavior |
|---|---|
| Default | Asks permission for file changes and commands |
| Auto-accept | Automatically approves safe operations |
Quick Tips
Section titled “Quick Tips”- Start fresh between tasks: Use
/clearwhen switching context - Save tokens: Use
/compactproactively, before hitting limits - Undo mistakes: Double-tap Esc to access rewind
- Track spending:
/costfor API users,/statsfor subscribers - Debug context:
/contextshows what’s eating your tokens