Review docs against the code
Project rules in CLAUDE.md / AGENTS.md win over this skill: doc conventions, header formats, which repos the docs describe.
1. Scope
- Arguments, if given:
$ARGUMENTS. - Else the Markdown changed on this branch:
git diff --name-only <base>...HEAD -- '*.md'. - Else ask, if the repo has more than about 30 docs. Never silently review a subset of "all docs".
2. Run the repo's own checkers first
They encode its rules. Look for:
check-*.shat the root or inscripts/;scripts/validate-docs.*and anything else withdoc,linkoranchorin its name;package.jsonscripts nameddocs:*orlint:md, and Makefile targets.
Read a script before running it if you can't tell whether it writes. Record the numbers each one prints. If there is no link checker, use the dead-links skill.
3. Build the claim inventory
For each doc, list every claim that the code can confirm or refute:
- file paths and
path:linecitations, and the symbols they name; - commands, scripts and Makefile targets;
- env vars, ports, config keys and default values;
- versions, routes, schemas, API shapes;
- counts (tests, endpoints, files);
- behaviour ("X retries three times", "Y requires auth").
4. Verify each claim at the committed revision
-
Note
git rev-parse --short HEAD. Files listed bygit status --porcelainare read withgit show HEAD:<path>, never from disk. -
Code in a sibling repo named by the project: same rule, with
git -C <repo>. -
Verify by reading. Don't run a command with side effects just to prove a doc right.
-
Verdict per claim:
Mark Meaning ✅ verified; cite the evidence path:line❌ wrong; show what the code actually says, with path:line⚠️ drifting: a count or line number that is close but stale ❓ could not be verified; say why
5. Report, ranked
| Priority | What |
|---|---|
| P1 | Wrong and harmful to act on: commands, setup steps, security, data handling, credentials locations |
| P2 | Wrong but low harm: stale counts and line numbers, broken links, dead references |
| P3 | Shape: walls of prose, missing reasons on related links, duplicated facts |
For each finding: doc:line, the claim, the evidence, the proposed fix. End with totals per verdict, the checker numbers, and the SHA verified against.
6. Ask before fixing
- Fix only what the user approves.
- When a fact is corrected,
git grepfor every other doc that repeats it and fix those too. - Re-run the checkers and report before → after numbers.
- Don't commit unless asked; then use
/commit-pr.