agentleFS
RichardBrayRichardBray/skills/sync-docs/SKILL.md

sync-docs

Skill5 starsChanged 44 days agoMITView on GitHub

Update a project's documentation to reflect code changes on the current branch before opening a PR. Use when the user finishes a feature/fix and is about to create a PR, or asks to "sync docs", "update the docs for these changes", or check whether documentation needs updating.

22 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use prepare-release, review-pr and 2 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.
  • ShopifySkill

    prepare-release

    Prepare the changeset-release/main branch for release by syncing version.ts files and running pnpm install

    Also in 4 projects that use this

  • DockerSkill

    review-pr

    Review one or more incoming Docker documentation pull requests as a maintainer. Independently validate technical claims, assess editorial fit and information architecture, choose a verdict, and draft exact inline or PR-wide feedback behind a confirmation gate. Use for requests such as "review PR 123", "is this PR correct?", "does this information belong here?", "validate this PR", or "help review backlog PRs". Do not use to maintain or fix a PR you own; use maintain-pr for that.

    Also in 3 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 19 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:

    Locate the docs and learn the conventions: Don't assume a layout — find it:

    line 12
  2. Distinctive:

    If on the base branch or there's no diff, stop and tell the user there's nothing to sync.

    line 25

“Common” is measured: kept by at least 6 in 10 of the 19 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

Sync Docs

Bring a project's documentation in line with the code changes on the current branch, so doc updates land in the same PR as the code and get reviewed together. Project-agnostic: discover the project's doc conventions first, then apply this workflow.

Workflow

  1. Locate the docs and learn the conventions. Don't assume a layout — find it:
    git ls-files | grep -iE '(^|/)(docs?|documentation|content)/' | head -50
    Common homes: a docs/ dir, a packages/docs or website/ package (Astro/Starlight, Docusaurus, VitePress, mkdocs), a top-level README.md, or man/. Identify which generator (if any) by checking for astro.config.*, docusaurus.config.*, mkdocs.yml, *.vitepress, etc.
    • Read any docs-specific guidance first — a CLAUDE.md/AGENTS.md/README.md inside the docs dir, or a ## Docs section in the repo's root CLAUDE.md. Follow its house style and gotchas.
    • Note which files are generated (build artifacts like dist/, llms.txt, per-page .md exports, API reference dumps). Never hand-edit generated output — edit the source it's built from.
  2. Get the diff. Determine the base branch (usually main or master; check git remote show origin or the repo's default) and diff against it:
    git diff <base>...HEAD --stat
    git diff <base>...HEAD
    If on the base branch or there's no diff, stop and tell the user there's nothing to sync.
  3. Decide if docs are even in scope. Doc-relevant changes are user-facing: CLI commands/flags, public API signatures, config options, env vars, UI flows, install/build/setup steps, and behavior changes a user would notice. Pure internal refactors, tests, and CI changes usually need no doc update — say so and stop rather than inventing edits.
  4. Map changes to pages. For each user-facing change, find the page(s) that describe it. Grep the docs for the old name/flag/value to catch every mention:
    grep -rn "<old-flag-or-name>" <docs-dir>
    Renamed/removed things are the highest-value catch — stale references mislead users.
  5. Edit the source pages. Make the smallest change that makes the docs correct. Match the existing voice, structure, and any callout/aside syntax the generator uses. If you add or rename a page, update whatever the project uses for navigation (sidebar config, _sidebar, frontmatter slug, nav YAML) and fix in-content links to it.
  6. Flag what you can't map. If a code change clearly affects users but you can't confidently place it (or it needs a screenshot, a decision, or content you don't have), don't guess — list it for the user to handle, with the file/change and your best suggestion.
  7. Verify the build, if there is one. If the docs are part of a buildable site, run its build to surface broken links/nav (e.g. the docs package's build script). This catches errors dev mode hides. Don't claim done until it passes. If there's no build step, re-read your edits for correctness.
  8. Report. Summarize: pages edited (and why), pages checked but left unchanged, and anything flagged for the user. Leave committing/PR creation to the user unless they ask.

Principles

  • Silence-or-flag beats fabricating. A wrong doc is worse than a missing one.
  • One PR, reviewable diff: doc edits go on the current branch as normal edits the user reviews — never auto-commit or auto-merge.

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.