claude-compaction-restore
하는 일
이 스킬은 긴 작업 중 기억이 압축될 때 AI 코딩 에이전트가 작업에 대한 이해를 유지하도록 돕습니다. 긴 세션을 운영하는 기획자나 리뷰어 같은 에이전트를 위한 것입니다.
사용하는 경우
- ✓Claude Code 세션이 압축되려 하거나 방금 압축되었을 때.
- ✓에이전트가 /compact 후 재개되어 작업 그림을 되찾아야 할 때.
- ✓오래 실행되는 에이전트 좌석이 파일과 결정 사이의 연결을 계속 유지해야 할 때.
스킬 링크
https://github.com/mvschwarz/openrig/blob/main/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Claude 세션이 방금 압축되어 계획을 놓쳤습니다. 복구 메모와 대화 기록으로 계획을 다시 세워 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
압축 전에 중요한 내용과 그 연결을 짧은 지도로 저장하고, 압축 후에는 그 지도와 대화 기록을 읽어 행동하기 전에 작업 그림을 되살립니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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.
Only in your head; write it down:
- why each important thing matters, and to whom;
- how things relate: depends on, supersedes, answers, contradicts, was produced by, is owned by;
- decisions and the reasons for them, options you rejected, judgment and taste you applied;
- where you were in time: what earlier windows established, what this window did, what comes next and who authorizes it;
- where to look deeper: which JSONL range or file answers which question.
The map is the second list, pinned to the first.
Two restore classes
Every restored seat must come back competent. It should understand the OpenRig world and its command surface, the project, its own role, and where it stands in time. Some seats also need the global picture.
Both classes read the same thing: the ranked reading list in your own map, in order. They differ only in how far down the list they go.
| Class | Who | Reads |
|---|---|---|
| Default | drivers, builders, reviewers, QA, and any seat not listed below | Tier 1: the top of the list, to about 100k of real context |
| High-context | orchestrators, planners, advisors, leads: any seat that makes product, scope or routing decisions | Tier 1 and Tier 2, to about 200k of real context |
The tiers are real context added by the restore, on top of what the compaction summary leaves (about 60k).
These budgets assume a context window of about 1M tokens; on a smaller window, scale them to about 10% and
20% of it. File size is a poor guide to that cost: in OpenRig's own runs, real context grew 1.7 to 2 times the bytes ÷ 4 estimate,
because of line numbers on reads, tool output and your own reasoning. So rank to about 50k of bytes ÷ 4 for
Tier 1 and about 100k for Tier 2, and check real usage at each checkpoint with
rig compact-plan --json (your seat's estimatedUsedTokens).
Tier 2 buys width, not depth: more sources, more connections, more of the mission's history and the wider
worlds, not the same files read more fully. Choose your class from your role (rig whoami --json). A per-seat
instruction file or your own map can name the class explicitly, and that overrides the role default. In both
classes, transcripts and the session JSONL appear only as targeted line ranges, never as whole files.
If there is no ranked list (no preparation turn happened), use this default order. Default seats stop at about 100k of real context:
- the post-compaction world profile;
- the mission or slice
SPEC.mdandNOTES.md; - rows you hold.
High-context seats then add, to about 200k:
- the full System World install;
- the full Project World, public and private;
- the mission's
PROGRESS.mdand recent returns; - previous maps and
RESTOREDnotes; LEARNED.md.
If You Are About To Compact
You are about to lose every connection you have built. Spend this turn making them durable.
- Think back before writing. Walk the session and, throu
자주 묻는 질문
압축하면 무엇이 사라지나요?
파일 이름과 결정 같은 사실은 남지만, 파일이 왜 중요한지처럼 항목 사이의 연결은 사라집니다.
복구 지도는 어디에 저장되나요?
디스크에 기록됩니다. 스킬은 대화 기록을 복사하지 않고 기존 세션 기록을 가리킵니다.
누구에게 가장 도움이 되나요?
작업 전체를 넓게 보는 기획자, 오케스트레이터, 리뷰어처럼 오래 실행되는 에이전트에게 가장 도움이 됩니다.
상세 정보
작성자의 원본 설명
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.
repo: mvschwarz/openrig
인기도
- GitHub 스타
- 8.6k
- 순위
- #12385
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
agent-operated-software
8.6k백엔드에 AI 에이전트가 포함된 앱을 설계하고 만들고 디버깅하도록 돕습니다.
agent-operated-workflows
8.6k범위가 정해진 절차를 AI 에이전트가 실행할지 일반 코드가 실행할지 정하고, 검증된 근거로 안전하게 재개하도록 돕습니다.
applying-a-permission-policy
8.6k에이전트가 팀 설정 중 쓰는 명령 권한을 맞춰, 일상적인 명령이 승인 요청을 덜 거치도록 돕습니다.
delegating-work
8.6k에이전트가 작업을 직접 할지, 하위 에이전트나 맥락을 이미 아는 팀원에게 맡길지 정하고 그 작업자에게 지시하도록 돕습니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.