본문으로 건너뛰기
Skillpedia
에이전트8.6k · #12385

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mvschwarz/openrig/blob/main/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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's LEARNED.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:

  1. the post-compaction world profile;
  2. the mission or slice SPEC.md and NOTES.md;
  3. rows you hold.

High-context seats then add, to about 200k:

  1. the full System World install;
  2. the full Project World, public and private;
  3. the mission's PROGRESS.md and recent returns;
  4. previous maps and RESTORED notes;
  5. LEARNED.md.

If You Are About To Compact

You are about to lose every connection you have built. Spend this turn making them durable.

  1. 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬