/docs-audit:docs-auditfrom docs-audit
Audits documentation against the code read-only, then fixes it on request. Finds stale, missing or contradictory README, setup, API, config, CLI and changelog docs, ranks them P0 to P3 with cited lines, checks commands, links and env vars with a script. Also owns one fact repeated across code, config, CI and docs whose copies disagree: finds every copy, proposes one home, edits only after approval. Use when asked whether docs are stale, to check docs after a change, or for one source of truth.
Ships in docs-audit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Compare what the docs claim with what the code does, and report the gaps with evidence. Stay read-only until the person asks for fixes, because an audit that edits mid-way destroys the evidence it is reporting.
Not for CLAUDE.md or AGENTS.md files (agent-instructions, if installed), architecture decisions (adr-writing), project vocabulary (domain-modeling), or a README's structure, badges and visuals (readme, if installed); stale facts in a README are still in scope. It does cover assigning doc roles so each fact has one owner, choosing a doc type, and one fact whose copies disagree across code, config, CI and docs.
search_graph finds routes, CLI handlers and config readers by name and get_code_snippet shows them; use search_code or grep for literals such as flag names and env vars. For a PR or branch, take the changed files from git diff against the base.docs/, API specs, changelogs, setup and deploy guides, .env.example, examples, runbooks, and comments near the code. For generated docs, identify the generator and its command before recommending an edit.python3 ${CLAUDE_SKILL_DIR}/scripts/docs_drift.py <repo> checks documented npm run scripts and make targets (inside code only, not prose), relative links, and env vars in both directions (names also come from .env*.example files, and a documented-but-unread name is flagged only when it ends in _URL, _KEY, _TOKEN, _HOST, _PORT, or _SECRET), and it flags docs whose Fingerprint and Monitored header paths changed since the stamped commit, or whose commit cannot be resolved. It judges no prose and uses name matching, so confirm each finding before reporting it. Placeholder links (such as NNNN-title.md in a template) show up as findings and are not real drift.--help, a focused test. Do not run anything that writes into the repo, such as formatters, installers, or compileall, which leaves .pyc files while git status looks clean. Record each check and each skipped check.| Level | Meaning |
|---|---|
| P0 | Could cause an outage, data loss, security exposure, broken deploy, or credential mishandling |
| P1 | Blocks setup, release, API integration, migration, or a common user or admin workflow |
| P2 | Likely to confuse users, reviewers, operators, or contributors |
| P3 | Low-risk naming, example, or polish issue to queue |
Report user-impacting drift before cosmetic wording. Skip style preferences unless they make instructions misleading.
**Docs audit: <scope>**
No files changed. Compared <source scope> against <docs checked>. <P0 count or "no P0s">.
1. **P1: <title>.**
Drift: <what the docs say or omit vs what the code does>.
Impact: <who is misled or blocked>.
Evidence: source `<path>:<line>`; docs `<path>:<line>`.
Update: <specific direction>.
**Surveyed, not deeply inspected** (whole-repo audits only)
**Checks run**: `<command>`: <result>
**Not tested**: <what and why, including generated docs not rebuilt>
If nothing drifted, say so and list the residual risks.
Fix only when the person asks, and only confirmed drift or the inferred gaps they pick. Keep the repo's style and terms, regenerate generated docs from their source, and update examples, changelogs, and env samples together when they describe one behavior. Re-run the checks and map each finding to the file that fixed it.
references/doc-roles.md when the problem is structural: docs duplicate each other, agents keep re-deriving context, or deleted things get recreated. It assigns one owner to each fact and adds a staleness stamp.references/one-fact.md when one value, spec or definition is repeated across code, config, CI and docs and the copies disagree, or the person asks for a single source of truth. It is a different job from the audit: find every copy, propose a canonical home, and edit only after approval.references/doc-types.md when writing or reorganizing a page, to pick tutorial, how-to, reference, or explanation, and for README rules.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin docs-audit