Health check knowledge base for broken links, missing frontmatter, tag inconsistencies, and coverage gaps. Use when user says "audit KB", "check frontmatter", "find broken links", "tag cleanup", or "knowledge base quality". Do NOT use for SEO audits (use /seo-audit) or code reviews.
Audit the knowledge base for quality issues: missing frontmatter, broken links, tag inconsistencies, orphaned files, and coverage gaps. Works on any markdown-heavy project.
Parse focus area from $ARGUMENTS (optional). If provided, focus on that area (e.g., "tags", "frontmatter", "links"). If empty, run full audit.
Find all markdown files: Use Glob to find all .md files, excluding common non-content directories: .venv/, node_modules/, .git/, archive/, .archive_old/.
Frontmatter audit: First, scan a sample of existing files (first 10-20) to detect the frontmatter schema in use (which fields exist, what values are common for type and status). Then for each markdown file, check:
--- and has closing ---)title, tags (and any other fields consistently used across the KB)type and status values (if used) are consistent with the detected schematags is a non-empty list
Track files missing frontmatter and files with incomplete/invalid frontmatter.Link check: Look for broken internal links:
\[.*\]\(.*\.md\) and verify each target file existsscripts/check_links.py), run it as wellTag consistency audit: Use Grep to find all tags: sections across .md files. Look for:
Orphaned files: Check which files are NOT referenced in any other file's related: field. Files that exist but are never cross-referenced may be orphaned.
Content quality: Find documents that appear to be ideas or opportunities (based on detected type field or directory location) and check:
draft status for more than 30 daysCoverage gaps: Check each directory for content:
Output report:
## KB Audit Report
**Date:** [today]
### Summary
- Total .md files: X
- With frontmatter: X (X%)
- Without frontmatter: X
### Frontmatter Issues
| File | Issue |
|------|-------|
| path | Missing field: type |
### Broken Links
[list of broken references]
### Tag Analysis
- Total unique tags: X
- Single-use tags: [list]
- Potential duplicates: [list]
### Orphaned Files
[files not referenced anywhere]
### Content Quality
- Stale drafts (> 30 days): [list]
- Missing metadata: [list]
- Low-content files: [list]
### Coverage
[directory analysis]
### Recommendations
1. [specific action]
2. [specific action]
3. [specific action]
event-2026 for a specific event). Flag but don't auto-merge without checking context.3-inbox/ or 4-opportunities/ are often standalone by design. Only flag orphans in methodology or principles directories.0-principles/ uses type: principle, 3-inbox/ uses type: capture. Detect per-directory norms, don't enforce one schema globally.related: field is not authoritative — many valid cross-references exist as inline markdown links [text](path.md), not just YAML related: arrays. Check both.5-active-projects/ or 6-companies/ might be empty by design (populated by automation). Check registry.yaml or Makefile before flagging.Cause: Running in wrong directory or all files excluded. Fix: Ensure you're in the knowledge base root. Check exclude patterns in step 2.
Cause: Inconsistent tagging across documents. Fix: Pick canonical tags from the most-used list. Run audit again after cleanup.
Cause: YAML syntax issues (missing quotes, wrong indentation).
Fix: Ensure --- delimiters are present. Use type: and status: values consistent with your KB's detected schema.
Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs.
Manage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move, and export notes). Use when a user asks OpenClaw to add a note, list notes, search notes, or manage note folders.
Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli.
Use when you need to control Slack from OpenClaw via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
Manage Apple Reminders via remindctl CLI (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.
Manage Trello boards, lists, and cards via the Trello REST API.
Category:productivity