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
- MrHashMe/efficiency-playbooktheir own version, first seen Nov 8, 2026
- KerberosClaw/kc_ai_skillstheir own version, first seen Oct 15, 2026
- GvHildebrand/claude-code-skillstheir own version, first seen Oct 1, 2026
- yangwhale/CloseCrabtheir own version, first seen Aug 18, 2026
- kiloloop/kiloloop-skillstheir own version, first seen Aug 15, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- KerberosClaw/kc_ai_skills★ 79same name
- yangwhale/CloseCrab★ 5same name
- GvHildebrand/claude-code-skills★ 0same name
- kiloloop/kiloloop-skills★ 0same name
- 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.
- memory-compactSkill
- memory-reindexSkill
- recallSkill
The file
Files
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
| Invariant | Purpose | Remedy |
name: == filename-stem | [[links]] resolve cleanly against stems | lint.py --fix |
Every [[link]] resolves | Prevents dead/dangling cross-references | lint.py --fix (auto) / manual |
| No slug titles in index | Index remains human-readable | memory-reindex |
| Index 1:1 with files | Prevents invisible orphan files or stale links | lint.py --fix orphans stage into CANDIDATES.md; memory-reindex shelves them |
description: present & non-empty | Orphan staging borrows it for the hook text | write one by hand |
| Index lines parse | Malformed - [..](..) — hook lines would hide as coverage noise | hand-edit or memory-reindex |
| Hook length ceiling | Prevents index bloat | memory-compact |
| Canary retention | Asserts load-bearing rules survive in index | Restore 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"
}
]
}
}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
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.

