Borrowing it
Nothing to install: this file belongs to gatelynch/llm-knowledge-base. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/gatelynch/llm-knowledge-base/main/.claude/commands/health-check.mdgit clone --depth 1 https://github.com/gatelynch/llm-knowledge-baseWrote 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/commands/gatelynch/llm-knowledge-base/health-check)<a href="https://agentmods.dev/commands/gatelynch/llm-knowledge-base/health-check"><img src="https://agentmods.dev/badge/commands/gatelynch/llm-knowledge-base/health-check.svg" alt="Measured on agentmods" height="20"></a>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.00021 | $0.01242 |
| Opus 5 | $0.00010 | $0.00621 |
| Sonnet 5 | $0.00004 | $0.00248 |
| Haiku 4.5 | $0.00002 | $0.00124 |
Grade A, and why
health-check 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 8d 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.
What it actually says
知識庫健康檢查
定期掃描 wiki/ 的品質問題——不一致、缺口、孤立節點——並產出一份可執行的修復報告。
流程
1. 掃描所有 wiki/ 檔案
- 讀取 wiki/concepts/ 中所有概念條目
- 讀取 wiki/summaries/ 中所有摘要
- 讀取 wiki/indexes/All-Sources.md 與 All-Concepts.md
2. 一致性檢查
逐一檢查以下項目:
術語衝突
- 同一個術語在不同概念條目或摘要中是否有互相矛盾的定義?
- 例如:「RAG」在某個條目定義為「檢索增強生成」,在另一個卻被描述為「向量資料庫搜尋」
雙向關聯連結
- 如果概念 A 的
related欄位列了 B,確認 B 是否也列了 A - 列出所有單向連結
命名一致性
- 標籤與概念名稱在各檔案中是否一致?
- 常見問題:拼寫變體、大小寫不統一、同義詞交替使用
Frontmatter 格式
- 所有來源是否都用 wikilink 格式
"[[xxx]]"? - 所有摘要是否都有
origin欄位? - 所有概念條目是否都有
updated日期?
3. 完整性檢查
空白概念段落
- 檢查每個概念是否有以下段落為空或只有佔位文字:
- 我的實踐
- 外部觀點
- 張力與缺口
- 例子
- 來源(我的 / 外部)
潛在新概念
- 掃描所有摘要的「術語」段落
- 找出在 2 個以上摘要中出現、但還沒有獨立概念條目的術語
- 列出候選概念,附出現次數與來源
索引同步
- 比對 All-Sources.md 中列出的來源 vs. wiki/summaries/ 中的實際檔案
- 找出幽靈條目(索引中有,但檔案不存在)
- 找出未索引的檔案(檔案存在,但不在索引中)
未編譯來源
- 計算 raw/ 和 artifacts/ 中沒有出現在 All-Sources.md 的 .md 檔案數量
- 依子資料夾分類列出
4. 連結性檢查
孤立摘要
- 哪些 wiki/summaries/ 的檔案沒有被任何 wiki/concepts/ 條目的 sources 引用?
- 這些摘要可能有值得提取的概念
單一來源概念
- 哪些 wiki/concepts/ 條目只有 1 個來源?
- 單一來源的概念比較脆弱——建議找更多佐證來源
缺失連結建議
- 根據概念條目之間的內容相似性,建議應該存在但目前沒有的
related連結 - 根據摘要之間的標籤共現,建議可能相關的概念
5. 生成報告
輸出到 brainstorming/health/YYYYMMDD 健康檢查.md
---
date: YYYY-MM-DD
scope: wiki/
stats:
concepts: N
summaries: N
uncompiled: N
---
報告結構:
# 知識庫健康檢查 — YYYY-MM-DD
## 概覽
(概念數、摘要數、未編譯數、與上次相比的變化)
## 一致性問題
(每個問題附具體檔名與建議修法)
## 完整性缺口
(空白段落、候選新概念、索引同步問題)
## 連結性建議
(孤立摘要、單一來源概念、建議新增的連結)
## 建議行動(依優先序)
1. 🔴 必須修:一致性問題(會造成混淆)
2. 🟡 應該修:完整性缺口(值得填補,但不緊急)
3. 🟢 加分項:連結性改善(豐富知識網絡)
6. 回報結果
告訴使用者:
- 總問題數(依三個維度分類)
- 優先處理的前 3 件事
- 報告檔案路徑
檢查原則
- 唯讀:健康檢查只產出報告,不直接修改 wiki/ 的檔案
- 可執行的具體內容:每個問題都必須附上建議修法,不能只給模糊建議
- 與上次比較:如果 brainstorming/health/ 中有之前的報告,比較變化(新增 / 已解決的問題)
- 不重複回報:同一個問題不應出現在多個段落中
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.
- 8d ago First seen · 141 lines · 21 tokens per session scan A eb6f7578a706
health-check is a command published in the GitHub repository gatelynch/llm-knowledge-base (329 stars, last pushed 5mo ago), licensed MIT. It adds 21 tokens to every session and 1,242 once invoked, about $0.0001 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 commands, from other repositories
minutes-ideas
Surface recent voice memos and ideas captured from any device. Use when the user asks "what ideas did I have?", "what were my recent memos?", "what did I record while walking?", or wants to recall a captured thought.
learn
Force claude-smart to extract learnings from this session now.
memory-store
Store an insight, decision, or pattern to memory.
cc-memory
Configure persistent memory that survives across sessions using a layered approach: split rule files for always-loaded context, auto-memory for organic learning, and optional MCP-backed long-term memory for large codebases.
analyze-context
USE WHEN you want to analyze project context before starting work on a task. Calls context + recall, then synthesizes goals, decisions, gotchas, and relevant memories into a pre-task brief.
lians-recall
Recall current (non-stale) facts from Lians memory, optionally as-of a past date.