$npx -y skills add kv0906/pm-kit --skill healthRun vault health check — broken links, orphans, missing sections, statistics. Generates report at 01-index/_graph-health.md. Use for "/health".
| 1 | # /health — Vault Health Check |
| 2 | |
| 3 | Generate comprehensive health report for the vault. |
| 4 | |
| 5 | ## Context |
| 6 | |
| 7 | Config: @_core/config.yaml |
| 8 | |
| 9 | ## Session Task Progress |
| 10 | |
| 11 | ``` |
| 12 | TaskCreate: "Scan vault files" |
| 13 | activeForm: "Scanning vault files..." |
| 14 | |
| 15 | TaskCreate: "Check links and orphans" |
| 16 | activeForm: "Validating links..." |
| 17 | |
| 18 | TaskCreate: "Generate health report" |
| 19 | activeForm: "Generating health report..." |
| 20 | ``` |
| 21 | |
| 22 | ## Processing Steps |
| 23 | |
| 24 | 1. **Scan Vault** |
| 25 | - Glob all `.md` files |
| 26 | - Exclude: `_core/`, `_templates/`, `_archive/` |
| 27 | |
| 28 | 2. **Check Broken Links** |
| 29 | - Extract all `[[wikilinks]]` from each file |
| 30 | - Verify each target exists |
| 31 | - Report: source → broken target |
| 32 | |
| 33 | 3. **Find Orphan Notes** |
| 34 | - Notes with no inbound links |
| 35 | - Exclude: index files, standalone: true |
| 36 | |
| 37 | 4. **Check Missing Sections** |
| 38 | - Typed notes (doc, decision, blocker, meeting) should have `## Links` |
| 39 | - Report missing required sections |
| 40 | |
| 41 | 5. **Calculate Statistics** |
| 42 | - Notes by type |
| 43 | - Notes by project |
| 44 | - Link density (links per note) |
| 45 | |
| 46 | 6. **Check Synthesis Freshness** |
| 47 | - For each `01-index/{project}.md`, check if `## Synthesis` section exists |
| 48 | - If synthesis is missing or says "No synthesis yet", flag as stale |
| 49 | - Check vault log (`01-index/_vault-log.md`) for last `index-regen` entry per project |
| 50 | - If no regen in 7+ days, flag as stale |
| 51 | |
| 52 | 7. **Check Update Status** |
| 53 | - Read `VERSION` file for local version |
| 54 | - Query GitHub API for latest release: `curl -sS "https://api.github.com/repos/{repo}/releases/latest"` (non-fatal on failure) |
| 55 | - Compare: "Up to date" | "Update available: vX → vY" | "Could not check" |
| 56 | |
| 57 | 8. **Append to Vault Log** |
| 58 | - Append `health` entry to `01-index/_vault-log.md` (see `.claude/rules/vault-log.md`) |
| 59 | |
| 60 | 9. **Generate Report** |
| 61 | - Write to `01-index/_graph-health.md` |
| 62 | |
| 63 | ## Output Format |
| 64 | |
| 65 | ```markdown |
| 66 | # Graph Health Report |
| 67 | |
| 68 | > Generated: {datetime} |
| 69 | |
| 70 | ## Broken Links |
| 71 | | Source | Broken Target | |
| 72 | |--------|---------------| |
| 73 | | {path} | [[{target}]] | |
| 74 | |
| 75 | ## Orphan Notes |
| 76 | - {path} — no inbound links |
| 77 | |
| 78 | ## Missing ## Links Sections |
| 79 | - {path} — type: {type} |
| 80 | |
| 81 | ## Statistics |
| 82 | |
| 83 | ### By Type |
| 84 | | Type | Count | |
| 85 | |------|-------| |
| 86 | | daily | {n} | |
| 87 | | doc | {n} | |
| 88 | |
| 89 | ### By Project |
| 90 | | Project | Count | |
| 91 | |---------|-------| |
| 92 | | {proj} | {n} | |
| 93 | |
| 94 | ### Link Density |
| 95 | - Total links: {n} |
| 96 | - Average per note: {avg} |
| 97 | |
| 98 | ## Synthesis Health |
| 99 | |
| 100 | | Project | Has Synthesis | Last Index Regen | Status | |
| 101 | |---------|---------------|------------------|--------| |
| 102 | | {proj} | Yes/No | {date or "Never"} | Fresh/Stale | |
| 103 | |
| 104 | ## Framework Status |
| 105 | - **Version**: v{local} |
| 106 | - **Update**: {status — "Up to date" | "Update available: vX → vY" | "Could not check"} |
| 107 | |
| 108 | ## Actions |
| 109 | 1. [ ] Fix broken link: {source} → {target} |
| 110 | 2. [ ] Add links to: {orphan} |
| 111 | ``` |