From kb
Compacts KB directories — extracts legacy, unifies terminology, splits oversized notes, fixes indexes, reconciles with skill folders. Default: single directory. Use --deep for recursive bottom-up traversal.
How this skill is triggered — by the user, by Claude, or both
Slash command
/kb:compactThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Read KB config from `.claude/knowledge-base/config.json` (`kb_roots` array). Single KB: use its path. Multiple: AskUserQuestion which KB. No config: tell user "Run `/kb-bootstrap` to set up." and stop.
Read KB config from .claude/knowledge-base/config.json (kb_roots array). Single KB: use its path. Multiple: AskUserQuestion which KB. No config: tell user "Run /kb-bootstrap to set up." and stop.
Parse $ARGS:
--deep: recursive bottom-up traversal. Without it: single directory only.<kb_root>.--deep) or specify subfolder.All restructuring follows reference/folder-structure.md (canonical for clustering, unification, indexes, naming).
Sibling unification first: child folders grouped by semantically/lexicographically close names, run before other steps. 5+ siblings = medium sign; 8+ = high.
Template: assets/index-note.md
--deep: Follow reference/deep-compaction.md — tree analysis, level-based parallel compacter agents, bottom-up.Every run changing knowledge files MUST prepend to <kb-root>/CHANGELOG.md per ${CLAUDE_SKILL_DIR}/../learn/reference/changelog-workflow.md.
After all agents complete: present combined summary (files processed/moved/merged/split/created/deleted, terminology, legacy, indexes). AskUserQuestion: "Keep all", "Revert selectively", "Revert all". Selective: per-directory summaries, revert via git checkout -- <paths>.
After completing KB changes, run the validator to catch broken links, frontmatter issues, and structural errors:
uv run ${CLAUDE_SKILL_DIR}/../learn/scripts/validate_kb.py --quiet --json
Fix any reported errors before finishing.
npx claudepluginhub farzadshbfn/knowledge-plugin --plugin kbUpgrades existing Knowledge Base to latest Claude plugin practices: Obsidian graph-view links, structured 'When to Load' format, CLAUDE.md preamble, index schema, frontmatter health. Safe, preview-first, re-runnable.
Orchestrates parallel knowledge base generation from codebases using spatial analysis, map-reduce architecture, and sub-agents for concepts, architecture, modules, and patterns. Supports feature learning from archived features.
Use when compiling raw sources into the wiki, querying the knowledge base, running health checks or lint on the wiki, evolving or improving wiki coverage, or when user says 'compile', 'update the wiki', 'query', 'lint', 'health check', 'evolve', 'what's missing', or 'suggest improvements'. Also triggers on questions that should be answered from the knowledge base.