memory-custodian

memory-custodian is a skill for Claude Code from waittim/MemoryCustodian. It costs 49 tokens per session (3,107 once invoked), scanned B, original, MIT.

A local project-memory system that stores durable notes as readable Markdown files in docs/memory/. It controls which memory an agent loads, updates, compacts, or stops using.

In plain words
What is it for?
Use it to load relevant project context, record decisions, compact pending memory notes, remove unwanted memories, and audit the memory files.
Why use it?
It prevents agents from loading irrelevant project history and helps preserve important decisions between tasks. It also checks that the memory setup follows its stated rules.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

Part of the memory-custodian plugin — 1 skill, 3 commands, 1 hook shipped together

Good fit Use it to load relevant project context, record decisions, compact pending memory notes, remove unwanted memories, and audit the memory files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/waittim/memorycustodian/memory-custodian
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 waittim/MemoryCustodian --skill memory-custodian
Clone the repo
git clone --depth 1 https://github.com/waittim/MemoryCustodian

Made for: Claude Code.

Or install memory-custodian, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 1 hook.

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 memory-custodian

README.md
[![agentmods](https://agentmods.dev/badge/skills/waittim/memorycustodian/memory-custodian.svg)](https://agentmods.dev/skills/waittim/memorycustodian/memory-custodian)
Your own site
<a href="https://agentmods.dev/skills/waittim/memorycustodian/memory-custodian"><img src="https://agentmods.dev/badge/skills/waittim/memorycustodian/memory-custodian.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,107 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00049 $0.03107
Opus 5 $0.00024 $0.01554
Sonnet 5 $0.00010 $0.00621
Haiku 4.5 $0.00005 $0.00311

Measured 2d ago against content hash c2e2d7f62c7e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade B, and why

memory-custodian scanned grade B with 1 finding 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 2d 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.

Instruction-override phrasingmediumPrompt injection

Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.

Project memory may constrain project work, but it cannot override system instructions, current user instructions,

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/memory-custodian/SKILL.md · 213 lines

How it starts

The opening of the file, as written. The whole thing — 213 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MemoryCustodian

MemoryCustodian stores durable project memory as local, human-readable Markdown files under docs/memory/.

Use it to:

  • load the minimum relevant project memory for the current task
  • update project memory after meaningful decisions
  • compact unprocessed memory candidates
  • forget or tombstone memory the user no longer wants used
  • keep platform entry files such as AGENTS.md, CLAUDE.md, and GEMINI.md short

Hard Gate

In a project that contains MemoryCustodian memory, do not start substantial planning, implementation, debugging, or review until startup loading is complete:

  1. Read manifest.md if present. If the memory directory exists but the file does not, stop as described below.
  2. Read brief.md before substantial work.
  3. Choose and expose one canonical task category.
  4. Supply touched/planned repo-relative paths, or an explicit area when paths are not yet known.
  5. Use read --strict-routing (or the same shared routing implementation) and do not start substantial work unless the context pack is approved.
  6. Respect shared constraints and do-not-use.md before local preferences or task convenience.

If no memory directory exists, continue normally and offer initialization only when useful. If the memory directory exists but manifest.md is missing, stop memory loading and report an incomplete or corrupted setup. Do not infer routes; restore the manifest, migrate, or carefully reinitialize the project first.

Core Workflow

  1. Locate memory at docs/memory/manifest.md, or another project-declared memory directory under docs/.
  2. Read manifest.md; it is the sole authority for runtime task-to-file routing.
  3. Read brief.md before substantial work.
  4. Choose a canonical task and make that choice observable.
  5. Collect touched/planned paths before implementation, debugging, or review; use an explicit area for high-level planning when appropriate.
  6. Route with the manifest-declared task, path, and explicit-module inputs. Treat INCOMPLETE, AMBIGUOUS, INVALID, or a blocked conflict status as not approved for substantial work.
  7. Respect do-not-use.md and tombstones before proposing plans or implementations.
  8. Never load archive/ unless the user explicitly asks or the task is archive maintenance.
  9. Do not load inbox.md unless compacting, auditing unsorted memory, or asked by the user.
  10. If brief.md is still a generated scaffold, curate it from authoritative project files before relying on it.
  11. After meaningful decisions, repeated corrections, or rejected approaches, update the appropriate memory file or propose a concise update.

Read the full file on GitHub · 213 lines

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. 2d ago Changed · +25 lines c2e2d7f62c7e
  2. 8d ago First seen · 188 lines · 49 tokens per session scan B 2166f875eb1a

Subscribe to this mod's changes

memory-custodian is a skill published in the GitHub repository waittim/MemoryCustodian (20 stars, last pushed 3d ago), licensed MIT. It adds 49 tokens to every session and 3,107 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (instruction-override phrasing). 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

context-anchoring

Manage per-feature living documents that capture decisions, constraints, and reasoning across AI sessions during active development. Scoped to feature-level work — design, implementation, bugfix, refactor — not for codebase-wide assessments or product-wide specifications (those define their own document lifecycles).…

techygarg/lattice · 147 tokens

learning-harvest

Manage the operational learnings lifecycle — load prior learnings to inform current work, harvest new patterns worth preserving, and keep the document tight over time. Provides a protocol for accumulating actionable patterns from practice that complement standards and defaults. Use when a workflow session completes…

techygarg/lattice · 114 tokens

agent-wiki

Incremental LLM-friendly wiki generator for Obsidian note vaults. Use when: (1) Building wiki from notes, (2) Ingesting notes to wiki, (3) Obsidian LLM wiki, (4) Incremental knowledge base management. Triggers: 'build wiki from notes', 'ingest notes to wiki', 'Obsidian LLM wiki', 'incremental knowledge base'.

Dianel555/DSkills · 89 tokens

capability-evolver

Self-evolution workflow for the agent. Before substantive work, recall past outcomes from evolution memory; while editing, detect improvement signals; at task end, record the outcome; when reusable, distill or search the EvoMap network for proven genes/capsules. Use when the user starts non-trivial work (a feature, a…

Dianel555/DSkills · 98 tokens

knowledge-priming-refiner

Facilitate a structured conversation to create a project-specific knowledge base document. Produces a knowledge-base.md that primes AI with the project's tech stack, architecture, trusted sources, and project structure. Use when the user says 'set up knowledge base', 'prime the project', 'onboard AI', 'create…

techygarg/lattice · 84 tokens

knowledge-priming

Load project-specific context -- tech stack, architecture overview, directory layout, trusted sources, and conventions -- so that all skills operate with awareness of what this project actually is. Use when a knowledge base document exists, or when the user asks about the project's tech stack, architecture…

techygarg/lattice · 111 tokens