doc-audit

Check a repository's READMEs and docs against the code and against real sessions - lines that are stale or wrong, things the code has that no doc mentions, and docs that sent an agent the wrong way. Use when asked to audit, check or refresh documentation, or after a large change.

O que é doc-audit?

doc-audit is a Claude Code agent skill that check a repository's READMEs and docs against the code and against real sessions - lines that are stale or wrong, things the code has that no doc mentions, and docs that sent an agent the wrong way. Use when asked to audit, check or refresh documentation, or after a large change.

Funciona com✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/QuesmaOrg/quesma-agent-plugin/tree/HEAD/skills/doc-audit

Installed? Explore more Programação e Desenvolvimento skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

Documentation audit

Agents read the READMEs before the code. A wrong line costs every future session; a missing one costs a search. This skill finds both, with evidence, and changes nothing.

Instruction files (AGENTS.md, CLAUDE.md, DESIGN.md, SKILL.md) are out of scope here: use instruction-audit for them.

The scripts are in this plugin's scripts/ directory: two levels up from this skill's base directory. Session evidence, the report and applying changes follow <plugin>/scripts/EVIDENCE.md; read it before step 5.

1. Inventory

git ls-files '*.md' ':!:**/AGENTS.md' ':!:**/CLAUDE.md' ':!:**/DESIGN.md' ':!:**/SKILL.md' > $TMPDIR/docs.txt

List the docs with line count and last commit date (git log -1 --format=%cs -- <file>). Compare that date with the last commit to the code the doc describes; a doc much older than its code is the first place to look.

2. Stale

node <plugin>/scripts/refs.mjs --missing $(cat $TMPDIR/docs.txt)

Every path, link, make target and package script a doc names that no longer exists.

3. Wrong

A reference can exist and the claim still be false. Check by reading the code, one claim at a time:

  • commands and make verbs: the flags, arguments and what the target does today
  • environment variables: names against .env.example and the code that reads them. Never open a real .env.
  • ports, URLs, versions, numbers, table and column names
  • "how it works" sections against the code path they describe

Report only what you checked against source. Name the file and line that proves it wrong.

4. Missing

What the code has that no doc mentions: a component or top-level directory without a README, a make target or package script no doc lists, an environment variable in .env.example that no doc explains, a new step in a documented flow. Skip internals no reader needs.

5. Evidence from sessions

Gather the evidence as EVIDENCE.md says: this machine, then the team. Find sessions where an agent read a doc and then hit trouble: a command from the doc that failed, a correction right after, or a search for something the doc should have said. Attach the session ids to the matching finding, or add a finding.

Report

As EVIDENCE.md says, to $TMPDIR/quesma/doc-audit.json with kind: "doc-audit", repo, scope (docs, dates, sessions), one item per finding.

  • status: stale, wrong, missing, duplicate or vague.
  • id: file:line, or the code path for missing.
  • rule: the doc line, shortened; for missing, what is undocumented.
  • detail: the problem in one sentence; evidence: the source line that proves it, session ids.
  • action: the fix in one sentence, and which doc it goes in.

End your answer with the counts per status, on one line. Change no doc until the user approves, then apply the approved fixes as EVIDENCE.md says.

Individual skills in this repo

This repo contains 2 individual skills — each has its own dedicated page.

Habilidades Relacionadas