मुख्य सामग्री पर जाएँ
Skillpedia
एजेंट8.6k · #12385

claude-compaction-restore

यह क्या करती है

यह स्किल AI coding एजेंट को लंबे काम की समझ बनाए रखने में मदद करती है, जब उसकी मेमोरी संकुचित हो जाए। यह लंबे सत्र चलाने वाले एजेंट्स, जैसे टीम में planners या reviewers, के लिए है।

कब इस्तेमाल करें

  • ✓जब Claude Code सत्र compact होने वाला हो या अभी compact हुआ हो।
  • ✓जब एजेंट /compact के बाद फिर शुरू हो और उसे अपनी कार्य-तस्वीर वापस पानी हो।
  • ✓जब लंबे चलने वाली seat को फ़ाइलों और फ़ैसलों के बीच के संबंध बनाए रखने हों।

Skill का लिंक

https://github.com/mvschwarz/openrig/blob/main/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mvschwarz/openrig/blob/main/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरा Claude सत्र अभी compact हुआ और मैं योजना भूल गया। मेरे restore नोट्स और transcript से उसे फिर बनाने में मदद कीजिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

Compaction से पहले यह जो मायने रखता है और चीज़ें कैसे जुड़ी हैं, उसका छोटा नक्शा सहेजती है, फिर compaction के बाद वह नक्शा और transcript पढ़कर कार्रवाई से पहले तस्वीर बहाल करती है।

तकनीकी सामग्री (मूल 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
अक्सर पूछे जाने वाले सवाल

Compaction में क्या खो जाता है?

फ़ाइल नाम और फ़ैसले जैसे तथ्य रह जाते हैं, पर उनके बीच के संबंध खो जाते हैं, जैसे कोई फ़ाइल क्यों मायने रखती है।

restore map कहां रहता है?

यह डिस्क पर लिखा जाता है, और स्किल मौजूदा session transcript की ओर इशारा करती है, उसकी कॉपी नहीं बनाती।

सबसे ज़्यादा किसे फ़ायदा होता है?

planners, orchestrators और reviewers जैसे लंबे चलने वाले एजेंट्स को, जो काम की विस्तृत तस्वीर रखते हैं।

जानकारी

लेखक का मूल विवरण

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
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

agent-operated-software

8.6k

यह आपके एजेंट को ऐसे चालू ऐप को डिज़ाइन, बनाने या डीबग करने में मदद करती है जिसके लाइव बैकएंड में AI एजेंट शामिल हैं, जैसे Markdown या JSON control plane।

AI और एजेंटएजेंट

agent-operated-workflows

8.6k

यह आपके एजेंट को तय करने में मदद करती है कि कोई सीमित प्रक्रिया AI एजेंट चलाए या साधारण कोड, और सत्यापित सबूत से उसे कैसे फिर से शुरू करे।

AI और एजेंटएजेंट

applying-a-permission-policy

8.6k

यह आपके एजेंट को टीम सेटअप के दौरान AI coding एजेंट की कमांड अनुमतियां सेट करने में मदद करती है, ताकि रोज़ के कमांड कम मंज़ूरी प्रॉम्प्ट के साथ चलें।

AI और एजेंटएजेंट

delegating-work

8.6k

यह आपके एजेंट को तय करने में मदद करती है कि काम कौन करे: वह खुद, एक subagent, या ऐसा साथी जिसके पास संदर्भ पहले से है, और उस कार्यकर्ता को कैसे समझाएं।

AI और एजेंटएजेंट

मिलती-जुलती skills