agentleFS
vignesh-nagarajan-vnvignesh-nagarajan-vn/claude-workflow-skills/skills/docs-sync/SKILL.md

docs-sync

Skill4 starsChanged 9 days agoMITView on GitHub

Work out which documentation a code change made stale and update only those files, using a per-repo .claude/docs-map.yml instead of re-reading every doc. Use after changing behavior, routes, commands, environment variables, dependencies, schemas, or UI; when asked to update or check the docs; and before calling any change done in a repo that keeps its docs current.

48 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use git-workflow, code-review and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Microsoft AzureSkill

    git-workflow

    Squad branching model: dev-first workflow with insiders preview channel

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 6 projects that use this

  • GoogleSkill

    tdd

    Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

    Also in 4 projects that use this

  • MicrosoftSkill

    release

    Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).

    Also in 3 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 39 edited versions we read keep these.

  • 2

    Distinctive

    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:

    If it reports no map, set one up:

    line 18
  2. Distinctive:

    Add a map entry the same day you add a doc.

    line 54

“Common” is measured: kept by at least 6 in 10 of the 39 edited versions of this file we could read. “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

docs-sync

A change that leaves the docs stale is not done. The cost trap is that "check the docs" usually means re-reading every doc in the repo. The map turns it into a targeted edit.

Order of operations

python <skill>/scripts/stale_docs.py

That prints the docs a change made stale, and the source file that triggered each one. Open only those, edit only the affected sections, and re-run to confirm.

If it reports no map, set one up:

python <skill>/scripts/stale_docs.py --init

That writes .claude/docs-map.yml from a template. Fill it in against the actual repo, then commit it.

Flags

FlagEffect
--base mainAlso count everything this branch changed since it forked from main. Use when reviewing a whole PR.
--stagedOnly what is staged. Use from a pre-commit hook.
--verifyExit nonzero if a mapped doc is stale and was not itself edited. Use in CI.
--jsonMachine readable.

Writing the map

Keys are globs over source paths. Values are the docs that depend on them.

"app/api/**":
  - README.md
  - docs/API.md

"package.json":
  - README.md
  - docs/DEPLOYMENT.md

Rules that keep the map honest:

  • Map to the narrowest doc that owns the fact. If routes live in docs/API.md, do not also list the README unless the README genuinely restates routes.
  • A glob that maps to five docs is usually wrong. It means one doc is repeating another, which is the real problem to fix.
  • Env vars, commands, and dependencies are the three that go stale most often. Map them explicitly.
  • Add a map entry the same day you add a doc. A map nobody maintains is worse than no map, because it reports clean.

Editing the stale doc

Change the smallest span that carries the fact. Do not rewrite surrounding prose, do not reorder sections, do not "improve" adjacent text. A docs-sync diff should be readable as a fact update.

Bump any Last verified or Last updated date in the files you touched.

Prose in the edit follows prose-guard's rules. Run that linter afterwards if the edit was more than a few words.

When there is no map

For a repo without one, do not fall back to reading everything. Grep for the changed identifier across *.md and open only the hits:

git grep -ln "OLD_ENV_VAR\|oldFunctionName" -- "*.md"

Then offer to write the map so the next change is cheap.

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.