
Claude Compaction Restore
Use when a Claude Code session is about to compact, has just compacted, reached its...
Install
npx skills add mvschwarz/openrig --skill claude-compaction-restore -g -a claude-code -y- Repository
- mvschwarz/openrig8.5k
- Category
- AI and agents
- Updated
- 3d ago
- License
- Apache-2.0
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- Yes, review before use
What it does
Use when a Claude Code session is about to compact, has just compacted, reached its context limit, resumed after /compact, or must rebuild its working picture of a long-running seat from its own restore map, its JSONL transcript and the files it touched.
Claude Compaction Restore
Compaction keeps facts and loses connections. After a compaction you still know file names, row ids and decisions as items. What you lose is the web between them: why a file matters, what depends on what, which decision produced which artifact, what you were about to do next, and how this window relates to the ones before it. Seats whose value is a wide, long-running picture (planners, orchestrators, reviewers holding a standard) lose the most.
This skill keeps that picture alive across compactions. Before compacting, you write a restore map: a short summary plus the connections between things that already exist on disk. After compacting, you re-enter the world, read your own map, and rebuild the picture before acting. Over several compactions the maps chain into one continuous record: a global context window that outlives any single session.
The previous version of this skill is kept at reference/SKILL-v1.md for comparison.
What survives, and what you write
Already on disk; point to it, don't copy it:
- your session JSONL at
~/.claude/projects/<cwd-slug>/<session-uuid>.jsonl(the post-compaction restore request names the exact path). It holds every message and tool call you made, in order. It does not hold your reasoning; - the restore packet the PreCompact hook writes (transcript extract, touched-file triage);
- queue rows and their transitions, mission files (
SPEC.md,NOTES.md,PROGRESS.md), your seat'sLEARNED.md, evidence folders, branches and PRs.

