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 agentmods add skills/maxfreedompollard/compartment/agent-skillnpx skills add MaxFreedomPollard/Compartment --skill agent-skillgit clone --depth 1 https://github.com/MaxFreedomPollard/CompartmentWrote 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/maxfreedompollard/compartment/agent-skill)<a href="https://agentmods.dev/skills/maxfreedompollard/compartment/agent-skill"><img src="https://agentmods.dev/badge/skills/maxfreedompollard/compartment/agent-skill.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 | $0.00052 | $0.00639 |
| Opus 5 | $0.00026 | $0.00319 |
| Sonnet 5 | $0.00010 | $0.00128 |
| Haiku 4.5 | $0.00005 | $0.00064 |
Grade A, and why
compartmentalize 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 4d 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.
This is a copy
92% identical to compartmentalize — 10 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
What it actually says
Save to Compartment before compacting.
Sweep the entire conversation, including any part already summarized, and store to Compartment everything potentially worth knowing again later that is not common public knowledge. This is encrypted storage, so when in doubt, store it.
For each item, memory_search first, then memory_store: update the existing
memory when one already covers it, create a new one when none does.
Always store, when present: people, contacts and addresses. Passwords, API keys, tokens, account IDs, and where each one lives. URLs, hostnames, repo and release locations.
Then properly associate and store any observation, decision, opinion and any thought that is not publicly available. Anything that would be expensive or impossible to work out again from scratch.
Also store the session itself - as several one-claim memories, never one narrative: one for what was asked, one for what it turned into, one for what changed by the end, one for what is still open. That the work happened and what it did is information in its own right, sometimes more useful than any single detail inside it, and each of those claims is recalled on its own.
Skip: common public knowledge, anything already stored unless it is an update with additional or changed information, and the Compartment vault passphrase itself.
Write each memory to stand alone: ONE claim of at most 200 characters by default - the vault enforces this and refuses lists, headings and paragraphs - with no pronouns pointing back at this conversation and no "as discussed above". Never leave out information that is necessary to understand the memory on its own. Several facts go through memory_store_many, one record each, in one call. Store preferences, stances and judgement calls with kind='opinion': opinions update instead of accumulate, and one resembling a live opinion comes back for an explicit supersedes=[old id] resend. Set namespace, tags and importance. When a fact was established before today, pass discovered=YYYY-MM-DD; the vault stamps every memory's dates itself, so never type dates into the text.
Do not stop early. Finish the sweep, then report how many were stored and how many updated.
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.
- 4d ago First seen · 57 lines · 52 tokens per session scan A ca093d481f57
compartmentalize is a skill published in the GitHub repository MaxFreedomPollard/Compartment (590 stars, last pushed today), licensed Apache-2.0. It adds 52 tokens to every session and 639 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to compartmentalize, differing in 10 lines, and is treated as a copy.
Other skills, from other repositories
openclaw-skill
Gives your OpenClaw agent persistent, encrypted memory that survives across sessions. Store thoughts, decisions, skills learned, and preferences. Recall them next session. Share knowledge with other agents via the Commons.
cognee-cli
Use when the user wants to drive cognee from the terminal with cognee-cli — remember/recall/forget/improve memory commands, managing datasets and config, or database migrations.
Context Doctor
Identify and repair degradation in system prompt, external memory, and skills preventing you from following instructions or remembering information as well as you should.
memanto-companion
Inspect and manage the cross-session engineering memory that Memanto maintains for your Claude Code skills. Use when the user asks what Memanto remembers, wants to see their engineering profile, manually recall context for a skill, or store a decision. The automatic lifecycle hooks handle capture/injection on their…
gitnexus-exploring
Navigate unfamiliar code using GitNexus knowledge graph.
memory-recall
Search and recall relevant memories from past sessions via memsearch. Use when the user's question could benefit from historical context, past decisions, debugging notes, previous conversations, or project knowledge -- especially questions like 'what did I decide about X', 'why did we do Y', or 'have I seen this…