kb-sanitize
Skill1 starsChanged 32 days agoMITView on GitHub
Use on request to clear accumulated migration debt — rewrite all references to deprecated notes onto their live superseding ids — in one isolated bulk commit, separate from logical changes.
In this repository11 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- kb-captureSkill
- kb-dashboardSkill
- kb-elicitSkill
- kb-evolveSkill
- kb-goalSkill
- kb-orientSkill
- kb-planSkill
- kb-recallSkill
- kb-recapSkill
- kb-visualizeSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Read index/health.md (Tier-1 "migration debt") and/or scan notes for any links / parent / topic pointing at a status: deprecated note.
- Very specific: line 19
After all rewrites, run npm run reindex and npm run graph so indexes and health.md reflect zero (or reduced) debt.
- Very specific: line 21
Commit everything as ONE bulk commit: chore(sanitize): migrate N deprecated references.
- Very specific: line 28
All writes via the write pipeline.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
kb-sanitize — bulk debt migration
Goal: collect the migration debt (references still pointing at deprecated notes) and resolve it in a single, isolated commit — keeping technical churn out of logical-change commits.
Steps
- Read
index/health.md(Tier-1 "migration debt") and/or scan notes for anylinks/parent/topicpointing at astatus: deprecatednote. - For each source note with debt, rewrite it through the write pipeline
(
tools/write-note.mjs). The heal rule_set resolves each reference to the LIVE head of thesuperseded_bychain (transitively, cycle-guarded), dedupes links, and removes self-references — automatically. - After all rewrites, run
npm run reindexandnpm run graphso indexes andhealth.mdreflect zero (or reduced) debt. - Commit everything as ONE bulk commit:
chore(sanitize): migrate N deprecated references.
Rules
- This is the ONLY place bulk reference rewrites across many notes are allowed. Logical changes never do bulk ripple (that stays passive / per-note).
- Manual / on-request only (future: scheduled). Never auto-runs.
- All writes via the write pipeline; never hand-edit notes or
index/.
Output (per mode)
debug: list each note rewritten and each reference migrated (old → live id).autonomous: short acknowledgement ("Прибрав технічний борг.").
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

