update-docs
Skill17 starsChanged 59 days agoMITView on GitHub
Use when implementing features, fixing bugs, or refactoring code that may invalidate existing docs. Detects stale documentation by matching the code diff against in-repo doc files and applies targeted updates. Relevant when code changes rename, remove, or add APIs, fields, config keys, or CLI flags. Also applies when the user says "update docs", "check docs", or "are the docs stale", or when reviewing a branch for documentation accuracy.
87 other projects use a version of this.
Adopted by
Most recently taken up by
- rmichak/claude-skillstheir own version, first seen Nov 8, 2026
- Eclipter/agentstheir own version, first seen Nov 8, 2026
- rvdbreemen/OTGW-firmwaretheir own version, first seen Nov 8, 2026
- jmusick/skillstheir own version, first seen Nov 8, 2026
- protokol11/skillstheir own version, first seen Nov 8, 2026
- OldemarJesus/connectlife-mcp-servertheir own version, first seen Nov 8, 2026
Used with
Projects with it also use get-pr-reviews, push-everything and 10 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.
saffron-healthSkillget-pr-reviews
Get nicely formatted output of the last review comments on a PR. Used internally by other skills.
Also in 3 projects that use this
saffron-healthSkillpush-everything
Stage ALL changes in the repository (not just session changes), commit, and push. Use when you need to commit all pending changes.
Also in 3 projects that use this
TheKREATORSSkillinstinct-export
Export instincts from project/global scope to a file
Also in 3 projects that use this
TheKREATORSSkillinstinct-import
Import instincts from file or URL into project/global scope
Also in 3 projects that use this
NVIDIASkillgenerate-spec
Produce a feature specification covering API changes, backward compatibility, cross-language impact, performance, and a file-level change plan. Use when designing a new feature, planning a significant change, or the user asks to spec something out.
Also in 3 projects that use this
belokonmSkillfullstack-developer
End-to-end feature expert specializing in frontend-backend integration, system architecture, and complete application development
Also in 4 projects that use this
- +1 more from saffron-health
- +1 more from TheKREATORS
Other versions87 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 87
- vercel/next.js★ 143ksame name
- pipecat-ai/pipecat★ 17ksame name
- anyproto/anytype-ts★ 9.1ksame name
- vladmandic/sdnext★ 7.4ksame name
- ArcReel/ArcReel★ 6.3ksame name
- dotnet/sdk★ 3.2ksame name
- meta-pytorch/OpenEnv★ 2.8ksame name
- huggingface/OpenEnv★ 2.8ksame name
- man-group/ArcticDB★ 2.6ksame name
- fabro-sh/fabro★ 1.8ksame name
77 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- brainstormingSkill
- ci-guardSkill
- cost-speed-meterSkill
- python-patternsSkill
- refactoring-patternsSkill
- security-checkSkill
- semantic-versioningSkill
- verification-loopSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 17 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 81 edited versions we read keep these.
17
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 23
Follow these steps in order.
- Very specific: line 38
If the diff is empty, output NO_DOCS_UPDATED and stop.
- Distinctive: line 47
Search broadly — include diagram and config files that live alongside docs:
- Very specific: line 71
If no documentation files exist in the repo, output NO_DOCS_FOUND and stop.
- Distinctive: line 82
Use the most specific form of each identifier.
- Distinctive: line 89
Do not skip files. Do not prioritize some files over others.
- Distinctive: line 94
Write a shell script that takes the identifiers from step 3 and greps for each one across the documentation files from step 2.
- Distinctive: line 96
Run the script in a single Bash call:
- Distinctive: line 125
Every candidate must have a verdict.
- Distinctive: line 127
Pass 2 — Deep read: Only for candidates marked "possibly stale" in pass 1.
- Distinctive: line 148
Always read the repository's README.
- Distinctive: line 163
Read the full file
- Distinctive: line 164
Update the documentation so it accurately reflects the new code
- Distinctive: line 169
Do not commit automatically.
- Distinctive: line 175
If docs were updated:
- Distinctive: line 184
If no docs needed updating:
- Distinctive: line 189
If no doc files found:
- Distinctive: line 203
Skip auto-generated files: Do not edit files that are generated from source.
- Distinctive: line 205
Update existing files only: Do not create new doc files from scratch.
“Common” is measured: kept by at least 6 in 10 of the 81 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.
Files
Update Docs
Code changes can silently invalidate documentation. A renamed function, a changed API signature, a removed configuration option, each can leave docs describing behavior that no longer exists. This skill detects that drift by matching the code diff against in-repo documentation and updating docs whose descriptions contradict the new code.
Process
Follow these steps in order. Do not skip steps.
1. Get the diff
DEFAULT_BRANCH=$(git rev-parse --abbrev-ref origin/HEAD | cut -d/ -f2)
git diff $(git merge-base HEAD "$DEFAULT_BRANCH")..HEAD --no-colorRecord the list of files changed in the PR:
git diff --name-only $(git merge-base HEAD "$DEFAULT_BRANCH")..HEADIf the diff is empty, output NO_DOCS_UPDATED and stop.
2. Discover documentation files
Explore the repository structure to identify where documentation lives. Different repos organize docs differently — look for dedicated doc directories, standalone files like README.md at any level, and any other files whose primary purpose is documentation.
Search broadly — include diagram and config files that live alongside docs:
find . -type f \( -name "*.md" -o -name "*.rst" -o -name "*.adoc" \
-o -name "*.txt" -o -name "*.mmd" -o -name "*.puml" \
-o -name "*.yaml" -o -name "*.yml" \) \
! -path "./.git/*" ! -path "./.forge/*" ! -path "./vendor/*" \
! -path "./node_modules/*" \
| head -500Then filter the results:
- Exclude files already modified in the PR (they are being actively updated — check against the changed file list from step 1)
- Exclude auto-generated files (lockfiles, generated API docs, swagger output)
- Exclude changelog and release note entries that describe past releases
- Exclude YAML/YML files that are not documentation. Only keep YAML files that live in doc directories or are clearly documentation examples.
If no documentation files exist in the repo, output NO_DOCS_FOUND
and stop.
3. Build the identifier checklist
Go through every changed file in the PR. For each file, extract
identifiers from the modified lines (lines starting with + or -)
and from diff hunk headers (@@ lines). Write them down as a numbered
checklist — one entry per changed file, with all identifiers from that
file.
Use the most specific form of each identifier. CLI flag names, configuration keys, full function names, and type names are good — they match only relevant docs. Avoid generic short words that would match hundreds of unrelated files. If a generic term is the only identifier available for a change, include it, but prefer specific forms when they exist.
Do not skip files. Do not prioritize some files over others. Every changed file gets an entry in the checklist.
4. Search docs for every identifier
Write a shell script that takes the identifiers from step 3 and greps for each one across the documentation files from step 2. Run the script in a single Bash call:
for id in "identifier1" "identifier2" "identifier3"; do
matches=$(grep -rlFi "$id" <doc_files> 2>/dev/null)
if [ -n "$matches" ]; then
echo "MATCH: $id -> $matches"
fi
doneInclude every identifier from every checklist entry in the for
loop. The script handles the searching mechanically — no identifiers
are skipped.
From the script output, collect all matched doc files into a candidate list.
5. Evaluate candidates (two passes)
Pass 1 — Quick scan. For each candidate, view only the lines
that matched the grep (use grep -n to see them in context). Based
on the matching lines alone, give a quick verdict:
- path/to/doc.md -> possibly stale (describes behavior that changed)
- path/to/other.md -> not stale (mentions identifier in passing)Every candidate must have a verdict. Do not skip candidates.
Pass 2 — Deep read. Only for candidates marked "possibly stale" in pass 1. Read the full file alongside the relevant section of the diff. Confirm whether the doc is actually stale. Check the file header for auto-generation markers — if the file is generated from source, skip it.
When evaluating:
- Only flag docs whose content is now incorrect. A doc that mentions an identifier is not stale if the described behavior is unchanged. It is stale only if the behavior, signature, or semantics changed in a way that makes the doc misleading.
- Do not flag changelog entries or release notes that describe past releases. Historical entries are not stale because the code evolved.
6. Review beyond grep results
This step catches stale references that grep cannot find because documentation often uses prose names that differ from code identifiers, and new code introduces identifiers that don't exist in any doc yet.
Always read the repository's README. Also read any main index or overview files at the root of doc directories. Read each file fully and compare it against the diff. Determine whether it describes any behavior, flow, or feature that the code changes affected. If it does, add it to the list of confirmed stale docs.
Also scan the discovered documentation files for any that may cover the same area as the changed code, based on your understanding of what the diff does. You don't need to read every file — use file names and paths to decide which ones are worth checking.
7. Update confirmed stale docs
For each doc confirmed stale:
- Read the full file
- Update the documentation so it accurately reflects the new code
- Preserve the file's existing format, style, and structure
8. Present changes for review
Do not commit automatically. Instead, present the user with a summary of every file you updated and what changed in each one. Let the user review the changes and decide whether to commit.
9. Output
If docs were updated:
DOCS_UPDATED
Updated:
- [path/to/doc.md] Brief description of what was updated and why
- [path/to/other.rst] Brief descriptionIf no docs needed updating:
NO_DOCS_UPDATEDIf no doc files found:
NO_DOCS_FOUNDConstraints
- Only change what the diff affects. Fix stale content and add new information that the diff introduced to existing docs. Do not improve, restructure, or reformat documentation that is unrelated to the code change.
- Do not update historical entries. Changelog and release note entries for past releases are not stale — they describe what happened at that point in time.
- Skip auto-generated files. Do not edit files that are generated from source. They should be regenerated, not manually patched.
- Update existing files only. Do not create new doc files from scratch.
- Preserve format. Match the existing file's formatting conventions (heading style, list style, code block syntax, etc.).
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
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.

