wiki-index-regeneratorlisted
Install: claude install-skill draakaap/lorewerk
# Wiki Index Regenerator
This skill keeps **two derived indexes** in sync with the wiki:
1. **`wiki/index.json`** — machine-readable catalog (slug / title / type / summary / importance_score / tags) used by `kb-wiki-read`, `wiki-synthesize`, `wiki-health`, and `wiki-lint`.
2. **`wiki.db`** (default install path `<kb-search-install>/wiki.db`) — SQLite FTS5 + sqlite-vec hybrid retrieval index used by `kb-search-mcp` (the on-demand session-start replacement for raw `brain.md` loads).
Both drift silently when pages are added, renamed, or have their frontmatter / body changed — and both have caused real session-time bugs. The 2026-05-02 `index.json` drift triggered the `wiki-index-regenerator` skill itself; the 2026-05-09 `wiki.db` drift (a wiki page written 12 minutes after the morning's reindex) caused `kb_search` to return `not found` for the new slug. Running both refreshes from one place closes both gaps.
## When to invoke
- After every `kb-wiki-create` completes
- After every `kb-wiki-update` that changes title, type, summary, importance_score, or last_verified
- After `kb-wiki-deprecate`
- Whenever `wiki-lint` Check 9 (index completeness) is OPEN
- As the last step before session end, if any wiki page was touched this session
## What it does
1. Enumerate every content `.md` page under `wiki/`:
- Include: all files under `wiki/` and its subfolders, except the exclusions below
- Exclude (root files only): `brain.md`, `index.md`, `log.md`, `gaps.md`, `health.md`,