/ravidsrk-agent-skills:knowledge-maintenancefrom ravidsrk-agent-skills
Audit and repair a markdown knowledge base — missing or malformed frontmatter, broken wikilinks, orphan pages, stale pages, duplicate titles, oversized pages, and taxonomy drift. Use when the user asks to "check brain health", "audit my notes", "fix broken links", "find stale pages", "clean up my knowledge base", or after a large import.
Ships in ravidsrk-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
A knowledge base degrades quietly: captures pile up with missing frontmatter, links point at renamed pages, entities become orphans, and old decisions stay on the front page after newer evidence lands. This skill makes the decay visible and fixes it one category at a time.
The audit script is generic and standard-library-only. If gbrain is installed, its schema, taxonomy, and embedding checks can run in addition.
export KB_ROOT="${KB_ROOT:-$HOME/brain}"
python3 --version
Optional gbrain:
gbrain doctor --json
gbrain schema stats --json
gbrain frontmatter audit --json
If the base is a git repo, commit or stash first. If it is not, copy it or create a tar archive. Never run a repair on the only copy.
git -C "$KB_ROOT" status --short
git -C "$KB_ROOT" add -A && git -C "$KB_ROOT" commit -m "chore: snapshot before KB audit"
python3 scripts/kb-audit.py --root "$KB_ROOT"
Machine-readable:
python3 scripts/kb-audit.py --root "$KB_ROOT" --json > audit.json
The audit is read-only. It reports:
| Code | Severity | Meaning |
|---|---|---|
missing_frontmatter | error | No opening/closing --- block |
empty_frontmatter | error | Opening and closing present but nothing between |
frontmatter_parse_error | error | Malformed YAML (unterminated quote/array, unknown line) |
missing_required_field | error | slug, captured_at, or content_hash is missing |
missing_title | error | No frontmatter title or H1 |
missing_type | warn | Frontmatter has no type |
slug_mismatch | error | Frontmatter slug differs from the path |
broken_wikilink | error | [[target]] resolves to no page |
broken_asset | error | A local image/PDF/file link does not exist |
read_error | error | The page could not be read (permissions/encoding) |
invalid_date | warn | updated_at / captured_at is not parseable |
stale_page | warn | Older than --stale-days (default 90) |
orphan_page | warn | No inbound links |
duplicate_title | warn | Two pages share a normalized title |
oversized_page | warn | More than --max-lines (default 500) |
Fix errors first, then warnings. Within a category, fix the highest-traffic pages first: index.md, entity pages, and pages with many inbound links.
Do not batch-fix a category you have not read. A "broken" link may be a deliberate reference to a page you are about to create.
title, type, slug, captured_at, content_hash.archive/.archive/ or delete them after confirmation.inbox/, archive/, README.md, and index.md from the orphan check.status: archived or move it to archive/.updated_at.references/ or originals/.python3 scripts/kb-audit.py --root "$KB_ROOT" --fail-on error
The repair is done when the same findings are gone, not when the count happens to drop.
## Knowledge Base Health — YYYY-MM-DD
| Dimension | Found | Fixed | Remaining |
|---|---:|---:|---:|
| Missing frontmatter | 4 | 4 | 0 |
| Broken links | 9 | 7 | 2 |
| Orphans | 6 | 3 | 3 |
| Stale pages | 12 | 5 | 7 |
| Duplicate titles | 2 | 2 | 0 |
| Oversized pages | 1 | 0 | 1 |
### Needs a human
- ...
Store the report with the base or in the PR. It is the audit trail.
A large base needs a small vocabulary:
people/, companies/, meetings/, concepts/, ideas/, projects/, originals/, voice-notes/.works_at, founded, invested_in, advises, attended, mentions, source.Add a new type only when at least ten pages share the shape. See references/taxonomy.md.
| Cadence | Check |
|---|---|
| Every capture | frontmatter + one backlink |
| Weekly | inbox triage, broken links, orphans |
| Monthly | stale pages, duplicate titles, oversized pages |
| Quarterly | taxonomy, schema, archive review |
| After a rename/import | full audit |
| Gotcha | Fix |
|---|---|
| Audit flags an intentional unlinked scratchpad | Move it to inbox/ or add an exemption |
| Slug mismatch after a rename | Update the frontmatter slug; links still need updating |
| Orphan count explodes after an import | Link the new pages from an index before re-running |
| Stale flag on historical minutes | Mark historical pages status: archived |
| Duplicate titles are legitimate (two "Weekly review" pages) | Include the date in the title |
| Repair deletes content | Never delete without confirmation; snapshot first |
| YAML fix breaks a page | Validate one file at a time; keep the backup |
| gbrain and plain-markdown counts disagree | They scan different roots/sources; report the root explicitly |
references/health-checks.md — every dimension, threshold, and repair actionreferences/frontmatter-schema.md — fields, validation classes, YAML trapsreferences/taxonomy.md — page types, prefixes, link verbs, merge rulesscripts/kb-audit.py — read-only audit with Markdown and JSON outputWhat SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (ravidsrk/agent-skills) — no native marketplace selected
npx claudepluginhub p/ravidsrk-agent-skills12 skills in this plugin
/cloudflare-dnsMigrate DNS hosting from Namecheap to Cloudflare and manage records via API — handles zone creation, bulk record import, nameserver flip at the registrar (Namecheap-specific; other registrars need a manual flip), propagation watch, and rollback. Zone management works for any Cloudflare zone regardless of registrar. Use when the user wants to "move DNS to Cloudflare", "add a domain to Cloudflare", "manage Cloudflare DNS records", or "automate DNS setup for multiple sites"./deep-researchGeneric parallel multi-source deep-research orchestrator. Fans out across 8 data sources in parallel (X via monid/tikhub, Reddit via monid, Hacker News via Algolia, GitHub repos + issues, Polymarket Gamma, YouTube with transcripts via monid, Exa neural web search via monid) and dumps quotable evidence as JSON + human-readable markdown in a single command. Use whenever the user says "do deep research on X", "what's the discourse on Y", "research this topic", "give me a primer on Z", asks for cross-source validation of a thesis, or needs broad evidence before drafting any long-form piece (briefing, post, report, memo)./finish-lineDrives an AI-built product that has docs, specs or GitHub issues but was never finished to verified launch-readiness, fully autonomously — no questions or approvals mid-run. It learns what the product is only from the docs and the running app (every claim quotes its source; an independent verifier approves it), audits what works, freezes a hash-locked definition of done, then works it item by item with Playwright / Maestro visual checks, a verifier subagent and tamper checks against skipped or weakened tests, up to a release candidate on a preview. Every issue found is researched until fixed. Starts over cleanly when a run misread the product. Use when the user says "finish this product", "take it to launch", "do it autonomously", "don't ask me", "verify what actually works", "the AI says it's done but it isn't", "audit my half-built app", "test everything visually", "it misunderstood my product, start over", or has many unfinished AI-coded products and must pick one to ship.Other plugins' skills for the same job