Cheatsheet
The one-page take-home. Print it, pin it.
Getting in and out
| Command |
Does |
claude |
Start a session in this directory |
claude --continue |
Resume the most recent session here |
claude --resume |
Pick an older session to resume |
claude -p "..." |
One-shot, non-interactive (scriptable) |
| Ctrl+C |
Interrupt the agent mid-flight |
/help |
Everything else |
The dials
| Action |
How |
| Plan mode (read-only, propose first) |
Shift+Tab to cycle modes |
| Auto-accept edits |
Shift+Tab again |
| Compact the conversation |
/compact [what to focus on] |
| Think harder on the next step |
say "think hard" / "ultrathink" |
| Spawn parallel subagents |
just ask: "use N subagents to…" |
The seven patterns, one line each
- Where it runs — tmux on the machine with the data; detach and let it work.
- Modes — plan when wrong is expensive; auto-accept when a loop catches errors.
- Subagents — fan out reading/searching; keep conclusions, not file dumps.
- Context — finite. Put durable state in
NOTES.md/CLAUDE.md, not the chat.
- Skills/MCP — corrections you've made twice become a CLAUDE.md line or a skill.
- Feedback loops — goal + measure + iterate. Build the test harness first.
- Artifacts — results to
artifacts/ with metrics.json + REPORT.md; make the agent look at its own plots.
Prompts that work
# Goal + loop (the big one)
Implement X. Verify against [known limit / synthetic truth / published
figure]; iterate until [tolerance]. Show me the comparison plot.
# Context hygiene
Write NOTES.md capturing what we decided and why, before we continue.
# Honest delegation
Don't write code yet — plan the approach and list what could go wrong.
# Visual feedback
Look at artifacts/fig3.png. Anything pathological?
# Skeptical cross-check
Spawn a subagent whose only job is to refute this result.
A minimal CLAUDE.md for a physics project
- Python via uv (`uv run ...`). Tests with `uv run pytest` — run before
declaring success. Never modify tests/ to make them pass.
- Natural units (G=c=1); document any unit conversion at the boundary.
- Every physics function: docstring with equation + paper reference.
- Results to artifacts/<task>/ with metrics.json and REPORT.md.
- Plots saved to file, never plt.show(). Look at plots after making them.
Pricing intuition (from the intro)
- Input (prefill) tokens: cheap, cacheable. Long stable context costs
little if it doesn't change between turns.
- Output + reasoning tokens: the real cost. Spend them on decisions,
not boilerplate.
- A focused session beats a sprawling one on both cost and quality —
compaction and subagents exist to keep sessions focused.