memory-audit

A read-only review of a project's stored memory files and their links. It checks whether those notes are valid, current, connected, and free of duplicates or abandoned files.

In plain words
What is it for?
Use it to find broken links, orphaned notes, duplicate memories, stale references, invalid metadata, outdated summaries, exposed secrets, and bloated memory files.
Why use it?
Project memory can gradually become inconsistent as files, paths, decisions, and references change. This audit shows what has drifted before anything is changed.

Command

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.

agentmods
npx agentmods add commands/ackeskin/contexture/memory-audit
Clone the repo
git clone --depth 1 https://github.com/AcKeskin/contexture
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 348 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00046 $0.00348
Opus 5 $0.00023 $0.00174
Sonnet 5 $0.00009 $0.00070
Haiku 4.5 $0.00005 $0.00035

Measured 2d ago against content hash 69034a89b5b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory-audit 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 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.

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.

commands/memory-audit.md · 22 lines

What it actually says

Run the memory-audit skill.

Forms:

  • /memory-audit — audit the current project's memory tree at ~/.claude/projects/<slug>/memory/.
  • /memory-audit --project <slug> — audit a specific project's memory tree (other than the current one).
  • /memory-audit --check <dimension> — run only one of the ten dimensions (faster iteration when the user knows what they're looking for).

The skill scans the memory tree and reports drift findings across ten dimensions: MEMORY.md index drift, frontmatter validity, broken relations: links, duplicate detection, stale references (paths / commit hashes / doc IDs that no longer resolve), orphan files, superseded memories still surfacing, session-recap schema, a pre-write secret retro-scan, and bloat (staleness + uncompressed bodies). Each concrete finding cites a file path and (where applicable) a line number.

Fixes flow through propose-confirm-commit per finding (apply / skip / edit / view-detail) — no silent writes. Read-only by default; user always makes the call.

Strong candidate for /schedule (weekly cadence) per the recurring-task offer pattern.

Does not auto-fire. Not a backup, not a memory editor, not a continuous monitor, not a similarity engine (text overlap on first paragraph, not embeddings).

See ~/.claude/skills/memory-audit/SKILL.md for the full procedure.

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 First seen · 22 lines · 46 tokens per session scan A 69034a89b5b7

Subscribe to this mod's changes

memory-audit is a command published in the GitHub repository AcKeskin/contexture (2 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 348 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-08-31.