agentleFS
GlassOnTinGlassOnTin/claude-memory-skills/skills/memory-lint/SKILL.md

memory-lint

Skill1 starsChanged 30 days agoMITView on GitHub

Audit the memory store against its invariants and report violations with the remedy for each — name equals filename-stem, every [[link]] resolves, no slug titles in the index, 1:1 file coverage, canary preservation, and hook size limits. Supports --fix for safe automated repairs and integrates with Antigravity lifecycle hooks.

5 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions5 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 5

    1. KerberosClaw/kc_ai_skills★ 79same name
    2. yangwhale/CloseCrab★ 5same name
    3. GvHildebrand/claude-code-skills★ 0same name
    4. kiloloop/kiloloop-skills★ 0same name
    5. MrHashMe/efficiency-playbook★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

Files
SKILL.md

memory-lint

The mechanical doctor for the memory store. It asserts all store invariants so drift is detected and repaired deterministically rather than silently rotting.

Running the Linter

python3 ~/.agents/skills/memory-lint/lint.py [<memory_dir>] [--fix|--brief|--print-dir|--canary-check]

(~/.agents/skills/, ~/.gemini/config/skills/, and ~/.claude/skills/ all symlink to the same lint.py. If <memory_dir> is omitted, lint.py automatically resolves .agents/memory/, ~/.gemini/config/projects/<slug>/memory/, or ~/.claude/projects/<slug>/memory/, walking up parent directories to $HOME.)

Invariants Enforced

InvariantPurposeRemedy
name: == filename-stem[[links]] resolve cleanly against stemslint.py --fix
Every [[link]] resolvesPrevents dead/dangling cross-referenceslint.py --fix (auto) / manual
No slug titles in indexIndex remains human-readablememory-reindex
Index 1:1 with filesPrevents invisible orphan files or stale linkslint.py --fix orphans stage into CANDIDATES.md; memory-reindex shelves them
description: present & non-emptyOrphan staging borrows it for the hook textwrite one by hand
Index lines parseMalformed - [..](..) — hook lines would hide as coverage noisehand-edit or memory-reindex
Hook length ceilingPrevents index bloatmemory-compact
Canary retentionAsserts load-bearing rules survive in indexRestore from backup / fix hook

--fix never auto-promotes staged orphans into MEMORY.md — a file indexed only in CANDIDATES.md is reported as staged (not a violation) and stays pending until a memory-reindex pass shelves it. Unparseable index lines and missing descriptions are flagged, never auto-rewritten (no data-losing repairs).

Antigravity Lifecycle Hook Integration

Installed by ./install.sh into ~/.gemini/config/hooks.json (or .agents/hooks.json):

{
  "memory-guardian": {
    "PreInvocation": [
      {
        "type": "command",
        "command": "python3 ~/.agents/skills/memory-lint/lint.py --hook-pre-invocation"
      }
    ],
    "PostToolUse": [
      {
        "matcher": "view_file",
        "hooks": [
          {
            "type": "command",
            "command": "python3 ~/.agents/skills/memory-lint/lint.py --hook-post-tool"
          }
        ]
      }
    ],
    "Stop": [
      {
        "type": "command",
        "command": "python3 ~/.agents/skills/memory-lint/lint.py --hook-stop"
      }
    ]
  }
}

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.