Audits KB vaults for structural drift and consistency issues, generating reports for manual cleanup.
Install
mkdir -p .claude/skills/kb-audit && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13162" && unzip -o skill.zip -d .claude/skills/kb-audit && rm skill.zipInstalls to .claude/skills/kb-audit
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Audit / curate KB-vault hygiene — surfaces mechanical drift (broken [[wikilinks]], dangling §-pointers, status-enum violations, status-drift, index-row bloat) the librarian's KB-curator role consumes. REPORTS only; never auto-edits the vault. Use to check KB drift, audit the KB, or do KB hygiene.Key capabilities
- →Audit KB-vault hygiene for mechanical drift
- →Surface broken wikilinks and dangling §-pointers
- →Identify status-enum violations and status-drift
- →Report index-row bloat in `BACKLOG.md` files
- →Present a grouped digest of audit findings
How it works
This skill discovers the KB path and project, then invokes an offline scanner in summary mode. It presents the scanner's output verbatim, highlighting human-decision items.
Inputs & outputs
When to use kb-audit
- →Audit documentation
- →Find broken links
- →Clean up KB status
- →Check index health
About this skill
/kb-audit — KB-vault drift report
Explicit, opt-in surface over the offline KB-drift scanner
(tests/kb_drift_scan.py, checks C1–C7). Runs Phase-0 KB discovery, invokes the
scanner in --summary mode against the resolved vault + project, and presents
the grouped digest. REPORTS only — never edits the KB.
C7 (C7_backlog_done_bloat) fires when a project BACKLOG.md carries too many
completed items inline; the C7 detail recommends running
python3 tests/backlog_archive.py <kb_root> --project <p> --dry-run to review
and archive them.
Caveman activation in this flow
Caveman compression is mandatory in this flow. The wire prefix
[COMPRESSION:terse] MUST be prepended to every subagent Task description and to
every Codex MCP developer-instructions: field within this flow. Machine-output
payloads (the scanner's --summary / --json text) are exempt per
skills/caveman/SKILL.md §7.
When to use
- "audit the KB", "check KB drift", "kb hygiene", "проверь КБ на дрейф".
- After a spec ships or a session wraps — to catch broken links, dangling §-pointers, status-enum violations, or status-drift before they pile up.
- Periodically — the scanner is offline (no git, no network), cheap to re-run.
Argument parsing
$ARGUMENTS is optional. The only supported flag:
--project <name>— override the Phase-0-discovered project. The scan is restricted to<kb_path>/repos/<name>/. Without it, the discovered project is used.
Phase 0: KB discovery
Resolve kb_path and project via the shared algorithm in
docs/kb-discovery.md (single source of truth:
.ai-dev-team.local.yml → .ai-dev-team.yml → memory → sibling → ask). No
skill-specific config extensions. If --project <name> was passed, it overrides
the discovered project.
Run the scanner
Invoke the scanner in --summary mode (the human digest — stable headline line
plus per-class grouped detail):
python3 "${CLAUDE_PLUGIN_ROOT}/tests/kb_drift_scan.py" "<kb_path>" --project <project> --summary
${CLAUDE_PLUGIN_ROOT} is the plugin install dir exposed at runtime; the scanner
lives at ${CLAUDE_PLUGIN_ROOT}/tests/kb_drift_scan.py.
Present the report
Present the scanner's --summary output verbatim, then one line of
interpretation: auto_safe:false findings (every C2/C3/C4, plus any flagged C1)
are human-decision items — this skill REPORTS them, it never auto-edits the
KB (the scanner's autonomy boundary). The reader decides each flip/fix.
Exit-code branch table
The scanner's exit code drives what /kb-audit does. Exit 1 is the primary
SUCCESS path — findings present is the skill's whole reason to exist, NOT an
error.
| Scanner exit | Meaning | /kb-audit action |
|---|---|---|
0 | clean, 0 findings | present the clean --summary headline (one line) |
1 | findings present | present the FULL grouped --summary (headline + detail) — the main success path; never treat exit 1 as a failure |
2 / python3 absent / kb_path or project unresolved | scanner unavailable | one-line diagnostic, then stop — never crash, never fabricate a clean result |
Silent-degrade applies ONLY to the exit-2/unavailable row: emit a single
diagnostic line (e.g. "KB-drift scanner unavailable: <reason>") and stop. Do NOT
treat exit 1 (findings) as a degrade — render the findings; that is the skill's
job.
When not to use it
- →When auto-editing the KB vault is desired
- →When the scanner is unavailable or cannot resolve `kb_path` or `project`
- →When a clean result is expected and no findings are present
Limitations
- →REPORTS only; never auto-edits the vault
- →Requires the `kb_drift_scan.py` script to be available
- →Caveman compression is mandatory for subagent Task descriptions and developer-instructions
How it compares
This skill provides an explicit, opt-in audit of KB hygiene, surfacing mechanical drift and reporting findings without auto-editing, which is distinct from manual KB maintenance.
Compared to similar skills
kb-audit side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| kb-audit (this skill) | 0 | 2mo | Review | Beginner |
| knowledge-ops | 0 | 4mo | No flags | Advanced |
| note | 0 | 3mo | No flags | Beginner |
| super-save | 1 | 2mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
knowledge-ops
ThanhTrunggDEV
Knowledge base management, ingestion, sync, and retrieval across multiple storage layers (local files, MCP memory, vector stores, Git repos). Use when the user wants to save, organize, sync, deduplicate, or search across their knowledge systems.
note
yangyuan-zhen
[OMX] Save notes to notepad.md for compaction resilience
super-save
supermemoryai
Save important project knowledge to memory. Use when user wants to preserve architectural decisions, significant bug fixes, design patterns, or important implementation details for team reference.
note
V1CeVersaa
>-
braindump
huytieu
Quick capture of raw thoughts with intelligent domain classification and competitive intelligence extraction
obsidian-canvas-creator
axtonliu
Create Obsidian Canvas files from text content, supporting both MindMap and freeform layouts. Use this skill when users want to visualize content as an interactive canvas, create mind maps, or organize information spatially in Obsidian format.