Claude Code Cheat Sheet

Each row shows the command or key, a one-line meaning, and when to use it. Anything in [brackets] or <angle brackets> gets replaced with your own value.

Day-one setup

Install Claude Code machine-wide
Once per machine
Verify the install
After installing
Start a session
Always from the project folder
Sign in (Claude account or API key)
First launch; remembered after
Scan the project, generate CLAUDE.md
Once per project, day one

In every session

Cycle modes → Plan Mode (plan before edits)
Any task touching 3+ files
Interrupt Claude mid-action
The moment it drifts
Wipe the session — fresh context
Between tasks, after committing
Summarize the session, keep going
Mid-task, when it gets long/slow
Attach a specific file to your message
Point at exactly the right file
Append a memory to CLAUDE.md
Corrections that are true forever
Run a shell command yourself, in-session
Quick checks (e.g. !npm run build)

Sessions & recovery

Reopen your most recent session
"Oops, closed the terminal"
Pick any past session to reopen
Returning to yesterday's thread
Restore code/conversation to a checkpoint
Undo without Git surgery
Show token/usage status
Glance occasionally
Switch model
Routine work vs hard problems

Plugins & permissions

Open the plugin manager
Discover / install / manage
Install a starter plugin
See chapter 14 for the full set
Apply plugin changes without restarting
After install/remove
Control what Claude may do without asking
Review as trust grows

MCP servers

Connection status + OAuth logins
After adding a server
Connect GitHub (PRs, issues, repos)
Starter MCP #1
Give Claude a real browser
Starter MCP #2
See connected servers
Keep it to 3–6 total

The prompt library

The reusable templates live in their chapters — each one is a copyable block:

Panic buttons: Esc (stop right now) · /rewind (restore a checkpoint) · git checkout -- . (discard uncommitted changes — see the Git guide) · your host's rollback (production).

Cost hygiene: /clear between tasks · /compact mid-task · /usage to check · name files, never "read the whole codebase" · keep CLAUDE.md lean.

Official docs: code.claude.com/docs — installation, commands, MCP, plugins, skills.

FAQ

Frequently Asked Questions

What is the minimal day-one Claude Code setup?
npm install -g @anthropic-ai/claude-codecd into your project → claude/login/init. That's a working professional setup; plugins and MCP servers can come later.
What are the Claude Code panic buttons?
Esc stops the current action, /rewind restores an earlier checkpoint, git checkout -- . discards uncommitted changes, and your host's rollback undoes a bad production deploy.
How do I keep Claude Code costs down?
Context hygiene: /clear between tasks, /compact mid-task, name specific files instead of "read the whole codebase", keep CLAUDE.md lean, and glance at /usage to build intuition for what things cost.