memory-lint

memory-lint is a skill for Claude Code, Codex from acn-ericlaw/agent-memory. It costs 89 tokens per session (2,816 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

Written for no agent in particular: nothing here depends on one.

Good fit Run it after reviewing memory, before committing memory changes, or in continuous integration or a pre-commit check.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/acn-ericlaw/agent-memory/memory-lint
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 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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memory-lint

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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,816 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00089 $0.02816
Opus 5.5 $0.00036 $0.01126
Sonnet 5.5 $0.00018 $0.00563
Haiku 4.5 $0.00009 $0.00282

Measured 1mo ago against content hash c3b74d9ae0c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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 · 143 lines

How it starts

The opening of the file, as written. The whole thing — 143 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 the live layer and the archive (a fact exists in exactly one place) — the live layer is continuity.md plus the one-thread-per-file memory/open-threads/ directory (v4.39.0), whose facts and checkbox pinning count exactly like continuity's;
    • [thread-file] — the thread-file contract: one thread block per file, filename thread-<id>.md matching the footer id (filename = the merge-free identity);
    • [duplicate-id] — an id must exist exactly once across the live layer; two live footers is the silent-fork shape of a same-id creation collision on parallel branches;
    • [duplicate-state-key] — a ## Project State scalar set twice (a union-style hand merge that kept both sides — absorbed from PR #27, credit: Roland Heusser);
    • 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 plus memory/open-threads/*.md (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 · 143 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. 1mo ago Changed · +8 lines c3b74d9ae0c0
  2. 1mo 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 1mo ago), licensed Apache-2.0. It adds 89 tokens to every session and 2,816 once invoked, about $0.0004 per session on Opus 5.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

knowledge-org

A guide to organising large bodies of knowledge so an AI system can navigate relationships, summaries, and layers instead of searching only flat text chunks. It covers tree indexes, knowledge graphs, file-like structures, incremental updates, and long-term memory layouts.

bojieli/ai-agent-book · 96 tokens

memory-system

A guide to giving an AI agent persistent, user-specific memory across conversations. It covers what to remember, how to store it, how to update or compress it, and when to use memory instead of a shared knowledge base.

bojieli/ai-agent-book · 95 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

openlore

Query and publish to an OpenLore knowledge repository over SSH using ordinary shell commands. Use when a task needs project documentation, runbooks, shared team knowledge, or a place to publish findings.

aakarim/OpenLore · 42 tokens

Context Doctor

Investigate and repair an agent's context — memory, system prompt, and skills — using observed behavior as evidence. Use when the user asks to audit, clean up, or fix your memory or context, or runs /doctor. Do not load for routine memory reads or edits, or requests that merely mention memory.

letta-ai/letta-code · 66 tokens

memory-import

Bulk-import an external knowledge base into Prismer memory via the three-layer import pipeline (07 §3.1). Use when the user asks to import/migrate documents, a knowledge base, or notes into workspace memory. Layer 1 lands raw documents (zero LLM, instantly searchable); Layer 2 is YOUR distillation work — you read the…

Prismer-AI/PrismerCloud · 111 tokens