agentleFS
yeaight7yeaight7/agent-powerups/skills/doc-consistency-check/SKILL.md

doc-consistency-check

Skill6 starsChanged 4 months agoApache-2.0View on GitHub

Use when documentation may have rotted against the code -- files were renamed or moved, scripts or env vars changed, or readers report commands and paths from the docs that no longer work.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After a refactor that renamed or moved files, scripts, or env vars

    line 12
  2. Distinctive:

    Check code blocks in documentation: Do the function names and variable names still match the actual source code?

    line 44

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Purpose

Documentation rots when code changes. This check finds stale references in Markdown files — paths, commands, package scripts, env names, links — and flags them for immediate correction.

When to Use

  • After a refactor that renamed or moved files, scripts, or env vars
  • A reader followed the docs and a command or path failed
  • Periodic doc hygiene before a release

Inputs

  • The documentation set (Markdown files across the repo, not just the README)
  • The current repo state to validate against

Workflow

  1. Inventory the docs and extract referenced paths:

    git ls-files "*.md"                                                      # full doc inventory
    rg -no "[A-Za-z0-9_-]+/[A-Za-z0-9_./-]+\.[a-z]{2,4}" README.md docs/    # path-like references
  2. Verify referenced files still exist in the repository. If not, the documentation is stale:

    test -f src/components/Button.tsx || echo "STALE: src/components/Button.tsx"
  3. Verify documented commands against reality. Package scripts, CLI invocations, and env names must match the current source:

    rg -no "npm run [a-z:-]+" README.md docs/ | sort -u    # documented scripts...
    rg -n "\"scripts\"" -A 20 package.json                 # ...vs actual scripts
    rg -no "[A-Z][A-Z0-9_]{3,}=" docs/ | sort -u           # documented env names vs config source
  4. Check code blocks in documentation. Do the function names and variable names still match the actual source code?

    rg -n "functionNameFromDocs" src/ || echo "identifier not found in source"
  5. Check links. Relative links must resolve to existing files; flag external links that obviously moved.
  6. Flag everything for immediate correction. Fix in place when the right value is unambiguous; report the rest with file and line.

Output

  • A stale-reference report grouped by type (paths, commands, scripts, env names, links), each with doc file:line
  • Fixes applied where the correct replacement is unambiguous

Verification

  • All Markdown files inventoried, not just the README
  • Every doc-referenced path tested for existence
  • Documented scripts and commands compared against the actual manifest/CLI
  • Code-block identifiers spot-checked against source
  • Each finding fixed or reported with file and line

Failure Modes

  • README-only pass — the rot usually lives in docs/ and subsystem files, not the front page.
  • Existence-only checking — a path can exist while the command or identifier on the same line is stale.
  • Guessed fixes — when the correct replacement is ambiguous, report it; do not invent one.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.