Knowledge Health Checker audits a Markdown-based knowledge base as a living system, not a folder full of files.
It detects whether the knowledge garden is:
The goal is not only to find problems, but to produce a prioritized, safe, actionable health report.
Use this skill for:
Do not use it for semantic fact-checking. This skill checks structure, links, density, freshness, and maintainability, not whether every claim is true.
A healthy knowledge base has four properties:
A knowledge base can be large and still unhealthy. Size is not health.
Before scanning, identify:
text
Target path:
Formats: markdown / wiki links / relative links
External URL check: yes/no
Generate fix script: yes/no
Auto-apply fixes: no by default
Exclude directories:
Estimated file count:
Safe default:
text
scan only → report only → generate fix plan → user reviews → user applies
Never delete, rename, rewrite, or auto-apply fixes without explicit confirmation.
Index:
.md files[[note]] and [[note#heading]][text](path.md)Exclude by default:
text
.git/
node_modules/
__pycache__/
.obsidian/
.trash/
dist/
build/
Flag likely hollow notes when they match one or more:
Classify severity:
SeverityMeaningTypical actionP0Empty or pure placeholderdelete, archive, or fill immediatelyP1Too thin to be usefulexpand with definition, context, examplesP2Usable but weakimprove structure or add links
Check:
[[filename]][[filename#heading]][text](../path/file.md)For each broken link, report:
text
source file
link text
target
link type
probable fix if a similar file exists
Measure:
Suggested ranges:
SignalHealthy rangeWarningShort note300+ words or intentionally atomic<200 charactersLong notestill navigable with headings>3000 words without structureInternal linksat least 1-3 for durable noteszero links = possible orphanFreshnessdepends on domainstale if >90 days and marked active
Build a graph:
text
node = markdown file
edge = internal link
Report:
A perfect graph is not required. The goal is to identify the highest-value repair points.
Default scoring:
DimensionWeightGood stateHollow note rate25%few or no empty placeholdersBroken link rate30%no broken internal linksContent density25%most notes have useful substance and structureNetwork connectivity20%important notes are connected; few accidental orphans
Health score:
text
health = weighted score from 0 to 100
Use labels:
ScoreLabel90-100Excellent75-89Healthy60-74Needs maintenance40-59Fragile0-39Critical
Return a concise summary first. For large scans, provide a full report path.
Fix plans must be safe:
Never silently delete or rewrite knowledge files.
Use this format:
markdown
## Knowledge Health Summary
- Target:
- Files scanned:
- Health score:
- Label:
- Top risks:
## Findings
| Category | Count | Severity | Notes |
|---|---:|---|---|
| Hollow notes | | | |
| Broken links | | | |
| Orphan notes | | | |
| Overlong notes | | | |
| Stale active notes | | | |
## Highest-Impact Fixes
1. P0:
2. P1:
3. P2:
## Safe Fix Plan
- Auto-safe fixes:
- Needs human review:
- Do not auto-apply:
## Artifacts
- Report:
- Fix script:
- Raw JSON:
For small knowledge bases, include concrete file examples. For large ones, include top 10 examples per category and write full details to a report file.
Classify fixes by risk:
RiskExamplesPermissionLowgenerate report, list broken links, suggest linksno extra confirmationMediumcreate fix script, add missing backlinks in draft outputask before writing filesHighdelete notes, rename files, rewrite links globally, split filesexplicit confirmation required
Default behavior: report and propose, do not mutate.
Use these when available:
scripts/health_check.py — core scanner for hollow files, broken links, density, and graph stats.scripts/report_generator.py — HTML report generation.scripts/auto_fix.py — fix-plan or repair-script generation.Run scripts from the skill directory or pass absolute paths. If a script lacks CLI ergonomics, inspect it and adapt safely rather than guessing destructive behavior.
Basic scan:
bash
python3 scripts/health_check.py /path/to/knowledge-base
Generate a report from scan results if supported:
bash
python3 scripts/report_generator.py results.json --output health-report.html
Generate a fix plan, not auto-apply:
bash
python3 scripts/auto_fix.py results.json --dry-run
If the bundled script does not support these exact flags, read the script first and use its actual interface.
Use test-prompts.json for Darwin-style regression evaluation. Good test coverage should include:
Avoid:
A good knowledge health check must be:
If the output only says “you have broken links” without showing where, why it matters, and what to do next, it failed.