compartmentalize

compartmentalize is a skill for Claude Code from MaxFreedomPollard/Compartment. It costs 54 tokens per session (645 once invoked), scanned A, original, Apache-2.0.

A memory-saving assistant that reviews a conversation and stores useful facts, decisions, observations, and open items in Compartment, an encrypted memory vault. It searches existing memories before adding or updating information.

In plain words
What is it for?
Use it to save project decisions, contacts, links, credentials locations, session outcomes, and unresolved work for future retrieval.
Why use it?
It helps preserve important context so it is not lost when a conversation is shortened or revisited later.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the compartment plugin — 2 skills, 1 MCP server shipped together

Good fit Use it to save project decisions, contacts, links, credentials locations, session outcomes, and unresolved work for future retrieval.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/maxfreedompollard/compartment/compartmentalize
Install

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.

Any agent
npx skills add MaxFreedomPollard/Compartment --skill compartmentalize
Clone the repo
git clone --depth 1 https://github.com/MaxFreedomPollard/Compartment

Made for: Claude Code.

Or install compartment, the plugin that ships this one along with the rest of its 2 skills, 1 MCP server.

Wrote 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.

agentmods badge for compartmentalize

README.md
[![agentmods](https://agentmods.dev/badge/skills/maxfreedompollard/compartment/compartmentalize/github.svg)](https://agentmods.dev/skills/maxfreedompollard/compartment/compartmentalize)
Your own site
<a href="https://agentmods.dev/skills/maxfreedompollard/compartment/compartmentalize"><img src="https://agentmods.dev/badge/skills/maxfreedompollard/compartment/compartmentalize/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for compartmentalize

Your own site · 80×15
<a href="https://agentmods.dev/skills/maxfreedompollard/compartment/compartmentalize"><img src="https://agentmods.dev/badge/skills/maxfreedompollard/compartment/compartmentalize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 645 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.00645
Opus 5.5 $0.00022 $0.00258
Sonnet 5.5 $0.00011 $0.00129
Haiku 4.5 $0.00005 $0.00064

Measured 28d ago against content hash 459c9d244c85, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 28d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/compartmentalize/SKILL.md · 59 lines

What it actually says

Save to Compartment before compacting.

Sweep the entire conversation, including any part already summarized, and store to Compartment what it holds that is worth keeping.

STORE anything worth referencing again in future work: names, addresses, contacts, account IDs, passwords, API keys and other credentials, lasting file locations and configuration, preferences, and every durable fact or decision reached. Not transient chatter, one-off trivia, things freely available on the internet, or the working details of a task in progress, such as run results, errors, log contents and temporary paths or settings.

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 every durable observation, decision, opinion and 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: everything the STORE rule above excludes, 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.

Changes

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.

  1. 28d ago Changed · +6 lines · +2 tokens per session 459c9d244c85
  2. 1mo ago First seen · 53 lines · 52 tokens per session scan A 0ddb1ec0911c

Subscribe to this mod's changes

compartmentalize is a skill published in the GitHub repository MaxFreedomPollard/Compartment (577 stars, last pushed 8d ago), licensed Apache-2.0. It adds 54 tokens to every session and 645 once invoked, about $0.0002 per session on Opus 5.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-08-30.

Related

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.

MastadoonPrime/sylex-memory · 0 tokens

knowledge-org

A guide to organising large bodies of knowledge so an AI system can navigate relationships, summaries, and layers instead of searching only flat text chunks. It covers tree indexes, knowledge graphs, file-like structures, incremental updates, and long-term memory layouts.

bojieli/ai-agent-book · 96 tokens

memory-system

A guide to giving an AI agent persistent, user-specific memory across conversations. It covers what to remember, how to store it, how to update or compress it, and when to use memory instead of a shared knowledge base.

bojieli/ai-agent-book · 95 tokens

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…

moorcheh-ai/memanto · 72 tokens

openlore

Query and publish to an OpenLore knowledge repository over SSH using ordinary shell commands. Use when a task needs project documentation, runbooks, shared team knowledge, or a place to publish findings.

aakarim/OpenLore · 42 tokens

Context Doctor

Investigate and repair an agent's context — memory, system prompt, and skills — using observed behavior as evidence. Use when the user asks to audit, clean up, or fix your memory or context, or runs /doctor. Do not load for routine memory reads or edits, or requests that merely mention memory.

letta-ai/letta-code · 66 tokens