Use this skill when the user mentions context-related concerns or during long sessions: - Context concerns: "context window", "context management", "losing context", "forgetting things" - Session length: "conversation too long", "been working a while", "long session" - Quality degradation: "responses getting worse", "you're repeating yourself", "losing coherence" - Compaction: "when to compact", "should I compact", "how much context left", "context usage" - Memory: "remember this", "don't forget", "keep track of" Provides the 40-60% rule and compaction strategies for maintaining output quality.
This skill inherits all available tools. When active, it can use any tool Claude has access to.
references/compaction-patterns.mdGuidance for maintaining effective context utilization during AI-assisted development.
As conversations grow, AI assistants experience context degradation:
This is not a bug—it's physics. Context windows have finite capacity, and as they fill, signal-to-noise ratio drops.
Target: Maintain context at 40-60% capacity.
| Utilization | Status | Action |
|---|---|---|
| < 40% | Healthy | Continue working |
| 40-60% | Optimal | Monitor, plan compaction |
| 60-80% | Warning | Compact soon |
| > 80% | Critical | Compact immediately |
Why this range?
Claude Code can display your current context utilization in the statusline. To enable it:
/config and navigate to statusline settingsThis gives you real-time visibility into when compaction is needed—no more guessing!
Watch for these warning signs:
Behavioral:
Quality:
When you notice these: Compact immediately, don't push further.
Natural breakpoints:
Warning signs:
Time-based:
Always keep:
Safe to discard:
Use the /harness:compact command to:
The handoff document becomes the "seed" for the next context.
When exploring unfamiliar code:
cartographer agent instead of exploring in main contextInstead of:
Let me search for all files related to authentication...
[20 grep results]
Let me read each of these...
[verbose file contents]
Do:
Launch cartographer to explore authentication code.
[Agent returns: synthesized findings]
Move information out of context into files:
RESEARCH.mdPLAN.mdFiles persist across context resets. Context doesn't.
Vague requests waste context on clarification:
Instead of: "Help me fix this bug"
Say: "Fix the null pointer in src/auth.ts:45 when user has no email"
Specific requests get specific answers with less back-and-forth.
After completing a unit of work:
This creates natural compaction checkpoints.
If you notice degradation mid-task:
/harness:compact to create handoffIt's better to compact early than to fight degradation.
Before starting complex work:
During work:
After completing phases:
For detailed compaction workflows:
references/compaction-patterns.md - Detailed compaction strategies/harness:compact command - Create compaction checkpoint