/agent-skills:refresh-repo-docsfrom agent-skills
Audits and syncs human-facing repo docs (README, docs/, CHANGELOG, CONTRIBUTING, examples) against actual code. Detects drift, fixes stale claims, removes cruft, and verifies every claim. Use when docs are outdated or after major feature work.
Ships in agent-skills. 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.
Converge a repo's human-facing documentation onto the code it describes. Wrong docs are worse than no docs — a reader who follows a stale setup guide or copies a dead example loses both their time and their trust in every other doc in the repo.
Scope boundary: this skill owns README(s), docs/, CHANGELOG, CONTRIBUTING,
guides, examples, ADRs. It does not touch agent-facing docs (AGENTS.md,
CLAUDE.md, agent_docs/) — those have different consumers, quality bars,
and their own skill: agent-docs. If you find agent-doc drift here, note it
in the report and recommend an agent-docs refresh run.
Two rules the whole workflow hangs on:
Run the drift detector from the repo root (read-only):
// turbo
bash scripts/check-repo-docs-freshness.sh <scope>
It writes /tmp/repo-docs-freshness.json:
Build the worklist:
audit: incremental (default) → every doc with broken references or a
stale-suspect flag; plus, if since was given, every doc that references
files changed in git diff --name-only <since>..HEAD.audit: full → every doc in the corpus. (Expensive; use for a first run
on a neglected repo or a periodic deep pass.)If the worklist is empty: report "docs current", stop.
Record the worklist as a findings ledger — a working file at
/tmp/repo-docs-findings.md with one section per doc. All findings from
Phase 1 go in it before any edits happen (audit fully, then fix — editing
while auditing loses the cross-doc picture, and the ledger survives context
compaction).
Read the docs/README.md mode table when present (the map build-memory
seeds, BM-DOCS-02). Each entry carries a mode that fixes how this skill may
touch it:
docs/adr/README.md) → never hand-edit; fix the source
or regenerate with the named generator, and note it (per the "never hand-edit
generated docs" editing standard below).docs/build/ record, or an append-only
DEFERRALS.md is surfaced in the report, not rewritten — editing it would
falsify the record. docs/tickets/ and docs/build/ default to
historical even absent an explicit row.Scope the worklist accordingly: a generated or report-only doc never receives an in-place prose fix.
For each doc in the worklist:
mode-drift).--help, ls, builds of
examples) where cheap and safe. For claims the detector already flagged
(broken refs), find where the target moved (git log --follow,
git log --diff-filter=R) — a rename wants a path fix, a deletion wants
the section removed.critical (a reader following this doc gets a wrong
result: broken command, dead example, false setup step) > moderate
(misleading but survivable: outdated description, stale diagram) >
minor (cosmetic: dead badge, old version string in prose).Calibration: a finding must be demonstrable — name the code that
contradicts the doc. "This section could be expanded" is not drift; padding
docs with speculative content is how cruft gets created. When code and doc
disagree, the code is what's true now — but check git log intent before
"fixing" docs to match a bug (the doc may describe intended behavior; if so,
flag the code instead of rewriting truth to match an accident).
If apply is false: format the ledger (findings by doc, by severity, with
evidence), report, and stop.
Work through the ledger one doc at a time, foundational docs first (architecture/reference before the READMEs and guides that cite them), so downstream fixes can rely on upstream ones.
Editing standards (kept intact from hard experience):
git log evidence, in the file's existing format.// turbo
bash scripts/check-repo-docs-freshness.sh <scope>
Summarize from the ledger: per doc — stale fixed / cruft removed / gaps filled / mode fixes, each one line; then remaining gaps (found but not fixable without human input) and code suspects (places where the doc described intent and the code looks wrong).
Stage only the doc files this run touched:
git add <docs touched>
git commit -m "docs: refresh repo docs — <summary>
Scope: <scope> (<audit mode>)
Stale: X fixed | Cruft: Y removed | Gaps: Z filled | Remaining: N (see PR/report)
"
The detector is deterministic, fast, and exit-code-gated: run
check-repo-docs-freshness.sh on PRs that touch docs or heavily-referenced
source and fail (or warn) on broken references. Catching drift at change
time beats periodic sweeps; this skill remains the periodic repair tool.
AGENTS.md / CLAUDE.md / agent_docs/) — that's the
agent-docs skill; same convergence philosophy, different consumers and
quality bars.What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (stevevitali/agent-skills) — no native marketplace selected
npx claudepluginhub p/stevevitali-agent-skills12 skills in this plugin
/address-pr-commentsWork through unresolved review comments on your PR as the author: triage every thread, implement fixes where the reviewer is right, push back with rationale where they aren't, answer questions, commit + push, and reply to every thread with what happened. Use when asked to address, respond to, or resolve PR review feedback./agent-docsCreate or converge agent documentation (AGENTS.md hierarchy) for a codebase — bootstrap mode generates docs from scratch, refresh mode detects and fixes drift/audit-buildIndependent, fresh-context critical re-review of tickets that have already landed in a multi-session build. It covers the last N tickets, every ticket since the previous audit, named tickets, or a git range. Each ticket's acceptance criteria are re-checked against the code, tests and evidence, and claims are compared with what is verified. Faked or weakened checks, cross-ticket duplication and sole-owner violations are hunted down. Every finding is verified before it is reported, and fixes are routed through the build's own repair mechanisms. It also has an evaluation mode: a pre-registered, blinded measurement study of an implementer's work, which estimates how much auditing is actually needed, where and why. Use it to keep cheaper implementation models in check with periodic review by a stronger model, and to decide on evidence how often that review should run. Read-only on the build; never fixes, merges or edits landed records./build-memoryOwns the build-memory contract that the multi-session build skills share: the committed layout under docs/build/, docs/tickets/ and docs/adr/, the templates, the validator, and legacy-scratch migration. Use it to initialise the layout in a repo (init), validate it (check), migrate a legacy gitignored scratch dir into the committed tree (migrate), or regenerate the ADR index (adr-index). Other skills cite skills/build-memory/layout.md rather than restating the layout./decompose-specTurn one large spec into an optimally-partitioned, dependency-ordered ticket plan — the fewest self-contained tickets that each fit one fresh-context implementation run — and seed a durable build ledger plus per-ticket contract files and a manifest runbook (relocatable into the repo tree via tickets_dir). The planning half of a multi-session build; pairs with orchestrate-build./implement-specSpec-driven, autonomous end-to-end: branch → plan + test matrix → implement (tests alongside) → self-review → gap-analysis vs spec → close gaps → rigorous downstream verification → PR + evidence reportOther plugins' skills for the same job