Keyboard Shortcuts & Productivity
Master the Claude Code CLI shortcuts and techniques to work faster in the terminal.
Mode Switching
Claude Code has three permission modes you can cycle through instantly:
- Shift + Tab — Cycle: Normal → Auto-accept → Plan Mode
Use Normal for careful work, Auto-accept when you trust the flow, and Plan Mode for read-only exploration. See the Plan Mode guide for details.
Essential Shortcuts
- Ctrl + C — Cancel current generation or input
- Ctrl + D — Exit Claude Code
- Ctrl + L — Clear the terminal screen
- Ctrl + R — Reverse search through command history
- ↑ — Recall previous prompts
Input & References
- @ — Reference a file or directory (tab-completable)
- / — Open slash commands menu
- # — Quick-update your CLAUDE.md from the conversation
- ! — Enter bash mode (run shell commands directly)
- Ctrl + V — Paste an image for visual analysis
Thinking & Output
- Option + T / Alt + T — Toggle extended thinking mode
- Ctrl + O — Toggle verbose output
- Option + P / Alt + P — Switch model
Session Management
- Esc Esc — Rewind: undo code changes and/or conversation turns
- Ctrl + B — Send current task to background
- Ctrl + T — Toggle task list
- Ctrl + G — Open current content in a text editor
Workflow Tips
Pipe Input
Feed external data directly into Claude Code using Unix pipes:
git diff main | claude -p "review this diff for issues"
tail -f app.log | claude -p "summarize errors as they appear"
cat schema.sql | claude -p "suggest indexes for this schema"
Session Resume
Continue where you left off without losing context:
claude --continue # resume the most recent conversation
claude --resume # pick from a list of recent sessions
File References
Use @ to pull file content into your prompt efficiently:
@src/auth/login.ts what does this auth flow do?
look at @tests/ and write tests for @src/utils/parser.ts
Background Tasks
Press Ctrl + B to send a long-running task to the background. You can start a new conversation while it runs, then check back with Ctrl + T.
Why do these shortcuts matter?
Each shortcut maps to a core agent capability: mode switching controls the permission model, @ manages the context window, and Esc Esc leverages checkpointing. Understanding the agent architecture behind these makes you faster.
Next Steps
- Plan Mode — Learn the Explore → Plan → Code workflow
- CLAUDE.md Guide — Configure persistent project context
- Debugging Tips — Fix bugs faster with Claude