/agent-skills:agent-docsfrom agent-skills
Generates or refreshes AGENTS.md documentation hierarchy for a codebase. Bootstrap mode creates docs from scratch; refresh mode detects and fixes drift.
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.
One workflow with two modes, both converging docs and code onto the same target state: an accurate, AGENTS.md-standard doc hierarchy that an agent can trust cold.
bootstrap — no docs exist yet. Generate them from scratch:
reconnaissance → gotcha mining → hierarchy design → generation.refresh — docs exist but may have drifted. Detect → triage →
surgical fixes → (optionally) deep semantic verification.The modes are the same convergence loop entered at different states: a refresh that finds a severely drifted doc regenerates it with bootstrap's machinery; a refresh that finds an uncovered package bootstraps a doc for it; a bootstrap validates its output with refresh's drift detector. Both modes finish through the same shared tail below.
All docs produced in either mode MUST conform to the Doc Authoring Guidelines — read that file before generating or editing any doc.
Use the user-provided scope, or default to . (the entire repo). Then run
the drift detector once:
// turbo
bash scripts/check-agent-docs-freshness.sh <scope>
(The script lives in this skill's scripts/ directory; run it from the repo
root. It writes a structured report to /tmp/agent-docs-freshness.json.)
Mode resolution:
| User said | Detector found | Mode |
|---|---|---|
| nothing | docsScanned: 0 | bootstrap |
| nothing | docs exist | refresh |
bootstrap | docs exist | Confirm intent. Then: fill gaps only — generate docs for uncovered areas via bootstrap; existing docs are never clobbered, they're refresh candidates. |
refresh | docsScanned: 0 | Report "nothing to refresh" and suggest bootstrap. Stop. |
--cross-repo integration surface).--deep semantic verification). The report
from Phase 0 is the input — don't re-run the detector to start.Both mode files end by returning here.
Every run, regardless of mode, finishes with these steps in order.
Re-run the detector to confirm the docs now match the code:
// turbo
bash scripts/check-agent-docs-freshness.sh <scope>
Re-read every doc this run created or edited, plus its parent AGENTS.md, checking for rules that now contradict each other (build commands that differ, conventions stated one way at the root and another way in a nested doc, gotchas that a fix made obsolete). Contradicting instructions cause agents to pick one arbitrarily — resolve per the no-contradictions rule in the Doc Authoring Guidelines.
Claude Code reads CLAUDE.md, not AGENTS.md — without a bridge, everything
this workflow maintains is invisible to it. Unless the user opts out or the
repo already has a CLAUDE.md, create one at the repo root containing:
@AGENTS.md
plus (only if needed) Claude Code-specific notes below the import: settings, permissions, hook expectations. Keep it to the import line if there is nothing Claude-specific to add — the point is one source of truth in AGENTS.md, shared across harnesses.
Before committing, verify:
ls / find)wc -l values with proper roundingReview git status and stage only the doc files this run touched (exclude
agent-harness dirs like .windsurf/, .claude/, .cursor/ unless the
bridge file was created):
git add <the doc files you changed>
git commit -m "docs: <bootstrap|refresh> agent docs — <summary>
Scope: <scope>
<bootstrap: docs created | refresh: Critical: X fixed | Moderate: Y fixed | Minor: Z fixed>
"
The structural detector is fast, deterministic, and exit-code-gated — suitable as a PR check. Drift research (DOCER, EMSE 2023) found broken doc references in ~29% of the top-1000 GitHub repos, typically unnoticed for years, precisely because checking was manual; the same work ships a PR-triggered action because catching drift at change time beats periodic sweeps. Recommended split:
check-agent-docs-freshness.sh <scope> on
PRs that touch source or docs; fail (or warn) on critical issues. No LLM
involved — cheap and deterministic.--deep
semantic verification stay human-triggered. Run refresh when you suspect
drift (after refactors, after merging large PRs, periodically).--cross-repo documents this repo's surface, not
the other repos)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./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 report/orchestrate-buildDrive a decomposed spec to completion across fresh contexts: SETUP a dedicated worktree, run each ticket end-to-end through implement-spec in a fresh context, update the durable ledger, report progress, pause for intervention at ticket boundaries, and finish with a whole-build capstone verification. The execution half of a multi-session build; pairs with decompose-spec.Other plugins' skills for the same job