memory-lint

memory-lint is a skill for Claude Code, Codex from acn-ericlaw/agent-memory. It costs 89 tokens per session (2,625 once invoked), scanned A, original, Apache-2.0.

A fixed checker for the shared memory files used by coding agents. It checks whether facts, references, archive status, and metadata remain consistent and whether secrets or personal information have leaked.

In plain words
What is it for?
Run it after reviewing memory, before committing memory changes, or in continuous integration or a pre-commit check.
Why use it?
Memory files can be damaged by incorrect counts, stale labels, duplicate entries, or unsafe content. The checker finds these problems before they spread or are committed.

Skill for Claude CodeCodex

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/acn-ericlaw/agent-memory/memory-lint.svg)](https://agentmods.dev/skills/acn-ericlaw/agent-memory/memory-lint)
Your own site
<a href="https://agentmods.dev/skills/acn-ericlaw/agent-memory/memory-lint"><img src="https://agentmods.dev/badge/skills/acn-ericlaw/agent-memory/memory-lint.svg" alt="Measured on agentmods" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,625 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.00089 $0.02625
Opus 5 $0.00044 $0.01313
Sonnet 5 $0.00018 $0.00525
Haiku 4.5 $0.00009 $0.00263

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

Security

Grade A, and why

memory-lint 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 3d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/memory-lint.mjs, scripts/memory-lint.py, scripts/test_memory_lint.mjs, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

agent-skills/memory-lint/SKILL.md · 135 lines

How it starts

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

memory-lint

⚠️ Tool-managed skill provided by agent-memory (provenance: agent-memory-builtin). Don't edit it in place — it is overwritten on upgrade. To change behavior: fork it under a new skill name, or upstream a genuine fix to the agent-memory project (file an issue in its repo, or bring it to the tool maintainer) for back-port + validation. See SKILLS.md → "Tool-provided (system) skills".

A deterministic safety net for the evolving-memory layer. Decay is integer-counting by design, but an agent counting session files by hand can miscompute sessions_since_last_used and archive a fact that's still in use — this actually happened (a fresh-agent review over-archived recent facts, and a hand re-check still missed one). This skill moves that counting from agent judgment to a script, so the riskiest operation is verified against observable evidence.

When to use

  • After running the memory review ritual (REVIEW.md) — verify its archival decisions.
  • Before committing memory/ changes.
  • In CI or a pre-commit hook (the reinforcement memory/PROTOCOL.md describes) — a non-zero exit fails the gate.

What to do

  1. Run the bundled checker from the repo root. Two interchangeable runtimes — use whichever the machine has (stdlib/built-ins only, no install). Same flags, same output, same exit codes:
    python3 agent-skills/memory-lint/scripts/memory-lint.py    # Python 3 (>= 3.8)
    node    agent-skills/memory-lint/scripts/memory-lint.mjs    # Node (>= 18)
    
    Flags: --strict (also fail on warnings), --root PATH (point at a specific repo), and --scan-files FILE... (v4.34.0 — a standalone credential-class [secret-material] scan of arbitrary config files: token shapes, credential-key assignments, Authorization headers, private keys — no PII classes, since config files legitimately carry contact emails and paths; exit 1 on findings, values never echoed. This mode powers the .githooks/pre-commit secret guard and the CI floor's changed-config scan; the committed .agent/secret-scan-ignore handles JSON/properties exemptions at the caller level). Run the test suite (the cross-runtime contract — both implementations pass the same fixtures):
    python3 -m unittest agent-skills/memory-lint/scripts/test_memory_lint.py
    node --test          agent-skills/memory-lint/scripts/test_memory_lint.mjs
    
  2. It checks, deterministically:
    • no id lives in both continuity.md and the archive (a fact exists in exactly one place);
    • no archived-as-faded fact was referenced within archive_window sessions — the decay-miscount guard: if it was, the count was wrong, so reactivate it;
    • advisory — continuity facts overdue for archival (sslu > archive_window), excluding core, superseded, and pinned - [ ] open threads (which never decay);
    • supersession links resolve (supersedes / superseded-by point at real footers);
    • .agent/version.md, if present, carries a parseable - **version:** X.Y.Z line — an empty/malformed manifest breaks Mode B upgrade detection (this was a real bug: a truncating stamp one-liner emptied it). A missing file is the valid pre-versioning baseline and is not flagged.
    • no leftover merge-conflict markers (<<<<<<< / >>>>>>> / diff3 |||||||) in the live top-level memory/*.md files (continuity.md, instructions.md, vision.md, decay-policy.md, smoke-test.md) — an unresolved conflict there silently corrupts shared memory the agent reads as truth. sessions/ and archive/ are excluded (immutable/append narrative that legitimately quotes markers — e.g. a session log pasting a diff). A bare ======= line is not flagged (it's a valid Markdown setext heading underline).
    • advisory[review-overdue]: sessions_since_last_review ≥ review_every (read from the last_review Project-State stamp), so a lapsed review ritual surfaces on every lint run + CI, not just when someone remembers to check;
    • advisory[continuity-bloat]: more than continuity_max_facts decaying facts/threads (the primary lean signal — a count, immune to verbosity & session velocity), or more than continuity_max_lines lines (a coarse backstop). Both say "a review is due to lean it down."
    • advisory[closed-thread-bloat] (v4.38.0): more than closed_narrative_max_lines (default 150) non-empty lines inside completed - [x] thread blocks — close records should wait out archive_window as 3–6-line stubs, not ship narratives (the full story lives in each thread's origin session log; a review condenses them per REVIEW.md step 5). Measured field cost: 64% of a hot repo's continuity was closed-thread narrative.
    • advisory[stale-metadata]: a fact's stored tier disagrees with the tier recomputed from the reference log (review steps 2–3 — apply events / re-tier — were skipped), excluding core, superseded, never-referenced facts, and pinned - [ ] open threads (their tier label isn't enforced — pinned-ness protects them; v4.26.1). Clear it with the refresh-metadata skill (or a review).
    • advisory[secret-material]: credential or PII shapes in any committed memory surface — memory/*.md, memory/sessions/, and memory/archive/ (where pasted output lives): known token formats (AWS / GitHub / GitLab / Slack / Google keys, private-key blocks, JWTs), credential-key assignments with literal values (including quoted JSON/YAML keys) and Authorization headers (e.g. rendered JAAS / clientSecret / bearer lines — anchored template placeholders and (REDACTED) are recognized as safe), emails (public noreply / git@ forms excluded), SSN and payment-card shapes (Luhn-verified), and absolute home paths (write ~). The report never echoes the matched value (that would amplify the leak into terminals and CI logs). Redact the hit to (REDACTED); if it was a live credential, rotate it — git history still holds the original. Waive a deliberately-quoted example (e.g. a log documenting a cleanup) by tagging that line lint:allow-secret-material. (Field incident, reported 2026-08-13: a client repo's DLP scanner caught a live OAuth client secret pasted into a committed session log.) Known-safe documentation examples still flag by design — e.g. AWS's canonical doc pair (AKIA…EXAMPLE and its secret partner): the guard keeps one simple contract (anything credential-shaped gets redacted or visibly waived) rather than an invisible built-in whitelist; quote such an example deliberately with the same lint:allow-secret-material tag (v4.34.2). The one built-in exemption is the tool's own opt-down knob — the guard's blocking message prints AGENT_MEMORY_SECRET_GUARD=advisory, so documenting that guidance is not a finding (env-var and git-config spellings, AGENT_MEMORY_SECRET_GUARD / agent-memory.secretguard; only the documented settings advisory/enforcing — any other value under those keys still flags, v4.34.2).
  3. ERROR (exit 1) → fix per DECAY.md / REVIEW.md: reactivate an over-archived fact (move it back into continuity.md), de-duplicate, or repair a link. WARN is advisory — the next review may act on it.

Read the full file on GitHub · 135 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 135 lines · 89 tokens per session scan A fc16137b685f

Subscribe to this mod's changes

memory-lint is a skill published in the GitHub repository acn-ericlaw/agent-memory (5 stars, last pushed 9d ago), licensed Apache-2.0. It adds 89 tokens to every session and 2,625 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

Context Doctor

Identify and repair degradation in system prompt, external memory, and skills preventing you from following instructions or remembering information as well as you should.

letta-ai/letta-code · 30 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

memory-recall

Search and recall relevant memories from past sessions via memsearch. Use when the user's question could benefit from historical context, past decisions, debugging notes, previous conversations, or project knowledge -- especially questions like 'what did I decide about X', 'why did we do Y', or 'have I seen this…

zilliztech/memsearch · 149 tokens

ov-experience-memory

Retrieve and apply OpenViking Experience memories through the Agent runtime's generic OpenViking search and read tools. Use before or during executable, multi-step, or tool-based work such as coding, file or data changes, configuration, deployment, workflow execution, and failure recovery when prior operational…

volcengine/OpenViking · 78 tokens

mnemon

Persistent memory CLI for LLM agents. Store facts, recall past knowledge, link related memories, manage lifecycle.

mnemon-dev/mnemon · 25 tokens

mnemon

Persistent memory for MiniMax Code. Recall durable context, store important facts and decisions, and link related memories with the mnemon CLI.

mnemon-dev/mnemon · 30 tokens