Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add wrg32786/aigent-os --skill capsule-compactgit clone --depth 1 https://github.com/wrg32786/aigent-osWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/wrg32786/aigent-os/capsule-compact)<a href="https://agentmods.dev/skills/wrg32786/aigent-os/capsule-compact"><img src="https://agentmods.dev/badge/skills/wrg32786/aigent-os/capsule-compact.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00042 | $0.00464 |
| Opus 5 | $0.00021 | $0.00232 |
| Sonnet 5 | $0.00008 | $0.00093 |
| Haiku 4.5 | $0.00004 | $0.00046 |
Grade A, and why
capsule-compact scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
/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) emits
[CADDY:context] CHAIN — capsule chain length Nwhen threshold 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
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 50 lines · 42 tokens per session scan A c92730d0c625
capsule-compact is a skill published in the GitHub repository wrg32786/aigent-os (18 stars, last pushed yesterday), licensed MIT. It adds 42 tokens to every session and 464 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.
Other skills, from other repositories
chief-of-staff
Skill "chief-of-staff" from aimerdoux/wavex-os, covering 🧭 chief of staff, 🧠 your identity & memory, 🎯 your core mission, 💭 your communication style and 🚨 critical rules you must follow.
hive.context-preservation
Proactively extract critical values from tool results into working notes before automatic context pruning destroys them.
hive.note-taking
Maintain a free-form scratchpad of decisions, extracted values, and open questions so context pruning doesn't lose anything you still need.
digital-brain
This skill should be used when the user asks to "write a post", "check my voice", "look up contact", "prepare for meeting", "weekly review", "track goals", or mentions personal brand, content creation, network management, or voice consistency.
daily-briefing
Proactive daily briefing that fires on a recurring schedule, pulls recent memory and workspace context, composes a structured summary (action items, progress, radar, next steps), and delivers it to all active channels. Enable with a time like "set up my daily briefing at 9am". Disable, reschedule, or check status at…
send-email
Compose and send a one-off email to a named recipient via Resend - written in the operator's voice, then sent in-run through the shared send caps with an operator audit copy.