/ Tools / Claude Code cheatsheet Team only
Hedgehog Marketing / NHH

Claude Code — context window cheatsheet

How to start, what to watch for, and how to close a session cleanly.
1

Start

  1. Open repo — CLAUDE.md loads automatically
  2. Paste your brief — nothing else, no preamble
  3. Wait for Code to respond before adding anything
2

Watch

Act on any one of these. Don't wait for two.
  • References something you didn't say
  • "Improves" things you didn't ask about
  • Unprompted summary of what it's done
  • Gets "earlier discussion" wrong
  • Responses noticeably more verbose
  • Repeats a fix it already made
3

Compact

  1. Say: "Update the session state block in CLAUDE.md with where we're up to"
  2. Confirm the update — check file, function, status, next step
  3. Run /compact
  4. After compact — restate file path and function name in your next instruction
Timing: Run at ~60–70% full. Once warning signs appear you're already past the sweet spot — compact immediately.
4

Abandon

  1. Stop — do not try to course-correct, it makes it worse
  2. Note where you're up to: file, function, what's done
  3. Close the session
  4. Come to Claude.ai — ask for a continuation brief scoped to what's left
  5. Paste continuation brief into a fresh Code session
When to use: If the session has gone off the rails, don't try to course-correct — it makes it worse.
5

End

  1. Ask: "What files did you modify this session?" — confirm it matches the brief
  2. Run the verification steps from the brief
  3. Commit to branch — never directly to main
6

State block

Add this to the bottom of each CLAUDE.md

---
## Current session state
_Updated by Code before /compact or at session end._

**Last worked on:** [file + function]
**Status:** [what's done / what's not]
**Next step:** [exact next instruction]
**Open issues:** [anything weird found mid-session]