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.
npx skills add KerberosClaw/kc_ai_skills --skill memory-lintgit clone --depth 1 https://github.com/KerberosClaw/kc_ai_skillsWrote 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.
[](https://agentmods.dev/skills/kerberosclaw/kc_ai_skills/memory-lint)<a href="https://agentmods.dev/skills/kerberosclaw/kc_ai_skills/memory-lint"><img src="https://agentmods.dev/badge/skills/kerberosclaw/kc_ai_skills/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.
<a href="https://agentmods.dev/skills/kerberosclaw/kc_ai_skills/memory-lint"><img src="https://agentmods.dev/badge/skills/kerberosclaw/kc_ai_skills/memory-lint.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00095 | $0.06144 |
| Opus 5 | $0.00048 | $0.03072 |
| Sonnet 5 | $0.00019 | $0.01229 |
| Haiku 4.5 | $0.00010 | $0.00614 |
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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 320 lines — stays where its author put it; the contents beside it link to each section on GitHub.
memory-lint — Memory 品質健檢
Phase 1 唯讀掃描 ──► 報告(預設只做這段,不動任何檔案)
│ user 逐條拍板要修哪些
Phase 2 執行修正 ──► commit(開工前先記回退點)
│ 改完全部提交 = 凍結
Phase 3 獨立複驗 ──► 過 → 收工 / 不過 → 回退到 Phase 2 前
🔴 收到 lint 觸發詞的預設動作是出報告。 user 必須明確點名要修哪幾條 (或明說「全部修掉」)才准進 Phase 2。Phase 1 期間不准順手合併、順手刪、順手歸檔。
跟 llm-wiki-lint 差異:本 skill 針對 memory 目錄(prefix-based 平鋪結構);
llm-wiki-lint 針對 Karpathy LLM Wiki repo(wiki/ + raw/ + SCHEMA.md 三層)。
Phase 1 — 唯讀掃描
Step 1: 找到 memory 目錄
依序嘗試,命中第一個就用:
| 順序 | 來源 |
|---|---|
| 1 | $ARGUMENTS 第一個位置參數 |
| 2 | 環境變數 $CLAUDE_MEMORY_DIR |
| 3 | settings.json 的 autoMemoryDirectory |
| 4 | ~/.claude/memory/ |
| 5 | 都找不到 → 停止,告訴 user「偵測不到 memory 目錄」,不要瞎猜 |
第 3 條要看當前設定目錄(多帳號並存時 $CLAUDE_CONFIG_DIR 會指到別處):
CFG="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
MEMORY_PATH=$(jq -r '.autoMemoryDirectory // empty' "$CFG/settings.json" | envsubst)
Step 2: 跑機械掃描
# <skill_dir> = 本 SKILL.md 所在的目錄;掃描標的由參數帶入,
# 所以在哪個工作目錄呼叫都不影響結果
python3 <skill_dir>/scripts/scan.py "$MEMORY_PATH"
只用標準函式庫、唯讀、輸出 JSON。目標目錄由參數帶入,所以在哪個工作目錄呼叫都一樣。
沒有 MEMORY.md 會回 {"fatal": ...} 並以 exit 1 結束。
腳本已經處理掉幾個會讓檢查靜默失效的坑,不要自己在對話裡改寫成 shell 一行流:
- 不用 shell glob(zsh 未匹配 glob 會在指令執行前中止,而且
2>/dev/null擋不住) - 不用固定路徑暫存檔(並行執行會互相覆蓋、失敗留髒資料)
- 不 import 第三方套件(唯讀階段不該動 user 的 Python 環境;離線環境也裝不了)
[[...]]掃描先剝掉 fenced 與行內 code,且檔名與 frontmattername兩種都算解析成功- 索引目標的
./前綴會正規化
輸出欄位:
| 欄位 | 意義 |
|---|---|
layout |
單層(只有 MEMORY.md)/兩層(MEMORY.md 只留路由、細目在 index_*.md) |
index_declared_missing |
MEMORY.md 指到但磁碟上沒有的子索引 |
index_orphaned |
磁碟上有、但沒人指向的孤立子索引 |
orphan / missing |
有檔沒被索引/索引指向不存在的檔 |
frontmatter |
缺 name/description(只認頂層)或 type(頂層或 metadata.type) |
wiki_broken / wiki_external |
[[...]] 解析不到的/指向子目錄或外部的 |
oversize |
超過 300 行的檔(行數語意同 wc -l) |
prefixes / no_prefix |
命名前綴分布與例外 |
🔴 兩層結構下若只拿 MEMORY.md 當索引來源,會把整庫誤判成 orphan。 腳本已處理,
但若你另外手寫檢查,這是最容易踩的一個。
What ships with it
1 file 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.
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.
- 10d ago First seen · 320 lines · 95 tokens per session scan A a079744c9fc8
memory-lint is a skill published in the GitHub repository KerberosClaw/kc_ai_skills (79 stars, last pushed 2d ago), licensed MIT. It adds 95 tokens to every session and 6,144 once invoked, about $0.0005 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-30.
Other skills, from other repositories
mem0-status
Diagnoses mem0 connectivity, API key validity, and memory read/write functionality. Use when memory operations fail, searches return empty, addmemory errors occur, or to verify the plugin is working correctly.
bugsweep
Systematic bug sweep with a codebase-scaled target value, doubling escalation, area tracking, and final verification. Use on /bugsweep or whenever the user requests a systematic bug pass.
build-your-users-mind
Verweist auf das öffentliche, anbieterneutrale Modul build-your-users-mind: ein datenschutzbewusstes Verfahren zum Aufbau eines empirischen Theory-of-Mind-Präferenzmodells eines autorisierten Nutzers aus dessen eigenen Interaktionsprotokollen. Verwenden, wenn eine zuständige Person ein Entscheidungsavatar-Profil…
nulcleaner
Findet und löscht Windows-reservierte NUL-Dateien, die durch die Nutzung von /dev/null in Git Bash entstehen. Headless oder mit GUI.
bugfix-protocol
Systematic 6-phase debugging protocol. Structured approach to bugs with quick checks, isolated testing, 20-minute rule, and bug report template.
bugfix-protocol
Protocolo sistemático de depuración en 6 fases. Enfoque estructurado ante errores con verificaciones rápidas, pruebas aisladas, regla de los 20 minutos y plantilla de informe de errores.