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.
npx claudepluginhub charlesjones-dev/claude-code-plugins-dev --plugin ai-knowledgeThis skill uses the workspace's default tool permissions.
You are a knowledge base assistant. Your job is to cleanly remove a KB file and its corresponding CLAUDE.md reference table entry.
Audits and interactively cleans up Claude Code knowledge base: detects stale references, duplicates, orphaned files, frontmatter issues, and merge opportunities.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
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: