# Context Management Cheat Sheet

> From NerdSmith Founder Track -- Module 0, Lesson 2: Context Window Management
> Print this or keep it open. Reference it during every Claude Code session.

---

## The Basics

| Term | What It Means |
|------|---------------|
| **Context window** | Everything Claude can "see" in this session -- your prompts, files read, Claude's responses, conversation history |
| **Token** | A unit of text (~0.75 words). 1,000 words = ~1,300 tokens |
| **Context limit** | 200,000 tokens (~150,000 words / ~500 pages) |
| **The 80% rule** | Stop and `/recap` when context hits 80% (160K tokens) |

---

## Context Cost Reference

| Action | Token Cost | % of 200K |
|--------|-----------|-----------|
| Short prompt (100 words) | ~130 | 0.07% |
| Claude's response (500 words) | ~650 | 0.3% |
| CLAUDE.md file (500 words) | ~650 | 0.3% |
| One product spec (2,000 words) | ~2,600 | 1.3% |
| One interview transcript (2,000 words) | ~2,600 | 1.3% |
| 10 interview transcripts | ~26,000 | 13% |
| 10 competitor website scrapes | ~65,000 | 33% |
| Full codebase read (100 files) | ~50,000-100,000 | 25-50% |

---

## Context Health Zones

```
 0% ─────────── 50% ─────────── 75% ─── 80% ─── 100%
 |     GREEN      |    YELLOW     | ORANGE | RED  |
 |  Work freely   | Watch usage   | Recap  | STOP |
 |  Full quality  | Plan ahead    | soon   |      |
```

| Zone | Range | Action |
|------|-------|--------|
| GREEN | 0-50% | Work freely. Full quality. |
| YELLOW | 50-70% | Monitor. Consider recapping if switching tasks. |
| ORANGE | 70-80% | Finish current task, then `/recap`. |
| RED | 80%+ | `/recap` immediately. Quality is degrading. |

---

## How to Check Usage

**Method 1:** Type `/usage` in Claude Code

**Method 2:** Watch the prompt box footer in VSCode (shows % in real-time)

**Method 3:** Watch for Claude's warning: "I'm approaching my context limit"

---

## When to /recap

### DO recap when:
- Context hits 75-80%
- You're switching to a completely different task
- Claude starts "forgetting" earlier instructions
- You've been working for 2+ hours
- You're about to read a large batch of files

### DON'T recap when:
- Context is under 50%
- You're in the middle of generating output
- You just started the session
- You're iterating on the same output (build -> refine -> polish)

---

## The /recap Workflow (4 Steps)

```
1. Type: /recap
2. Claude saves a summary (decisions, outputs, next steps)
3. Start a NEW session
4. Tell Claude: "Read [recap file] and continue where we left off"
```

---

## Context-Saving Tactics

| Tactic | How | Savings |
|--------|-----|---------|
| **Read selectively** | "Read only research/interviews/2026-01-*" instead of "Read everything in research/" | 50-80% |
| **Summarize first** | Have Claude write a summary of a big file, then use the summary in future sessions | 90-95% |
| **.claudeignore** | Add binary files, archives, images to .claudeignore | Varies |
| **CLAUDE.md** | Put recurring instructions in CLAUDE.md instead of repeating in prompts | Saves 500+ tokens/session |
| **Break into sessions** | One focused task per session instead of everything in one marathon | Keeps each under 50% |
| **Use specific file paths** | "Read specs/product-spec.md" instead of "Find and read the product spec" | Claude doesn't scan entire tree |

---

## Founder Task Budgets (Quick Reference)

| Task | Typical Cost | Sessions Before 80% |
|------|-------------|---------------------|
| Generate a product spec | ~3,600 tokens (1.8%) | 20+ per session |
| Analyze 10 interviews | ~32,000 tokens (16%) | 3-4 per session |
| Competitive analysis (10 sites) | ~75,000 tokens (37.5%) | 2 per session |
| Landing page copy + iterations | ~9,000 tokens (4.5%) | 10+ per session |
| Email sequence (5 emails) | ~12,000 tokens (6%) | 8+ per session |
| Full-day product work | ~150,000 tokens | Split across 3 sessions |

---

## Emergency: Context Full (100%)

If you hit 100% and can't even run `/recap`:

1. **Copy-paste the most important output** into a text file manually
2. **Close the session** entirely
3. **Start fresh** -- read your CLAUDE.md and any saved outputs
4. **Lesson learned:** Recap at 75% next time

---

*NerdSmith Founder Track -- Module 0: Claude Code Bootcamp*
*Download: Context Management Cheat Sheet*
