Claude Code cheat sheet: the one page I hand out after my workshop
Prompting habits, session commands and power moves for Claude Code on a single page, with a line on when to use each.
Belal HaikalLast updated

My Claude Code Best Practices workshop has 42 tips. Nobody remembers 42 tips the next morning, so the last slide but one is a cheat sheet. This is that page, with a line on when each item earns its place.
Commands and shortcuts change between versions. If one does not work for you, check /help.
Prompting
- Be specific. Give the problem, not the steps. Say what is wrong and what done looks like.
- Use
@filereferences. Point at the exact file instead of describing it. - Say "run the tests after". Give the assistant a way to check its own work.
- Use XML tags. Documents at the top, task at the bottom. More on this in the anatomy of a good prompt, and in Anthropic's prompting guide.
- Frame it positively and explain why. Reasons let the assistant make good calls on its own.
- Stop using ALL CAPS. It adds noise, not emphasis.
- Give 3 to 5 examples in
<example>tags. Faster than a long list of rules.
Session
/clearbetween tasks. One task, one session./compact <focus>at about 70%. Shrink the session and say what to keep. The reason is in why Claude Code gets "dumber".!cmd. Run a shell command yourself, straight from the prompt./btw. Ask a side question without derailing the task in progress.Ctrl+Gopens your editor for a long prompt.Ctrl+Bsends a long-running command to the background.EscEsc. Rewind to an earlier point when a session has gone the wrong way.--resume. Pick up a past session.
Power moves
ultrathinkin the prompt, or/effort high. Ask for deeper reasoning on the hard problems. Not on everything: it costs more.--worktree. Work on several things in parallel without the branches colliding.-p "...". Headless mode, for scripts and pipelines.--from-pr 42. Resume the session that belongs to a pull request./agents. Build custom agents for jobs you repeat.- Keep
CLAUDE.mdunder 200 lines. It is loaded into every session, so every line has to earn its place. /cost. Check what the session has spent. These habits are the difference between a $5 day and a $40 day.
The one rule
If you forget everything above, keep this: treat the assistant like a brilliant engineer on day one.
Give context. Be specific. Explain why. Let it verify. Clear often. Plan first.
And work in this order: explore, plan, implement, verify, ship.
I run this workshop for engineering teams, on site or remote. Details are on the AI training page.