memory-audit

memory-audit is a skill for Claude Code, Codex from AcKeskin/contexture. It costs 68 tokens per session (4,030 once invoked), scanned A, original, MIT.

A read-only checker for a project’s Claude memory files, including their index, links, and stored notes.

In plain words
What is it for?
It helps inspect memory health across ten checks and propose fixes for confirmation before anything is changed.
Why use it?
It finds problems such as duplicate or orphaned notes, stale references, missing structure, and uncompressed content.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths.

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 skills/ackeskin/contexture/memory-audit
Any agent
npx skills add AcKeskin/contexture --skill memory-audit
Clone the repo
git clone --depth 1 https://github.com/AcKeskin/contexture

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/ackeskin/contexture/memory-audit.svg)](https://agentmods.dev/skills/ackeskin/contexture/memory-audit)
Your own site
<a href="https://agentmods.dev/skills/ackeskin/contexture/memory-audit"><img src="https://agentmods.dev/badge/skills/ackeskin/contexture/memory-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,030 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.1 $0.00068 $0.04030
Opus 5 $0.00034 $0.02015
Sonnet 5 $0.00014 $0.00806
Haiku 4.5 $0.00007 $0.00403

Measured 2d ago against content hash 6dc1e1b05a15, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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.

skills/memory-audit/SKILL.md · 239 lines

How it starts

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

memory-audit

Sibling of review — same flow, but scoped to the memory tree (~/.claude/projects/<slug>/memory/) instead of code.

When to run

  • User types /memory-audit (explicit trigger).
  • User says "check my memory for drift," "audit my notes," "are there stale references."
  • Scheduled run via /schedule — weekly cadence is a natural fit (see "Schedule offer" below).
  • Do not auto-fire on session start, post-capture, or any hook. Mode A only.

Inputs

  1. Audit scope.
    • Default: ~/.claude/projects/<current-project-slug>/memory/. Resolve the slug the same way discover does (Glob ~/.claude/projects/*/memory/MEMORY.md, pick by project-root match).
    • --project <slug> → audit a specific other project's memory tree. Useful for cross-project hygiene.
    • --check <dimension> → run only one dimension (skip the others). Dimensions named below.
  2. No content arguments — audit consumes the existing memory tree, not new content.

Procedure

1. Inventory the tree

Build the working set:

  • Glob <memory-root>/**/*.md — every memory file plus session-recaps.
  • Read <memory-root>/MEMORY.md — the index.
  • For each memory file: parse frontmatter (name, description, type, kind, scope, relevance, relations, superseded_by); capture the body's first paragraph for duplicate detection. Batch the Reads — independent files in one message, not one call per file.
  • For session-recap files (under sessions/<date>-<slug>.md): parse filename and frontmatter only; bodies are not scanned for content checks.

Build maps:

  • path → frontmatter for every file.
  • MEMORY.md line → target path for every index entry.
  • path → list of incoming relations (computed by reverse-walking every file's relations: field — used for orphan detection in dimension 6).

If the inventory pass fails on any file (parse error, malformed frontmatter), surface that as the first finding under dimension 2 and continue with what parsed. Don't abort the whole audit because one file is broken.

Read the full file on GitHub · 239 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 First seen · 239 lines · 68 tokens per session scan A 6dc1e1b05a15

Subscribe to this mod's changes

memory-audit is a skill published in the GitHub repository AcKeskin/contexture (2 stars, last pushed 1mo ago), licensed MIT. It adds 68 tokens to every session and 4,030 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

log-session

Append a structured entry to the project's session log (docs/LOGS.md): what was done this session, files touched, decisions taken, and the next step — so the next session (or another person) can pick up the thread without re-reading git history. Run it before /clear, before closing Claude Code, or at any natural…

gtrabanco/agentic-workflow · 183 tokens

context-scaffold

Analyzes an existing project and generates context files (AGENTS.md, context directory, cascading structure) pre-populated with discovered information. Run once to bootstrap, then customize.

fending/context-engineering · 39 tokens

AgentDB Memory Patterns

Implement persistent memory patterns for AI agents using AgentDB. Includes session memory, long-term storage, pattern learning, and context management. Use when building stateful agents, chat systems, or intelligent assistants.

spencermarx/open-code-review · 45 tokens

V3 Memory Unification

Unify 6+ memory systems into AgentDB with HNSW indexing for 150x-12,500x search improvements. Implements ADR-006 (Unified Memory Service) and ADR-009 (Hybrid Memory Backend).

spencermarx/open-code-review · 51 tokens

context-upgrade

Guides transition from your current context level to the next one -- minimal to full, full to cascading, or adding skills and hooks layers. Preserves existing content.

fending/context-engineering · 37 tokens

ReasoningBank Intelligence

Implement adaptive learning with ReasoningBank for pattern recognition, strategy optimization, and continuous improvement. Use when building self-learning agents, optimizing workflows, or implementing meta-cognitive systems.

spencermarx/open-code-review · 40 tokens