/memory-compact
Run a dry run first:
$ npx -y skills add waittim/MemoryCustodian --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/memory-compact
Context preview
What this command does when you run it.
Run a dry run first:
Command definition
memory-compact.mdmemory-compact
Run a dry run first:
memory-custodian compact
The report lists exact duplicate top-level bullet units, exact tombstone matches, and candidates requiring Agent review. Each top-level bullet unit includes its continuation and nested lines; nested bullets are never cleanup candidates on their own. For each candidate, determine scope, type, confidence, and whether equivalent memory already exists. Then edit the appropriate Markdown directly or use `memory-custodian add`.
If the exact mechanical cleanup is appropriate, run:
memory-custodian compact --apply
This command does not classify or promote candidates. It only removes the exact duplicate complete units and tombstone matches shown in the preview; reviewed candidates remain in the inbox until handled explicitly. Run `memory-custodian check` after semantic updates.
For an over-budget active file, run a target dry run:
memory-custodian compact --target decisions.md
First shorten decisions over 120 tokens, merge superseded entries, move subsystem knowledge into matched areas, and retain active invariants in normal loading paths. Then apply only after reviewing the plan:
memory-custodian compact --target decisions.md --apply --archive-oldest
For semantic compaction, read `skills/memory-custodian/references/compaction-policy.md` and update memory files directly.
Read more
memory-compact
Run a dry run first:
memory-custodian compact
The report lists exact duplicate top-level bullet units, exact tombstone matches, and candidates requiring Agent review. Each top-level bullet unit includes its continuation and nested lines; nested bullets are never cleanup candidates on their own. For each candidate, determine scope, type, confidence, and whether equivalent memory already exists. Then edit the appropriate Markdown directly or use `memory-custodian add`.
If the exact mechanical cleanup is appropriate, run:
memory-custodian compact --apply
This command does not classify or promote candidates. It only removes the exact duplicate complete units and tombstone matches shown in the preview; reviewed candidates remain in the inbox until handled explicitly. Run `memory-custodian check` after semantic updates.
For an over-budget active file, run a target dry run:
memory-custodian compact --target decisions.md
First shorten decisions over 120 tokens, merge superseded entries, move subsystem knowledge into matched areas, and retain active invariants in normal loading paths. Then apply only after reviewing the plan:
memory-custodian compact --target decisions.md --apply --archive-oldest
For semantic compaction, read `skills/memory-custodian/references/compaction-policy.md` and update memory files directly.
Give your coding agents a project memory. MemoryCustodian helps agents remember what matters: decisions, constraints, rejected ideas, and project context — across sessions, agents, and teams.

