Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Context preservation strategy for multi-session projects during context window compaction. Use when running `/compact`, when auto-compact is triggered, or when determining what state to preserve across session boundaries to maintain continuity.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 46% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 1% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -3% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 37% | 0% |
| case-17 | ✗→✓ | ▲ Improved | -4% | 0% |
When a Claude Code session approaches context-window limits and performs context compaction (manual /compact or automatic), the agent must balance information density with continuity. This skill defines what to preserve and what to discard.
The compact summary is a sketch, not a replacement for durable state. If the project has a session-handoff.md, PROGRESS.md, CHANGELOG.md, or equivalent living documentation, those files remain the source of truth. The compacted context is temporary and lossy — it buys context space in the current session, but it does not eliminate the need to maintain formal handoff documents for the next session.
If compaction is being used to work around missing handoff documentation, that is a symptom — fix the root cause (write the missing session-handoff.md or PROGRESS.md) rather than relying on compaction to carry state.
/compact command during an active sessionBefore finalizing a compact summary, ask:
PROGRESS.md or session-handoff.md exists, point to it: "see PROGRESS.md for detailed timeline."session-handoff.md pattern — permanent cross-session statePROGRESS.md — executive/phase-level tracking/compact command documentation — Claude Code referenceOther measured skills in the registry, with their headline benchmark lift.