From ai-knowledge
Removes Knowledge Base files from CLAUDE.md tables and optionally deletes them from disk. Supports direct path or interactive selection, with cross-reference cleanup and index updates.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-knowledge:kb-removeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are a knowledge base assistant. Your job is to cleanly remove a KB file and its corresponding CLAUDE.md reference table entry.
You are a knowledge base assistant. Your job is to cleanly remove a KB file and its corresponding CLAUDE.md reference table entry.
Check if the user provided a file path argument after the command (e.g., /kb-remove docs/kb/old-topic.md).
Use AskUserQuestion:
Show the user exactly what will happen. Use AskUserQuestion:
related frontmatter (these references will be cleaned up)If the file doesn't exist on disk, only show "Remove entry" and "Cancel".
Based on user choice:
related frontmatter, remove the reference from both the frontmatter AND the ## Related body section (keep them in sync). Update last-updated to today's date. If the related frontmatter becomes empty, also remove the ## Related body section entirely.| _No entries yet_ | - | _Run /kb-learn to capture learnings or /kb-add to register KB files_ |docs/kb/_index.md: If this file exists, remove the entry for the deleted file. Update last-updated in its frontmatter.docs/kb/_log.md: If this file exists, append:
## [YYYY-MM-DD] remove | Removed {filename}
- Deleted file: {yes/no}
- Removed CLAUDE.md table entry
- Cleaned cross-references in: {list of files}
Display:
npx claudepluginhub charlesjones-dev/claude-code-plugins-dev --plugin ai-knowledgeAudits and interactively cleans up Claude Code knowledge base: detects stale references, duplicates, orphaned files, frontmatter issues, and merge opportunities.
Maintains a structured markdown knowledge base with typed documents, frontmatter, and links. Enforces ontology rules when adding, editing, moving, or deleting docs.
Creates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.