agentleFS
markoblogomarkoblogo/abvx-agent-skills/skills/compaction-survival/SKILL.md

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.

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

    When a session is getting long, preserve only the working state that would be expensive to reconstruct.

    line 16
  2. Distinctive:

    Keep the checkpoint stable unless the working state materially changes.

    line 47
  3. Distinctive:

    After compaction or resume, recover from the checkpoint first instead of replaying the whole session.

    line 48
  4. Distinctive:

    Do not checkpoint secrets.

    line 59
  5. Distinctive:

    Do not create noisy per-turn diary files.

    line 60
  6. Distinctive:

    Do not preserve stale hypotheses after the evidence changed.

    line 61
  7. Distinctive:

    Do not replace real verification with checkpoint confidence.

    line 62

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Detect compaction risk:
    • long session;
    • many files touched;
    • many turns of debugging or research;
    • user explicitly worried about token budget.
  2. Emit a compact handoff artifact:
    • objective;
    • done / next / blocked;
    • decisive evidence only;
    • exact paths for deeper artifacts.
  3. Keep the checkpoint stable unless the working state materially changes.
  4. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.