update-docs
Skill0 starsChanged 4 months agoMITView on GitHub
Keep the docs/ directory of a repository small and true after a change. Find the docs that a change makes wrong, update the docs that earn their place, and delete the docs that only repeat the code. Use this skill when a feature or a behavior change is complete, before you commit or open a pull request, and when the user says "update the docs", "check the docs", "are the docs still accurate", "the docs are stale", or "document this change". Also use it when the user asks what to do with a docs/ directory that no longer agrees with the code, or when you changed a file that the related_files frontmatter of a doc lists. Do NOT use it for refactors that change no behavior, for test-only changes, or for config and dependency updates, because no doc can be wrong if no behavior changed. Do NOT use it to write new documentation from nothing, to rewrite a README, or to generate API reference text.
92 other projects use a version of this.
Adopted by
Most recently taken up by
- DGouron/review-flowtheir own version, first seen Nov 29, 2026
- Blaeste/claude-skillstheir own version, first seen Nov 29, 2026
- carriegale2710/skills-librarytheir own version, first seen Nov 29, 2026
- jessepinkman9900/claude-second-braintheir own version, first seen Nov 28, 2026
- aspectly-labs/Mikkatheir own version, first seen Nov 22, 2026
- caipe-io/ai-platform-engineeringtheir own version, first seen Nov 18, 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
GoogleSkillpr-creator
Also in 6 projects that use this
- +1 more from TheKREATORS
- +1 more from saffron-health
Other versions92 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 92
- vercel/next.js★ 144ksame name
- pipecat-ai/pipecat★ 18ksame name
- anyproto/anytype-ts★ 9.2ksame name
- vladmandic/sdnext★ 7.4ksame name
- dotnet/sdk★ 3.3ksame name
- meta-pytorch/OpenEnv★ 2.9ksame name
- huggingface/OpenEnv★ 2.9ksame name
- man-group/ArcticDB★ 2.7ksame name
- fabro-sh/fabro★ 1.9ksame name
- peteonrails/voxtype★ 1.8ksame name
82 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 repositoryOne other file it gives its agents.
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 8 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 87 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Read the change. Then keep docs/ small: update what earns its place, delete what repeats the code.
- Distinctive: line 18
Only three kinds of doc survive.
- Distinctive: line 27
Every other doc is a second copy of the code, and no test protects it.
- Distinctive: line 33
Ask these questions about each doc, in this order:
- Very specific: line 47
Every sentence repeats auth/login.py, and the expiry is already wrong.
- Distinctive: line 62
Changed files: Run both commands. The usual case for this skill is a complete feature that nobody committed yet, and git diff alone finds …
- Very specific: line 74
Affected docs: Read the frontmatter of each docs//*.md file in full, from the opening --- to the closing ---.
- Very specific: line 108
Search the repository for links to the doc, docs/CLAUDE.md included.
- Distinctive: line 109
Delete the file, or delete the section.
- Very specific: line 110
Delete the entry in docs/CLAUDE.md.
- Distinctive: line 113
Read the full doc and the changed code.
- Distinctive: line 114
Delete what a reader can get from the source.
- Distinctive: line 116
Keep the style of the doc.
- Very specific: line 118
Backfill: Add name, description, kind, and related_files from the content of the doc.
- Very specific: line 122
Create: Write the frontmatter below, then add an entry to docs/CLAUDE.md.
“Common” is measured: kept by at least 6 in 10 of the 87 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
Read the change. Then keep docs/ small: update what earns its place, delete
what repeats the code.
Why deletion is the default
A doc is not executable and no test covers it, so it drifts. If a doc and the code disagree, the next reader has two sources of truth and no way to find the stale one. This reader can be a person or an agent. A deleted doc costs the reader nothing. A wrong doc sends the reader to a wrong decision.
Only three kinds of doc survive. Only these three say something that the code cannot say:
| Kind | Why code cannot express it |
| Decision record (ADR) | The context, the constraints, and the alternatives you rejected. Code shows the choice. Code never shows the reason. |
| Glossary | Domain terms — what "bow", "cohort", and "IC" mean in this repository. |
| Navigation guide | A thin map of the repository: which application owns what, and where to start to read. Pointers only, no behavior. |
Every other doc is a second copy of the code, and no test protects it. This includes API walkthroughs, step-by-step flows, field-by-field tables, and code copied from the source.
Delete-first checklist
Ask these questions about each doc, in this order:
- Can a reader get this from the code? → Delete the doc, or delete the section.
- Is this an ADR, a glossary, or a navigation guide? → Keep it and update it.
- Does this doc exist because the code is unclear? → The correct fix is a better name, a smaller module, or a docstring. Recommend that fix in the summary. Do not change unrelated source code in a docs pass.
- Does this doc repeat CLAUDE.md? → CLAUDE.md wins. Delete the doc.
Judge a doc by its content, never by its metadata. A doc with no kind field
needs a kind value. The doc does not need deletion.
Two examples
Deleted. docs/auth-flow.md says: "The login endpoint accepts email and
password, calls verify_password(), then issues a JWT with a 24h expiry."
Every sentence repeats auth/login.py, and the expiry is already wrong. The
expiry is 1h now. The doc holds no decision, no term, and no pointer. Delete the
file. The code is the documentation.
Kept and trimmed. docs/adr-004-sessions.md covers the same subject with
different content: "We chose stateless JWTs and not server-side sessions,
because the API runs on ephemeral workers with no shared store. The cost: we
cannot revoke a token before it expires, so the expiry is short." That reason is
in no source file. Keep the doc. If the ADR also shows the token payload as
code, delete the code and keep the argument.
Phase 1: Detect
First find what changed. Then find what the change makes wrong.
Changed files. Run both commands. The usual case for this skill is a
complete feature that nobody committed yet, and git diff alone finds nothing:
git diff origin/main...HEAD --name-only # committed on this branch
git status --porcelain # staged, unstaged, untrackedOn main, or if origin/main does not exist, run git diff HEAD~5 --name-only
instead. Tell the user, because 5 commits is a guess. Use a wider range if the
work is older.
Affected docs. Read the frontmatter of each docs/**/*.md file in full,
from the opening --- to the closing ---. A related_files list often holds
20 paths or more. A truncated read misses matches and gives no warning. Match
the changed paths against related_files. Match the directory entries also.
Most repositories do not use this frontmatter yet. If a doc has no
related_files, or if no doc in the repository has it, do not report that there
is no work. Read the docs and match them by content: module names, symbol names,
paths, and commands in the prose. A first run on a repository with no
frontmatter gives a long backfill list. This result is correct. The skill
adds the convention on the first run.
Then apply the delete-first checklist to each matched doc.
Scale the work to the size of the repository. For 20 docs or fewer, read them
yourself. For more, give each subagent one part of docs/ and ask for the same
four lists. The docs are independent, and you do not need their content in your
context.
Report four lists. Omit an empty list. If all four lists are empty, tell the user and stop.
- update — the path, and one line on why the change made the doc wrong
- delete — the path (or the path and the section), and which checklist question the doc failed
- create — only for a real decision, a new term, or a gap in the navigation guide. Never to describe behavior.
- backfill — the path, and which frontmatter fields are absent or invalid
Phase 2: Apply
Warning: A deletion is the one step that the user cannot undo from your summary. Show the delete list and get confirmation before you delete anything.
Delete:
- Search the repository for links to the doc,
docs/CLAUDE.mdincluded. - Delete the file, or delete the section.
- Delete the entry in
docs/CLAUDE.md.
Update:
- Read the full doc and the changed code.
- Delete what a reader can get from the source. Keep the decisions, the terms, and the pointers.
- Update
related_files. - Keep the style of the doc.
Backfill: Add name, description, kind, and related_files from the
content of the doc. kind must be adr, glossary, or navigation. A doc
that fits none of the three goes on the delete list.
Create: Write the frontmatter below, then add an entry to docs/CLAUDE.md.
---
name: Short name
description: One line on what this doc covers and when to read it.
kind: adr | glossary | navigation
related_files:
- path/to/file.py
- path/to/directory/
---End with a summary: what you deleted, what you updated, what you created, and
why. A deleted stale doc is a better result than an updated one. Say this, so
the user sees that docs/ gets smaller on purpose.
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.

