docs
Skill81 starsChanged 7 months agoMITView on GitHub
Use when the user says: \"write docs for X\", \"update the docs\", \"add docs for this feature\", \"rewrite the testing docs\", \"outline these pages\", \"review this doc page\". Scale-aware doc writing with JTBD outlines, voice calibration, and writer/reviewer subagent pairs.
We split this skill into the rules it gives an agent
14 rules. 0 are common, 8 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 129 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Write, rewrite, or review documentation pages at any scale.
- Distinctive: line 27
If empty, ask what needs documenting.
- Distinctive: line 31
Read these files at the start of every invocation, regardless of mode or scope:
- Distinctive: line 57
If the args are ambiguous (e.g., "outline and then write"), default to full pipeline and say so.
- Distinctive: line 61
If the user named specific pages: use those.
- Very specific: line 63
If the user named a feature or topic: read .claude/rules/design-completeness.md to determine what pages are needed.
- Distinctive: line 111
When rewriting troubleshooting, operating, or migration pages, extract every log signature, timing value, error message, and runbook …
- Distinctive: line 117
If in outline only mode, stop here.
- Very specific: line 128
Read the output. Verify snippet files were created and --8<-- includes match.
- Very specific: line 134
New pages: add to mkdocs.yml nav. Create stub files first if other pages cross-link to them, so mkdocs build --strict stays green.
- Very specific: line 136
New snippet files: create alongside the page (check_paths: true requires simultaneous existence).
- Very specific: line 148
If in review only mode: run the Opus reviewer on the specified page(s), present findings to the user, and stop.
- Distinctive: line 152
Run mechanical checks scaled to the scope of work.
- Very specific: line 175
After verification passes, commit all doc changes together.
“Common” is measured: kept by at least 6 in 10 of the 129 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
Docs
Write, rewrite, or review documentation pages at any scale. Runs the same process whether the scope is one page or an entire section: JTBD outline per page, voice-calibrated Sonnet writer, Opus reviewer, mechanical quality gates.
The process was proven on the PR #970 overhaul (76 pages, 267 snippets). See references/retrospective.md for what made it work and references/prior-art-doc-ia.md for the Diataxis/JTBD research behind it.
Arguments
$ARGUMENTS -- what to write or update. Examples:
write docs for the new cache featurerewrite the testing sectionadd a recipe for presence detectionoutline the scheduler pages(outline only, skip writing)review docs/pages/core-concepts/bus/index.md(review only, skip writing)
If empty, ask what needs documenting.
Pre-flight: Calibrate Voice (always runs)
Read these files at the start of every invocation, regardless of mode or scope:
.claude/rules/voice-guide.md-- the 22 voice rules.claude/rules/doc-rules.md-- page templates, snippet conventionsreferences/docs-context-example.md-- voice calibration artifact with exemplar paths, pass/fail checklist, and top violation patterns- The exemplar page(s) matching the page type(s) being worked on:
- Concept:
docs/pages/core-concepts/bus/index.md - Recipe:
docs/pages/recipes/motion-lights.md - Reference:
docs/pages/core-concepts/bus/dependency-injection.md
- Concept:
For mixed batches, read all three exemplars.
Phase 1: Scope
Detect mode from arguments
Parse the arguments and announce the detected mode to the user before proceeding:
Detected mode:
<mode>(<reason>). Running phases:<list>.
| Trigger | Mode | Phases |
| "outline" in args, no "write"/"update" | Outline only | Phase 2 |
| "review" in args, no "write"/"update" | Review only | Phase 3 (review step only) |
| Everything else | Full pipeline | Phases 2, 3, 4 |
If the args are ambiguous (e.g., "outline and then write"), default to full pipeline and say so.
Determine page list
If the user named specific pages: use those.
If the user named a feature or topic: read .claude/rules/design-completeness.md to determine what pages are needed. Explore the codebase to understand the feature's scope. Propose a page list with:
- Page type for each (concept, recipe, getting-started, reference, migration, troubleshooting, operating, web-ui, cli)
- Nav placement in
mkdocs.yml - Whether existing pages need updates alongside new ones
Present the page list via AskUserQuestion for confirmation before proceeding, regardless of page count.
Phase 2: Outline
For each page, produce a JTBD outline before writing. The outline prevents the codebase-mirror anti-pattern (see references/prior-art-doc-ia.md).
Per-page outline process
Answer these five questions (from the Diataxis + JTBD framework):
- Page type: concept / recipe / getting-started / reference / troubleshooting / migration / operating / web-ui / cli
- Reader's job: one sentence. What is the reader trying to do when they land here?
- What the reader needs: list only what is required to complete that job. Nothing else.
- Complexity ordering: simplest case first, advanced in collapsible sections or linked pages.
- Anti-mirror check: would a user organize this page this way, or only someone who has read the source?
Outline format
# <Page Title>
**Page type:** <type>
**Reader's job:** <one sentence>
## H2: <section heading>
<1-2 sentence description of content>
## H2: <section heading>
<1-2 sentence description>
## Snippet inventory
- `snippet_name.py` -- what it demonstrates (new / keep / rewrite)
## Cross-links
- Links to: <pages this links to>
- Linked from: <pages that link here>For rewrites, note what changes from the existing page and why.
Knowledge inventory (rewrites of operational pages only)
When rewriting troubleshooting, operating, or migration pages, extract every log signature, timing value, error message, and runbook command before overwriting. These exist nowhere else in the codebase. Write the inventory to a scratch file and cross-reference it against the new outline.
Present outlines for approval
Show outlines to the user. For 1-2 pages, present inline. For 3+, summarize with one-line descriptions and offer to show any outline in detail.
If in outline only mode, stop here.
Phase 3: Write and Review
Write
For each page, use the writer prompt from references/writing-prompt-template.md.
- Fill
{{variables}}from the outline, snippet inventory, and page type. - For
{{technical_facts}}: read the relevant source files listed in the writer prompt's "Key source files" section. Extract method signatures, parameter names, and behavioral notes. Pass these as the value. - Dispatch to a Sonnet writer subagent. Use
get-skill-tmpdir docsfor the output directory. - Read the output. Verify snippet files were created and
--8<--includes match. - Copy pages and snippets to their final locations in
docs/pages/(overwrite for rewrites; create for new pages).
For batches of 3+ pages in the same section, dispatch writer subagents in parallel.
Nav and stub management:
- New pages: add to
mkdocs.ymlnav. Create stub files first if other pages cross-link to them, somkdocs build --strictstays green. - Rewrites: overwrite in place.
- New snippet files: create alongside the page (
check_paths: truerequires simultaneous existence).
Review
Send each written page to an Opus reviewer subagent using the reviewer prompt from references/writing-prompt-template.md. Fill {{page_type_checklist}} with the matching page-type checklist from the same file.
Fix loop:
- Apply MUST FIX items. Re-review if any were found.
- Apply SHOULD FIX items where they improve the page.
- Note CONSIDER items but don't act unless clearly better.
- Max 2 review iterations per page.
If in review only mode: run the Opus reviewer on the specified page(s), present findings to the user, and stop. Review-only mode does not run Phase 4 verification. Run uv run mkdocs build --strict manually if build issues are suspected.
Phase 4: Verify
Run mechanical checks scaled to the scope of work.
Always run
uv run mkdocs build --strict(0 warnings)- Pyright on new/modified snippet files
For 3+ pages, also run
- Snippet orphan check:
uv run python tools/docs/check_snippet_orphans.py - Bare symbol check:
uv run python tools/docs/check_bare_symbols.py
For 5+ pages, also run
- Cross-reference coverage:
uv run python tools/docs/check_xref_coverage.py - Link checker: build site then run muffet
Voice spot-check (5+ pages)
Sample 2-3 pages and check against the page-type checklists in references/writing-prompt-template.md. If >1 finding per sampled page, sweep the rest.
Commit
After verification passes, commit all doc changes together. Use docs: commit type for user-facing documentation. Use chore: for internal-only changes.
Other versions161 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 161
- remotion-dev/remotion★ 70ksame name
- jlowin/fastmcp★ 28ksame name
- PrefectHQ/fastmcp★ 28ksame name
- ccusage/ccusage★ 19ksame name
- ryoppippi/ccusage★ 19ksame name
- micronaut-projects/micronaut-core★ 6.4ksame name
- latitude-dev/latitude-llm★ 4.7ksame name
- samuelgursky/davinci-resolve-mcp★ 3.9ksame name
- TanStack/ai★ 3.3ksame name
- patrykandpatrick/vico★ 3.2ksame name
151 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.
Used alongsideProjects with it also use build-fix, work 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.
diego-tobalinaSkillbuild-fix
Fix build and compilation errors systematically. Run when build fails.
Also in 3 projects that use this
vbrevikSkillwork
Use when the user says 'plan', 'todo', 'copy plan', 'append plan', 'resume plan', 'priorities', or 'what's next'.
Also in 8 projects that use this
MicrosoftSkillperf
Speed and memory performance rules for Rust crates, the Node addon, webui-framework, and webui-router.
Also in 3 projects that use this
AWSSkillissue
Implement a GitHub issue end-to-end — branch, code, test, docs, and commit.
Also in 5 projects that use this
Google CloudSkillfix
Plan a remediation strategy after a test failure.
Also in 7 projects that use this
AnthropicSkilldebug
Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "something broke after the deploy", or when behavior diverges from expected and the cause isn't obvious.
Also in 18 projects that use this
In this repository10 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- doc-accuracy-reviewSkill
- doc-coverage-reviewSkill
- doc-persona-reviewSkill
- ha-version-bumpSkill
- review-autofixesSkill
- triage-autofix-issuesSkill
- triage-medium-issuesSkill
- ui-qaSkill
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.

