Claude Code Shortcuts and Commands: The Complete Cheat Sheet
The shortcuts that actually compound
Claude Code has dozens of slash commands, keyboard shortcuts, and custom command patterns. Most users learn five and stop. The developers who use Claude Code well know maybe twenty, and they trigger the right one in muscle memory rather than thinking about which to use.
This is a cheat sheet of the Claude Code shortcuts and commands that actually compound day-to-day. Organised by frequency: daily-use commands first, occasional ones second, advanced patterns last. If you want the broader operational guide rather than a reference sheet, our how to use Claude Code guide covers the workflow patterns these shortcuts plug into.
Daily-use commands (memorise these)
Five commands you will use multiple times every day:
| Command | What it does | When to use |
|---|---|---|
/clear |
Wipes conversation history (no state save) | Quick reset between unrelated tasks |
/safe-clear |
Saves session state to handoff, then clears | End-of-task before starting next |
/compact |
Summarises conversation to free context | When context utilisation feels heavy |
/model <name> |
Switch model mid-session | Drop to Sonnet for cost, Opus for hard problems |
/help |
List available commands | When you forget what's available |
/safe-clear followed by /compact is the most-leveraged pair. Sessions that end at task boundaries with state-preserved clears keep context fresh and quality high.
Keyboard shortcuts (input handling)
Five keyboard shortcuts that save typing:
| Shortcut | What it does |
|---|---|
Esc |
Cancel current input or interrupt running task |
Esc Esc |
Edit your previous message |
Tab |
Autocomplete file paths, command names |
Up arrow |
Recall previous input (multi-line aware) |
Ctrl+C |
Interrupt streaming output |
Esc Esc to edit the previous message is the underused gem. Most users retype prompts when they meant to add a line.
Project-state commands
Three commands that keep your project context useful:
| Command | What it does |
|---|---|
/init |
Generate a starter CLAUDE.md for the current project |
/sync |
Update memory.md with recent decisions |
/audit |
Run the auditor agent against recent changes |
/init is what you run on the first day in a new project. /sync is what you run every couple hours during active work. /audit is what you run before a PR or merge.
These commands are most powerful when paired with memory systems and audit hooks that give the commands something to write into and read from.
File and code operations
Five patterns for fast file work:
@filename # Reference file in your prompt
"Read /api/auth/login.ts:45-90" # Read a specific range
"Grep for 'auth_callback'" # Search across the codebase
"Edit /lib/db.ts" # Edit a specific file
"Glob '**/*.test.ts'" # Pattern-match files
The @filename pattern is the most useful inline shortcut. Instead of pasting file content into chat, prefix @ and Claude reads the file directly. Saves tokens and removes copy-paste errors.
Git and version control
Six git-related commands that show up in daily Claude Code use:
| Pattern | What it does |
|---|---|
| "Run git status and explain" | Check working tree state |
| "Run git diff --staged" | Review staged changes |
| "Stage src/auth/ and write the commit message" | Stage + commit prep |
| "Run git log --oneline -20" | Recent commit history |
| "Show the last commit's diff" | Review what just landed |
| "Push to feature/x" | Trigger remote push |
Claude Code can interact with git directly. The skill is knowing what to delegate (commit message generation, code review, branch hygiene) versus what to keep yourself (the actual git push for safety).
For deeper git workflow guidance, our Claude Code git workflow guide covers the patterns.
Custom slash commands you should make
Three custom commands worth defining for any serious project. Drop them in .claude/commands/{name}.md:
/deploy: Pre-flight checks (typecheck, tests, lint), then trigger your deploy CLI. Saves you from accidentally pushing broken code.
/review: Spawns the auditor agent against your current branch. Catches voice failures, missing tests, and unexplained changes before PR review.
/start: Reads memory.md, surfaces today's priorities, and sets up the session. The first prompt of every working day.
Each takes 10-15 minutes to write the first time. Each saves 5-10 minutes per use. Our Claude Code commands guide covers the file format.
Hidden shortcuts
Five less-obvious shortcuts power users rely on:
Multi-line input. Press Shift+Enter (or use \ line continuation) to write multi-line prompts. Useful for structured goal prompts where you want to organise inputs.
Continuation. If a response gets cut off, "continue" alone as your next message resumes the response. Avoids the "please continue from where you left off" verbose pattern.
Reference resolution. Mid-conversation reference like "the function I just wrote" works because Claude tracks the recent context. Faster than naming the file again.
Workflow chaining. "After fixing the test, run typecheck. If typecheck passes, push to main." Claude Code follows the chain natively.
Session export. /safe-clear writes your handoff to a markdown file. You can paste this into a new session later to resume.
Per-project shortcut customisation
Two configuration files where shortcuts get personalised:
CLAUDE.md → Quick Start section. Document project-specific commands at the top of CLAUDE.md so every session sees them:
## Quick Start
- /deploy: production deploy (uses /scripts/deploy.sh)
- /test:e2e: run Playwright tests
- /db:migrate: apply Drizzle migrations
.claude/commands/ for actual command definitions. The name.md filename becomes the slash command (/name). The file body is the procedure Claude follows when invoked.
This is how teams encode their conventions into shortcuts that every team member's Claude Code session inherits.
What you do not need to memorise
Three command categories most users do not need:
Internal debugging commands (verbose mode flags, diagnostic outputs). Useful when troubleshooting Claude Code itself, irrelevant for daily work.
Beta/experimental commands. Ship and break. Stick with stable commands for daily workflows.
Provider-switching commands. If you only use Claude (the default), the model-routing commands beyond /model haiku|sonnet|opus are unnecessary.
A cheat sheet that includes everything fails. The sheet above is the 80/20.
The configuration shortcut
A pre-built command library and skill set saves the time of writing your own. Claudify ships with /start, /sync, /safe-clear, /audit, /deploy, and dozens of others already configured. The rest of the workflow patterns plug in around them.
Print and stick this on your monitor
The 10 commands that compound most:
/safe-clear: end-of-task save and reset/compact: free context mid-session/model sonnet: drop from Opus to save tokensEsc Esc: edit previous message@filename: reference file inline- "Read /path:start-end": read specific lines
- "Grep for X": search codebase
/audit: quality gate before PR/sync: update memory.md mid-day/start: open the day's session
Internalise these ten. The rest of the cheat sheet is reference material you Google when needed.
Next steps
Claude Code shortcuts compound the more your workflow is structured around them. The first month of use is mostly learning the commands. The third month is them becoming muscle memory.
Get Claudify. The Claude Code operating system that ships with the command library, the skill set, and the structured memory that make these shortcuts maximally productive.
More like this
Ready to upgrade your Claude Code setup?
Get Claudify