compaction-survival
Skill16 starsChanged 5 months agoMITView on GitHub
Preserve working state across long sessions and context compaction by checkpointing decisions, edited files, blockers, open hypotheses, and unresolved errors into compact resumable artifacts. Use on long coding tasks, audits, research, or any session at risk of losing state after compaction.
In this repository94 other files it gives its agents.
- agent-friction-ledgerSkill
- agent-learning-layer-triageSkill
- agent-operations-contractSkill
- agents-best-practicesSkill
- agent-tool-contract-reviewSkill
- anti-slop-reviewSkill
- architecture-deepening-reviewSkill
- assumption-excavationSkill
- authorized-security-routerSkill
- book-to-skillSkill
- bounded-evaluationSkill
- bounded-growth-loopSkill
- bounded-orchestration-contractSkill
- brief-first-executionSkill
- browser-verificationSkill
- bug-evidence-protocolSkill
- codex-review-loopSkill
- complexity-optimizerSkill
- confidence-fragility-reviewSkill
- context-degradation-reviewSkill
- corporate-surfaceSkill
- delivery-baseline-auditSkill
- delivery-preflight-gateSkill
- design-critique-polishSkill
- designmd-brand-kitSkill
- design-register-bootstrapSkill
- diagnoseSkill
- doc-grounded-grillingSkill
- doc-to-lora-evaluatorSkill
- durable-context-maintenanceSkill
- dynamic-workflow-packetsSkill
- editorial-surfaceSkill
- evidence-ledger-researchSkill
- filesystem-context-disciplineSkill
- fluid-interaction-reviewSkill
- frontend-product-builderSkill
- frontend-taste-layerSkill
- git-native-context-contractSkill
- goal-loop-designerSkill
- graph-guided-code-readingSkill
- handoffSkill
- happy-handoffSkill
- html-brief-artifactSkill
- html-diagram-artifactSkill
- hypothesis-diversificationSkill
- idea-to-ship-gatesSkill
- knowledge-base-enrichmentSkill
- lean-context-layoutSkill
- local-inference-tuningSkill
- loop-hardening-contractSkill
- loopops-protocolSkill
- loop-readiness-reviewSkill
- lottie-motion-builderSkill
- minimal-diff-builderSkill
- motion-review-gateSkill
- overengineering-reviewSkill
- personal-workspace-routerSkill
- phase-spec-executionSkill
- pipeline-readiness-gateSkill
- plan-to-issuesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
When a session is getting long, preserve only the working state that would be expensive to reconstruct.
- Distinctive: line 47
Keep the checkpoint stable unless the working state materially changes.
- Distinctive: line 48
After compaction or resume, recover from the checkpoint first instead of replaying the whole session.
- Distinctive: line 59
Do not checkpoint secrets.
- Distinctive: line 60
Do not create noisy per-turn diary files.
- Distinctive: line 61
Do not preserve stale hypotheses after the evidence changed.
- Distinctive: line 62
Do not replace real verification with checkpoint confidence.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Compaction Survival
Save tokens by keeping the right state alive across compaction instead of re-deriving it after memory loss.
Goal
When a session is getting long, preserve only the working state that would be expensive to reconstruct.
What To Preserve
- current objective;
- active subtask list;
- key decisions and reversals;
- files changed or inspected deeply;
- unresolved errors and their current hypothesis;
- blockers, constraints, and pending verifications;
- exact artifact paths for large outputs or generated files.
What Not To Preserve
- long narrative history;
- repeated summaries of already-resolved steps;
- raw logs that can be regenerated cheaply;
- generic project documentation already available on disk.
Checkpoint Workflow
- Detect compaction risk:
- long session;
- many files touched;
- many turns of debugging or research;
- user explicitly worried about token budget.
- Emit a compact handoff artifact:
- objective;
- done / next / blocked;
- decisive evidence only;
- exact paths for deeper artifacts.
- Keep the checkpoint stable unless the working state materially changes.
- After compaction or resume, recover from the checkpoint first instead of replaying the whole session.
Recommended Shapes
- concise handoff note;
- checked-location ledger;
- issue-specific status file in
docs/ai/tasks/or equivalent; - compact bullets over narrative prose.
Guardrails
- Do not checkpoint secrets.
- Do not create noisy per-turn diary files.
- Do not preserve stale hypotheses after the evidence changed.
- Do not replace real verification with checkpoint confidence.
Final Report
Say what was checkpointed, where it lives, and what should be reused first after resuming.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

