ai-audit-docs
Skill65 starsChanged 2 months agoApache-2.0View on GitHub
Audits docs against repo state for dead links, false claims, stale versions, and nonexistent commands. Input: paths or default docs/, README.md, AGENTS.md. Output: ranked findings only; no auto-fix. Trigger: "audit docs", "verify docs", or "documentation review".
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- a11y-auditSkill
- ai-adversarial-loopSkill
- ai-agents-mdSkill
- ai-architectSkill
- ai-audit-codeSkill
- ai-audit-designSkill
- ai-brainstormSkill
- ai-codegraphSkill
- ai-config-to-projectSkill
- ai-debugSkill
- ai-design-md-plannerSkill
- ai-exploreSkill
- ai-git-cleanupSkill
- ai-issue-reportSkill
- ai-noteSkill
- ai-orchestratorSkill
- ai-prototypeSkill
- ai-prSkill
- ai-read-docsSkill
- ai-researchSkill
- ai-review-uiSkill
- ai-securitySkill
- ai-stress-testSkill
- ai-test-plannerSkill
- ai-triageSkill
- ai-verifySkill
- ai-visual-recapSkill
- ai-writeSkill
- ai-writing-behaviorSkill
- build-checkSkill
- code-auditSkill
- design-checkSkill
- feature-verifySkill
- full-reviewSkill
- perf-auditSkill
- review-routerSkill
- second-opinionSkill
- security-auditSkill
- spec-extractSkill
- verify-featureSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Read by: humans (consumed as a findings table) Dies: on completion Next: ai-verify (to validate fixes if user acts on findings)
- Very specific: line 33
Determine scope: If the user gave a path, audit that.
- Very specific: line 59
If no definition exists AND the command is not a well-known system binary (git, ls, cat, curl, jq, etc.) -> warning finding.
- Distinctive: line 61
If a script IS defined, check that the arguments the doc uses still match the script's actual flags — flag mismatches -> info.
- Distinctive: line 67
If nothing matches -> warning (the feature may exist under a different name.
- Distinctive: line 69
If the feature exists but is behind a flag the doc doesn't mention -> info.
- Distinctive: line 74
If the doc version is older -> info (may be intentional.
- Distinctive: line 75
If the doc references a version that is *higher* than what exists -> warning.
- Distinctive: line 107
Assuming feature names are unique: When a feature claim doesn't match code, say "may be named differently" — don't assume absence.
- Very specific: line 115
Every target doc has been read and all link/command/feature/version claims extracted.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Audit docs against repo reality
Lifecycle
Lane: light Writes: nothing — report-only, never modifies files Read by: humans (consumed as a findings table) Dies: on completion Next: ai-verify (to validate fixes if user acts on findings)
What it produces
A ranked markdown table of findings. Every finding names the doc file, the line, the severity, and the broken claim.
| Severity | Meaning |
| critical | Doc points users at something that does not exist — they will hit a wall |
| warning | Claim is outdated or inaccurate but the doc is still roughly usable |
| info | Cosmetic: stale version number, unused anchor, minor nit |
Steps
- Determine scope. If the user gave a path, audit that. Otherwise default to
README.md,AGENTS.md, and anydocs/directory at the repo root. Glob for**/*.mdunder docs if the directory exists. Never audit vendored or generated files (node_modules/,dist/,*.generated.*). Read every target doc. Extract all of these per file:
- File links: markdown links pointing at local paths (e.g.
./path,../path,path/to/file). Skip anchors (#section) and bare URLs — those are checked in step 3. - External URLs: bare
http:///https://links. Collect for batch HEAD-check. - Command references: inline code or code blocks containing shell commands
(
npm run X,yarn X,make X,cargo X,python -m X,npx X). Strip arguments; extract just the command name. - Version strings:
v1.2.3,1.2.3,>=1.2.3, pinned deps in prose. - Feature claims: sentences that assert existence — "supports X", "includes X", "has X", "provides X", "X is built-in", "X is enabled by default".
- File links: markdown links pointing at local paths (e.g.
- Cross-check file links. For each local path extracted from a markdown link:
- Resolve it relative to the doc file's directory.
findorreadto confirm the target exists. If not -> critical finding.
- Cross-check command references. For each command name:
grepthe repo for a script/package-bin definition (package.jsonscripts,Makefiletargets,Cargo.tomlbin,setup.py/pyproject.tomlentry points, shell scripts inbin/orscripts/).- If no definition exists AND the command is not a well-known system binary
(
git,ls,cat,curl,jq, etc.) -> warning finding. - If a script IS defined, check that the arguments the doc uses still match the script's actual flags — flag mismatches -> info.
- Cross-check feature claims. For each feature assertion:
findthe feature name (the noun, not the sentence) in the codebase: config keys, source files, type definitions, exported symbols.- If nothing matches -> warning (the feature may exist under a different name; the finding should note "searched for X, found nothing; may be named differently").
- If the feature exists but is behind a flag the doc doesn't mention -> info.
- Check version strings. For each version reference found in prose:
- Compare against the repo's actual version:
package.jsonversion field,Cargo.toml,pyproject.toml,version.txt, etc. - If the doc version is older -> info (may be intentional; flag as potentially stale).
- If the doc references a version that is higher than what exists -> warning.
- Compare against the repo's actual version:
- Batch-check external URLs. For each external URL:
- HEAD request (timeout 5s). 404/410/DNS failure -> critical (dead link).
- 403/429/connection refused -> info (may be rate-limited or geo-blocked; note it but do not flag as dead).
- 301/302 -> follow one hop; if the final target is the same domain, note the redirect as info.
Rank and output. Sort findings by severity (critical first), then by file path. Output as a markdown table:
| # | Severity | File | Line | Finding | |---|----------|------|------|---------| | 1 | critical | README.md | 42 | Link `./docs/setup.md` -> file does not exist | | 2 | warning | AGENTS.md | 15 | Command `yarn deploy` not defined in any script | | 3 | info | README.md | 8 | Version `v2.1.0` in doc vs `v2.3.0` in package.json |End with a one-line summary:
X critical, Y warnings, Z info — total N findings.
Anti-patterns
- Fixing anything. This skill is report-only. Never edit docs; the user decides what to fix.
- Auditing generated files.
dist/,build/,node_modules/,*.generated.*are out of scope — their content is derived, not authored. - Failing on external URLs that are merely slow. A 429 or timeout is not a dead link. Only 404/410/DNS failure are critical.
- Over-flagging version info. A doc pinned to an older version on purpose is info, not warning. The severity distinction matters.
- Assuming feature names are unique. When a feature claim doesn't match code, say "may be named differently" — don't assume absence.
- Checking anchors inside the same doc.
#sectionlinks to anchors the doc itself defines; checking those is useful but low value and fragile. Skip unless the user specifically asks.
Done when
- Every target doc has been read and all link/command/feature/version claims extracted.
- Each claim has been cross-checked against repo state or the network.
- The findings table is complete, ranked, and includes file:line for every row.
- Nothing in the repo was modified.
Not for
- Writing or fixing docs — use /ai-write for authoring, /ai-edit or manual edits for fixes.
- Reviewing prose quality or style — use /ai-review or /humanizer.
- Diagnosing a runtime failure that happens to mention docs — use /ai-debug.
- External research about a topic the docs cover — use /ai-research.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

