Writing web documentation
Use this skill when the user wants excellent technical documentation for a web project, not merely "some text around the code." The job is to produce documentation that is easy to enter, easy to scan, easy to trust, and easy to maintain.
Good documentation is not a dump of product facts. It is a guided path through the product for a reader with a specific goal.
What this skill optimizes for
Fast first success
A new reader should reach a working result quickly.
Clear routing by intent
A beginner learning the product and an expert checking an option should not have to fight the same page.
Low ambiguity
Commands, file names, versions, prerequisites, expected outcomes, and failure states should be explicit.
Scannability
Busy developers skim before they read. Headings, intros, lists, tables, and code blocks should make the page navigable at a glance.
Maintenance
Docs should age gracefully, be easy to update with code changes, and make stale information obvious.
Non-goals
Do not optimize for:
- hype
- marketing language
- exhaustive background on every page
- showing every supported variation in the first document
- clever prose
- giant code dumps with little explanation
First decide: what kind of page is this?
Never draft before choosing the page type. Keep page types distinct.
README or docs landing page
Use for orientation and routing.
- Answer: What is this? Who is it for? Where do I start?
- Keep it short.
- Push deep detail into child pages.
Quickstart
Use for the fastest happy path to a working result.
- One path.
- One main environment.
- Minimal branching.
- Clear prerequisites and a visible success state.
Tutorial
Use to teach by doing.
- The reader builds something meaningful.
- Include checkpoints and a recap.
- Explain enough for learning, not enough for encyclopedia coverage.
How-to guide
Use to solve one concrete problem.
- Assumes the reader already knows the basics.
- Focus on outcome, not background theory.
Reference
Use to answer precise factual questions.
- Syntax, options, defaults, parameters, return values, events, errors, limits, compatibility.
- Dry, complete, easy to scan.
Explanation / concept page
Use to build mental models.
- Why the system works this way.
- Architecture, trade-offs, invariants, decision rules.
- Link outward to task docs and reference docs.
Troubleshooting page
Use to diagnose problems by symptom.
- Symptom -> likely cause -> fix -> verify -> prevention.
Migration guide
Use when versions, APIs, or architecture change.
- Make breakage explicit.
- Show before/after.
- Give a safe order of operations.
- Include rollback guidance when relevant.
The default workflow
Follow this workflow unless the user asks for something narrower.
1) Identify the reader and job
Infer or state:
- reader type: beginner, experienced user, maintainer, integrator, API consumer, platform engineer
- task: learn, set up, integrate, customize, debug, migrate, deploy, contribute
- environment: framework, runtime, package manager, OS, browser, hosting target
- success state: what the reader should be able to do after finishing
If any important fact is missing, do not block forever. Make the narrowest reasonable assumption and label it clearly.
2) Inventory facts before prose
Collect the facts that often go stale:
- package names
- install commands
- runtime and framework versions
- supported browsers or environments
- environment variables
- URLs, endpoints, ports, callback paths
- permissions, auth requirements, keys, tokens
- build, test, and deploy commands
- breaking changes or constraints
If you cannot verify a fact, avoid inventing it. Use a clearly marked placeholder or assumption.
3) Build the page skeleton first
Before writing full paragraphs, create a skeleton with the exact sections the page needs.
Preferred order:
- context
- prerequisites
- steps or body
- verification / expected result
- next steps / related pages
4) Write for the first successful run
Every task page should help the reader get one successful outcome as early as possible.
That means:
- front-load the shortest working path
- minimize branching
- postpone advanced options
- prefer one package manager and one framework unless the project truly supports several first-class entry points
- show what success looks like
5) Make examples runnable
Examples should be copy-pasteable or easy to adapt.
- Use real filenames and realistic directories.
- Label code fences.
- Keep examples minimal but complete.
- Add comments only where they remove ambiguity.
- If a command is destructive or billable, warn first.
- Show expected output or visible result after important steps.
6) Tighten the prose
After the draft exists:
- shorten intros
- split long paragraphs
- convert vague headings into task-based headings
- remove duplicated explanation
- move theory out of procedural pages
- move detail out of landing pages
7) Run the review checklist
Use assets/review-checklist.md before delivering.
Reference files
Load these on demand based on current task:
| Reference |
Purpose |
| references/house-style.md |
Voice, sentence style, headings, length targets, page-type patterns |
| references/web-project-rules.md |
Web-project checklists, code example rules, anti-patterns, accessibility, docs-as-code |
| references/research-notes.md |
Research synthesis from strong documentation sites and style guides |
DO NOT load all files at once. Load only what's relevant to your current task.
How to respond in common task modes
When asked to write a page from scratch
Deliver:
- the appropriate page type
- a polished Markdown draft
- clearly marked assumptions if any important facts are unknown
When asked to improve existing docs
Do this in order:
- identify the current page type
- remove mixed modes
- tighten structure
- rewrite for clarity
- preserve technical meaning
- call out factual gaps or staleness risks
When asked to review docs
Return:
- the page type
- the top issues in priority order
- exact rewrite suggestions
- missing sections
- any staleness or trust issues
When asked to design a docs site
Return:
- audience segments
- entry points
- page types needed
- sitemap
- priority order for authoring
- gaps and risks
Files in this skill
assets/documentation-brief-template.md — collect facts before writing
assets/docs-ia-template.md — structure a docs site or section
assets/docs-home-template.md — landing page skeleton
assets/readme-template.md — README skeleton
assets/quickstart-template.md — happy-path setup guide
assets/tutorial-template.md — learning-by-doing guide
assets/how-to-template.md — task-focused guide
assets/reference-template.md — API/reference skeleton
assets/explanation-template.md — mental-model page
assets/troubleshooting-template.md — symptom-first troubleshooting
assets/migration-guide-template.md — upgrade/migration page
assets/review-checklist.md — final quality gate
references/house-style.md — voice, length targets, page-type patterns
references/web-project-rules.md — web-project checklists, code rules, anti-patterns
references/research-notes.md — why these rules exist
Final instruction
The best documentation pages feel easy because the writer made a hundred careful choices for the reader:
- what belongs on this page
- what does not
- what comes first
- what to cut
- what to verify
- what to explain
- what to defer
Make those choices deliberately.
1---2name: writing-web-documentation3description: Write, rewrite, review, and organize developer-facing documentation for web software projects. Use when creating or improving README files, docs homepages, quickstarts, tutorials, how-to guides, API/reference pages, conceptual explanations, migration guides, or troubleshooting content for frontend, backend, full-stack, SDK, API, or framework-based web products. This skill applies strong information architecture, task-first page structure, clear voice, runnable examples, version and prerequisite hygiene, accessibility rules, and docs-as-code maintenance habits. Do not use it for marketing copy, legal text, or non-technical customer-support articles.4license: MIT5---6
7# Writing web documentation
8
9Use this skill when the user wants excellent technical documentation for a web project, not merely "some text around the code." The job is to produce documentation that is easy to enter, easy to scan, easy to trust, and easy to maintain.
10
11Good documentation is not a dump of product facts. It is a guided path through the product for a reader with a specific goal.
12
13## What this skill optimizes for
14
151. **Fast first success**
16 A new reader should reach a working result quickly.
17
182. **Clear routing by intent**
19 A beginner learning the product and an expert checking an option should not have to fight the same page.
20
213. **Low ambiguity**
22 Commands, file names, versions, prerequisites, expected outcomes, and failure states should be explicit.
23
244. **Scannability**
25 Busy developers skim before they read. Headings, intros, lists, tables, and code blocks should make the page navigable at a glance.
26
275. **Maintenance**
28 Docs should age gracefully, be easy to update with code changes, and make stale information obvious.
29
30## Non-goals
31
32Do **not** optimize for:
33
34- hype
35- marketing language
36- exhaustive background on every page
37- showing every supported variation in the first document
38- clever prose
39- giant code dumps with little explanation
40
41## First decide: what kind of page is this?
42
43Never draft before choosing the page type. Keep page types distinct.
44
45### README or docs landing page
46
47Use for orientation and routing.
48
49- Answer: What is this? Who is it for? Where do I start?
50- Keep it short.
51- Push deep detail into child pages.
52
53### Quickstart
54
55Use for the fastest happy path to a working result.
56
57- One path.
58- One main environment.
59- Minimal branching.
60- Clear prerequisites and a visible success state.
61
62### Tutorial
63
64Use to teach by doing.
65
66- The reader builds something meaningful.
67- Include checkpoints and a recap.
68- Explain enough for learning, not enough for encyclopedia coverage.
69
70### How-to guide
71
72Use to solve one concrete problem.
73
74- Assumes the reader already knows the basics.
75- Focus on outcome, not background theory.
76
77### Reference
78
79Use to answer precise factual questions.
80
81- Syntax, options, defaults, parameters, return values, events, errors, limits, compatibility.
82- Dry, complete, easy to scan.
83
84### Explanation / concept page
85
86Use to build mental models.
87
88- Why the system works this way.
89- Architecture, trade-offs, invariants, decision rules.
90- Link outward to task docs and reference docs.
91
92### Troubleshooting page
93
94Use to diagnose problems by symptom.
95
96- Symptom -> likely cause -> fix -> verify -> prevention.
97
98### Migration guide
99
100Use when versions, APIs, or architecture change.
101
102- Make breakage explicit.
103- Show before/after.
104- Give a safe order of operations.
105- Include rollback guidance when relevant.
106
107## The default workflow
108
109Follow this workflow unless the user asks for something narrower.
110
111### 1) Identify the reader and job
112
113Infer or state:
114
115- reader type: beginner, experienced user, maintainer, integrator, API consumer, platform engineer
116- task: learn, set up, integrate, customize, debug, migrate, deploy, contribute
117- environment: framework, runtime, package manager, OS, browser, hosting target
118- success state: what the reader should be able to do after finishing
119
120If any important fact is missing, do **not** block forever. Make the narrowest reasonable assumption and label it clearly.
121
122### 2) Inventory facts before prose
123
124Collect the facts that often go stale:
125
126- package names
127- install commands
128- runtime and framework versions
129- supported browsers or environments
130- environment variables
131- URLs, endpoints, ports, callback paths
132- permissions, auth requirements, keys, tokens
133- build, test, and deploy commands
134- breaking changes or constraints
135
136If you cannot verify a fact, avoid inventing it. Use a clearly marked placeholder or assumption.
137
138### 3) Build the page skeleton first
139
140Before writing full paragraphs, create a skeleton with the exact sections the page needs.
141
142Preferred order:
143
144- context
145- prerequisites
146- steps or body
147- verification / expected result
148- next steps / related pages
149
150### 4) Write for the first successful run
151
152Every task page should help the reader get one successful outcome as early as possible.
153
154That means:
155
156- front-load the shortest working path
157- minimize branching
158- postpone advanced options
159- prefer one package manager and one framework unless the project truly supports several first-class entry points
160- show what success looks like
161
162### 5) Make examples runnable
163
164Examples should be copy-pasteable or easy to adapt.
165
166- Use real filenames and realistic directories.
167- Label code fences.
168- Keep examples minimal but complete.
169- Add comments only where they remove ambiguity.
170- If a command is destructive or billable, warn first.
171- Show expected output or visible result after important steps.
172
173### 6) Tighten the prose
174
175After the draft exists:
176
177- shorten intros
178- split long paragraphs
179- convert vague headings into task-based headings
180- remove duplicated explanation
181- move theory out of procedural pages
182- move detail out of landing pages
183
184### 7) Run the review checklist
185
186Use `assets/review-checklist.md` before delivering.
187
188## Reference files
189
190Load these on demand based on current task:
191
192| Reference | Purpose |
193| ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
194| **[references/house-style.md](references/house-style.md)** | Voice, sentence style, headings, length targets, page-type patterns |
195| **[references/web-project-rules.md](references/web-project-rules.md)** | Web-project checklists, code example rules, anti-patterns, accessibility, docs-as-code |
196| **[references/research-notes.md](references/research-notes.md)** | Research synthesis from strong documentation sites and style guides |
197
198**DO NOT load all files at once.** Load only what's relevant to your current task.
199
200## How to respond in common task modes
201
202### When asked to write a page from scratch
203
204Deliver:
205
2061. the appropriate page type
2072. a polished Markdown draft
2083. clearly marked assumptions if any important facts are unknown
209
210### When asked to improve existing docs
211
212Do this in order:
213
2141. identify the current page type
2152. remove mixed modes
2163. tighten structure
2174. rewrite for clarity
2185. preserve technical meaning
2196. call out factual gaps or staleness risks
220
221### When asked to review docs
222
223Return:
224
225- the page type
226- the top issues in priority order
227- exact rewrite suggestions
228- missing sections
229- any staleness or trust issues
230
231### When asked to design a docs site
232
233Return:
234
235- audience segments
236- entry points
237- page types needed
238- sitemap
239- priority order for authoring
240- gaps and risks
241
242## Files in this skill
243
244- `assets/documentation-brief-template.md` — collect facts before writing
245- `assets/docs-ia-template.md` — structure a docs site or section
246- `assets/docs-home-template.md` — landing page skeleton
247- `assets/readme-template.md` — README skeleton
248- `assets/quickstart-template.md` — happy-path setup guide
249- `assets/tutorial-template.md` — learning-by-doing guide
250- `assets/how-to-template.md` — task-focused guide
251- `assets/reference-template.md` — API/reference skeleton
252- `assets/explanation-template.md` — mental-model page
253- `assets/troubleshooting-template.md` — symptom-first troubleshooting
254- `assets/migration-guide-template.md` — upgrade/migration page
255- `assets/review-checklist.md` — final quality gate
256- `references/house-style.md` — voice, length targets, page-type patterns
257- `references/web-project-rules.md` — web-project checklists, code rules, anti-patterns
258- `references/research-notes.md` — why these rules exist
259
260## Final instruction
261
262The best documentation pages feel easy because the writer made a hundred careful choices for the reader:
263
264- what belongs on this page
265- what does not
266- what comes first
267- what to cut
268- what to verify
269- what to explain
270- what to defer
271
272Make those choices deliberately.