capsule-compact
Skill25 starsChanged 7 days agoMITView on GitHub
Compact capsule chains by summarizing older capsules. Use when manually compacting capsules or a context chain grows too long.
In this repository71 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- llms.txtllms.txt
- agent-fitnessSkill
- body-checkSkill
- briefSkill
- closeSkill
- codex-adapterSkill
- cognitive-updateSkill
- comms-summarizeSkill
- compact-noteSkill
- context-capsuleSkill
- context-hygieneSkill
- critique-planSkill
- decideSkill
- deep-reconSkill
- DiagnoseSkill
- digestSkill
- dreamSkill
- EnvelopeSkill
- find-weaknessSkill
- First 10 MovesSkill
- first-winSkill
- frontend-slidesSkill
- Honesty CheckSkill
- humanize-docsSkill
- impeccableSkill
- learn-from-failureSkill
- LearnSkill
- memory-bridgeSkill
- meta-improveSkill
- meta-improve-vaultSkill
- nightly-close-paritySkill
- nightly-ledger-captureSkill
- nightlySkill
- openSkill
- operator-setupSkill
- orientSkill
- pauseSkill
- ponytailSkill
- port-specSkill
- PromoteSkill
- reconcileSkill
- research-deepSkill
- resumeSkill
- Sandbox RoutingSkill
- scout-vaultSkill
- Self-ReviewSkill
- semantic-searchSkill
- setupSkill
- ship-adapterSkill
- Skill AuditSkill
- skill-huntSkill
- skill-recallSkill
- solution-huntSkill
- sprite-specSkill
- startSkill
- statusSkill
- StuckSkill
- supersedeSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Run python3 daemons/capsule-compact.py <head_capsule_id> from the vault root.
- Very specific: line 22
If chain length >= 5, summarizes the oldest 3 capsules into a single chain-summary-<head>-<date>.md capsule
- Distinctive: line 30
After narrative-reconstruction archeology when the chain has grown unwieldy
- Distinctive: line 41
Does not auto-compact at /close.
- Very specific: line 42
Does not delete compacted capsules.
- Distinctive: line 43
Does not LLM-summarize. Concatenates structured fields (objective, open_threads still live, held decisions).
- Distinctive: line 44
Does not walk forks. parent_capsule_id is strictly linear.
≈ “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
/capsule-compact
Run python3 daemons/capsule-compact.py <head_capsule_id> from the vault root.
The script:
- Walks
parent_capsule_idchain backward from the head - If chain length >= 5, summarizes the oldest 3 capsules into a single
chain-summary-<head>-<date>.mdcapsule - Updates pointers: boundary capsule's parent → summary; summary's parent → original chain root's parent
- Marks each compacted capsule with
compacted_into: <summary_id>(they stay on disk for archeology)
When to run
- /close Step 0.5 PART E (v0.4.5) reports the capsule chain length when the threshold is hit
- Manually before a session-heavy week to keep /open Step 2.5 fast
- After narrative-reconstruction archeology when the chain has grown unwieldy
Defaults
- Threshold: 5 capsules
- Summarize-count: 3 oldest
Override via --threshold N and --summarize-count N flags.
What it does NOT do
- Does not auto-compact at /close. Hints, you decide.
- Does not delete compacted capsules. Each gets
compacted_into:marker. - Does not LLM-summarize. Concatenates structured fields (objective, open_threads still live, held decisions).
- Does not walk forks. parent_capsule_id is strictly linear.
Cross-links
- [[concepts/Somatic v0.4.5 Chain Compaction]] — spec
- [[concepts/context-capsule]] — base capsule schema
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.

