Audit

From fortunto2/solo-factory · View interactive version

Audit is an AI agent skill from the GitHub repository fortunto2/solo-factory. Use when "audit KB", "check frontmatter", "find broken links", "tag cleanup", "knowledge base quality", or docs need health check. Do NOT use for SEO audits (/seo-audit) or code reviews (/review).

How to use this skill

Skill file

/audit

Audit the knowledge base for quality issues: missing frontmatter, broken links, tag inconsistencies, orphaned files, and coverage gaps. Works on any markdown-heavy project.

Steps

  1. Parse focus area from $ARGUMENTS (optional). If provided, focus on that area (e.g., "tags", "frontmatter", "links"). If empty, run full audit.
  1. Find all markdown files: Use Glob to find all .md files, excluding common non-content directories: .venv/, node_modules/, .git/, archive/, .archive_old/.
  1. 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:

Track files missing frontmatter and files with incomplete/invalid frontmatter.

  1. Link check: Look for broken internal links:
  1. Tag consistency audit: Use Grep to find all tags: sections across .md files. Look for:

List all unique tags with counts.

  1. 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.
  1. Content quality: Find documents that appear to be ideas or opportunities (based on detected type field or directory location) and check:
  1. Coverage gaps: Check each directory for content:
  1. Output report:

```

## KB Audit Report

Date: [today]

### Summary

### Frontmatter Issues

| File | Issue |

|------|-------|

| path | Missing field: type |

### Broken Links

[list of broken references]

### Tag Analysis

### Orphaned Files

[files not referenced anywhere]

### Content Quality

### Coverage

[directory analysis]

### Recommendations

1. [specific action]

2. [specific action]

3. [specific action]

```

Gotchas

  1. Single-use tags are not always typos — a tag used once might be intentional (e.g., event-2026 for a specific event). Flag but don't auto-merge without checking context.
  2. Orphaned files may be intentional archives — files in 3-inbox/ or 4-opportunities/ are often standalone by design. Only flag orphans in methodology or principles directories.
  3. Frontmatter schemas drift across directories — 0-principles/ uses type: principle, 3-inbox/ uses type: capture. Detect per-directory norms, don't enforce one schema globally.
  4. 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. Empty directories may be placeholders — 5-active-projects/ or 6-companies/ might be empty by design (populated by automation). Check registry.yaml or Makefile before flagging.

Common Issues

No markdown files found

Cause: Running in wrong directory or all files excluded.

Fix: Ensure you're in the knowledge base root. Check exclude patterns in step 2.

Too many single-use tags

Cause: Inconsistent tagging across documents.

Fix: Pick canonical tags from the most-used list. Run audit again after cleanup.

Frontmatter validation errors

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.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.