Write, restructure, or review documentation — tutorials, how-to guides, reference pages, concept/explanation docs, API references, READMEs, changelogs, release notes, and troubleshooting guides. Distills documentation craft from Mintlify's guides (compiled from technical writers at Stripe, GitHub, Amplitude, and Anaconda), the Diátaxis framework (including the compass and per-type voice), the Google and Microsoft style guides, Every Page Is Page One, Write the Docs, and Docs for Developers: audience analysis, content-type selection, style and word-level rules, procedure writing, structure for humans and AI agents, code-example standards, page templates (templates.md), mechanical enforcement and llms.txt (mechanics.md), maintenance, and success metrics. Use this skill when the user asks to "write docs", "document this feature", "improve this page", "review these docs", "write a tutorial / how-to / reference page", "structure the docs", "write API documentation", "write a README / changelog", or when authoring
Documentation craft distilled for the moment of writing. The core stance:
people don't read docs for fun; they arrive with a goal — and they read at
most ~20–28% of the words on a page (NN/g). Every rule below serves getting
the reader from arrival to accomplished goal with minimum friction — and the
same properties that serve a skimming human serve an AI agent reading the page.
Companion files, read on demand:
templates.md — page skeletons + quality bars for how-to, tutorial,
reference, concept, README, changelog, release notes, and troubleshooting
pages.
mechanics.md — mechanical enforcement (Vale, markdownlint, link checking,
testing code examples) and the llms.txt format.
1. The seven principles that override default writing intuitions
Writing docs is not writing prose. These override what generic "good writing"
instincts would suggest:
Verify before you document. Never document behavior you haven't executed,
observed, or read in the source. LLM-written docs fail here in characteristic
ways: plausible flags that don't exist, documented intent instead of actual
behavior, invented defaults, hedged claims papering over unchecked ones. If
you can't run it, read the code that implements it; if you can do neither,
mark the claim unverified rather than asserting it. This is the docs analogue
of skmtc-debug's verify-first stance.
One page, one content type, one persona. Decide before drafting whether
the page is a tutorial, how-to, reference, or explanation (§3), and who it's
for (§2). "Writing for multiple audiences leads to compromises that satisfy
no one." A page that teaches AND exhaustively catalogs AND justifies design
does none of them well.
Lead with the answer, not the context. Readers scan in an F-pattern and
abandon pages whose opening doesn't confirm what the title promised. Put the
outcome or instruction in the first paragraph; front-load the
information-carrying words in headings. A reader should be able to leave
after the first paragraph having gotten what they came for.
The curse of knowledge is the default failure mode. You know how
everything works; the reader doesn't. State prerequisites explicitly, define
acronyms on first use, never assume internal conventions (naming schemes,
auth flows, team shorthand) are known. Validate against real evidence —
support tickets, friction logs, user questions — not assumptions. Test: could
someone who joined yesterday follow this?
Every page is page one. Readers arrive from search engines, deep links,
and AI retrieval — never at your table of contents. Each page must establish
its own context (what it covers, who it's for, what it assumes) in its
opening. Reading-order dependencies ("as mentioned above", "in the previous
section") are forbidden; link to supporting material instead.
Code examples are load-bearing, not decorative. Many readers only read
the code blocks. Every example must be complete and runnable as-copied —
imports, setup, the call, response handling. "A code example is worth a
thousand words."
Wrong docs are worse than no docs. "Consider incorrect documentation to
be worse than missing documentation" (Write the Docs). Outdated or misleading
content wastes users' time and erodes trust in the whole product. When you
can't maintain a page, delete it — removal often serves users better than
retention.
2. Know your audience
Center the reader's goal, not the product's feature list.
Pick one primary persona per page. The AI-agent persona is served by the
same properties that serve skimming humans — clear headings, semantic markup,
defined terms, runnable examples — so it rarely needs separate pages, but it
does raise the bar on explicitness (§6).
Defeating the curse of knowledge
Talk to users (or their proxies: support, UX research, product). Harvest the
terminology they actually use — it often differs from internal naming, and
it's what they'll search for.
Keep a friction log: use the product as a new user would and record every
step — expected vs. actual, every confusion, workaround, and surprise. Each
entry is either a docs fix or a product bug; file it as one or the other.
(This ecosystem already runs one at docs/friction-log/.)
Use the five W's to define a page's scope before writing: who is this for,
what will they accomplish, why would they need it, where/when does it apply —
then how.
Embed with support: recurring tickets are a ranked list of doc gaps.
Test docs by asking an AI assistant product questions and seeing whether the
docs let it answer correctly — a cheap proxy for "does the page carry its own
context".
Assume the reader is qualified for the page's task; don't explain basics
inline. Give unqualified readers enough context to recognize they're on the
wrong page, plus a link to where they can qualify themselves — a page "can't
bring every possible reader up to speed without becoming a textbook."
Don't over-document niche edge cases in guides; route those to community
channels and keep guides focused on majority paths. (Reference is different —
see §3: exhaustive within its scope.)
3. Content types (Diátaxis)
Four types, distinguished by what the reader is trying to do. Assign each page
exactly one type before drafting.
Type
Reader's goal
Reader's mode
Structure
Voice
Tutorial
"Teach me by doing"
Study
Linear steps, guaranteed outcome
Guiding: "we", first person plural
How-to guide
"Solve my specific problem"
Work
Problem → solution steps, may branch
Direct, conditional imperatives
Reference
"Give me the precise fact"
Work
Scannable catalog, consistent format
Neutral, terse, austere
Explanation
"Help me understand why"
Study
Discursive, conceptual
Reflective, comparative
The compass — when the type is unclear
Ask two questions about the content (works at page, section, or sentence level):
Does it inform action (doing) or cognition (thinking)?
Does it serve acquisition of skill (study) or application of skill
(work)?
Type is function, not difficulty. An advanced course is still a tutorial (a
lesson, safely in the instructor's hands); a trivial one-step procedure is still
a how-to (a worker's task). "Beginner content = tutorial, advanced content =
how-to" is Diátaxis's most common and most harmful misreading — classify by
study-vs-work, never by difficulty.
Navigation should mirror the split: Getting Started → Guides → Reference →
Concepts. The SKMTC docs tree instantiates this as using/tutorials/ +
using/how-to/ + using/recipes/, authoring/ (same trio), reference/, and
concepts/ + explanation/. Recipes are how-to guides in recipe form — the
recipe is Diátaxis's own model for the type (assumes competence, answers one
specific question, no teaching). The four types classify needs, not directory
names; a section may be named anything so long as each page serves one need
well.
Writing rules per type
Tutorials — learning-oriented:
Open by stating exactly what the reader will have built/achieved at the end.
First person plural, teacher's voice: "In this tutorial, we will…";
unambiguous imperatives: "First, do x. Now, do y."
Every step delivers a visible result, and the text names it: "The output
should look something like…" — checkpoints let readers self-verify they're on
track.
Small incremental steps; a tutorial "doesn't offer choices or alternatives" —
one carefully-managed path.
Teach through experience, not explanation — link to explanation docs rather
than digressing: "We must do x before y because… (see [explanation] for
details)."
Must work every time: "so well constructed that things can't go wrong" — a
tutorial that fails at step 4 loses the user, possibly permanently. Expect
high maintenance cost as the product evolves.
How-to guides — task-oriented:
Title is the task in the user's words ("Skip operations for one generator"),
not the feature's name.
Conditional imperatives carry the branching: "If you want x, do y. To
achieve w, do z." (Tutorials never branch; how-tos usually do.)
About goals, not machinery: address the real-world task, not a walkthrough of
the tool's controls.
Assume foundational knowledge; state the specific prerequisites, then skip the
obvious steps.
"Practical usability is more helpful than completeness" — only the context
necessary for this task; offload option inventories to reference: "Refer to
the x reference for a full list."
Reference — information-oriented:
"Austere and uncompromising": describe, and only describe. Neutral statement
of fact; no instruction, no rationale.
Structure mirrors the product's structure, and entry order mirrors the source
of truth, so drift is visible.
Maximize scannability: tables, identical per-entry format, parallel phrasing,
one naming convention across every entry.
Copy-paste-ready examples per entry (examples illustrate without explaining —
they're welcome); required vs. optional marked explicitly; constraints and
defaults stated, not just the name restated.
Exhaustive within its declared scope — a reference that omits entries is
broken in a way a how-to never is.
Explanations — understanding-oriented:
The "About" test: an explanation title should tolerate an implicit "About …"
prefix ("About user authentication"). If it can't, the page probably isn't
explanation.
Cover design decisions, constraints, and the alternatives that were rejected
(and why).
Opinion is allowed and required here: explanation "can and must consider
alternatives, counter-examples or multiple different approaches."
Explanation "tends to absorb other things" — expel instruction and technical
description to their proper homes.
Type-mixing smells
A tutorial that pauses for three paragraphs of rationale → move the rationale
to an explanation doc, link it.
A tutorial offering choices ("you could also use…") → cut; one path.
A reference entry with step-by-step setup → extract a how-to.
A how-to that exhaustively lists every option → extract reference material,
keep only the options the task needs.
A how-to that keeps stopping to teach → trust the reader's competence; link
the tutorial instead.
Time-sensitive content (release notes, announcements) in evergreen docs →
belongs in a changelog or blog (see templates.md).
Scoped exception — API reference surfaces. Reference pages for an HTTP API
may deliberately blend the catalog with per-language samples, request/response
pairs, and short usage notes (the Stripe pattern, §8). That blend is confined to
the API reference surface; docs-tree pages keep one type each.
Applying Diátaxis incrementally
Don't restructure top-down into four empty boxes and shovel content in —
"Diátaxis changes the structure of your documentation from the inside." The
loop: choose something small; assess what user need it serves and how well;
decide on a single next action; do it and publish immediately. Documentation is
never finished — but at every moment it can be complete: useful, correct,
and coherent at its current scope. Never hold back an improvement waiting for
"done".
4. Style and tone
Cut ruthlessly — within a section. Every unnecessary word taxes a reader
who is there to get something done. But brevity governs sentences and
paragraphs; explicitness governs boundaries: restating context at a page
or section opening is not filler — it's the entry point for a reader (or
retrieval chunk) landing there (§1.5). Cut words, not context.
Active voice, imperative mood. "Create a file", not "a file should be
created".
Second person. "You" — the doc serves the reader's task. (Exception:
tutorials use "we" — §3.)
Short paragraphs (2–4 sentences), meaningful headings, lists for
enumerable things, tables for structured facts.
One term per concept, everywhere. "API key" and "API token" used
interchangeably reads as two different things. Pick one; grep for the other
(enforceable with a Vale consistency rule — mechanics.md).
Don't narrate the obvious. "Click Save to save" is negative value.
Document what isn't intuitive.
Spelling and grammar are trust signals. Errors in the docs read as errors
in the product.
Word-level rules (bad → good)
The high-leverage subset of the Google and Microsoft style guides — rules a
fluent writer (or LLM) gets wrong by default:
Delete "simply", "easily", "just", "obviously", "of course". What's easy
for the writer isn't for the reader; the sentence survives without them.
"Simply run the installer" → "Run the installer."
No "please" in instructions. "Please click Save" → "Click Save."
Present tense for product behavior; never "will" or "would". "The server
will send an acknowledgment" → "The server sends an acknowledgment."
Timeless docs: ban "currently", "new", "now", "soon", "as of this writing",
"latest", "old", "eventually". "The emulator now supports filters" → "The
emulator supports filters." If "new" is unavoidable, anchor it to a date.
Exception: changelogs and release notes.
No anthropomorphism. Software doesn't want, think, see, know, or care.
"The PC sees a new device" → "The PC detects a new device."
"may" = permission only; "might" = possibility; "can" = ability. "The call
may fail" → "The call might fail."
"should" is ambiguous — use "must" for requirements; rewrite
recommendations as "we recommend" or a direct imperative.
Spell out Latin abbreviations: "e.g." → "for example", "i.e." → "that is";
avoid "etc." (finish the list or use "such as").
"allows you to" / "enables you to" → "lets you" — or make the reader the
subject: "The API allows you to filter results" → "Filter results with…".
"in order to" → "to"; "utilize"/"leverage" → "use".
Start instructions with the verb — kill "You can…" and "There is/are…"
openers. "You can access the settings from…" → "Open the settings from…".
Sentence-style capitalization for all headings. Never Title Case. Oxford
comma always. Contractions are fine.
"select" for UI interaction (not "click"/"tap" — accurate for keyboard,
touch, and assistive tech); select/clear checkboxes (never
"check"/"uncheck").
Never inflect code identifiers — attach a noun and inflect that: "Nodes"
→ "Node objects"; "ADDRESS's value" → "the ADDRESS constant's value".
Place "only" immediately before the word it modifies: "Only request one token"
→ "Request only one token."
No noun stacks (max two nouns as modifiers), no phrasal verbs where a single
verb exists, no idioms, colloquialisms, humor, or culture-bound references.
Dates: spell out the month ("January 19, 2026") or ISO 8601 (2026-01-19);
never 04/15/17; never seasons.
Lean on the Google or Microsoft style guide for the long tail; automate
enforcement with Vale in CI (mechanics.md) rather than relitigating style in
review.
5. Writing procedures
Step sequences have their own mechanics (Google/Microsoft procedure rules):
Numbered list; one action per step. Combine actions only when they're
trivial and happen in the same place.
Location and purpose before action: "In Google Docs, select File >
New" — not "Select File > New in Google Docs". "To start a new run,
click…" — the goal first, so the reader can skip steps they don't need.
State a step's result in the same paragraph as the action, after it — not
as its own numbered step: "Drag the tiles to an open space. When a gray bar
appears, release them."
A single-step procedure is one bullet, not "1.".
Optional steps start with "Optional:".
End with the completing action — the Save/Apply step; don't leave
the procedure hanging. If the end state isn't obvious, say what success looks
like.
Menu paths: bold items separated by ">" (File > New > Document); use
one convention throughout, and only when every hop uses the same interaction.
One method per procedure. Alternatives and keyboard shortcuts belong in a
reference table, not woven into the steps.
Task-phrased, parallel headings ("Create a profile", "Add an account");
don't follow the heading with a sentence that repeats it.
6. Structure for humans AND AI agents
The same page properties serve skimming humans, search engines, and LLM
retrieval. Optimize once:
Establish context in the opening: what the page is about, who it's for,
where it fits — position in the nav tree doesn't travel with the page into a
search result or a retrieval chunk.
Descriptive headings with honest information scent. Readers choose links
and sections by an estimate of what's behind them — from the label alone.
"Rate limiting" beats "Keeping things under control"; phrase task headings the
way a user would ask ("Rotate an API key"). A heading should answer "is my
answer in this section?" without reading the section. Over-promising titles
get the page abandoned and burn trust.
Semantic markup: proper heading hierarchy (H2 → H3 → H4, no skipped
levels), lists for enumerations, tables for structured data (headers in the
first row only, no merged cells), fenced code blocks with language tags.
Explicit prerequisites at the top of task pages — humans skip them at
their own risk; AI agents cannot infer unstated context.
Definitions before edge cases; common cases before advanced.
Stay on one level. Don't oscillate between high-level principle and
low-level detail on one page; link up to concepts and down to reference
and let the reader change levels when they choose.
Link richly, along subject affinity — every page is a hub. Descriptive
anchors ("see the enrichments reference"), never "click here"; no positional
language ("above"/"below" → name the section or link it).
Self-contained sections: a section pulled out of the page by a retrieval
system should still make sense. Restate the subject noun (not "it"); restate
(briefly) rather than relying on "as mentioned above".
Conform to type: pages with the same purpose share the same sections in
the same order (templates.md) — predictability serves scanners, and a
defined shape makes gaps visible.
Document error scenarios and deprecations explicitly — error strings are
among the highest-value search and retrieval targets, and the least often
documented.
Delete or clearly mark outdated content: AI retrieval surfaces deprecated
pages with no sense of staleness.
Ship the machine surface: an /llms.txt index (and llms-full.txt if the
corpus fits a context window) — format and rules in mechanics.md.
Validating the structure
Analytics: where do readers enter, what do they search for ( especially
searches with zero results), where do they exit.
Session paths: do readers follow the navigation you designed, or fight it?
Direct tests: watch a user (or a new hire — an excellent proxy) try to answer
a specific question using only the docs.
Common pitfalls: overloaded top-level categories (seven items is a comfortable
limit for an unordered list), essential pages buried three levels deep,
section labels only insiders understand.
7. Code examples
The most-read part of any developer doc. Standards:
Runnable as-copied. Full workflow: imports, setup, authentication
placeholder, the call, response handling. A fragment that needs unstated
scaffolding is a support ticket.
Realistic data — not foo/bar; use values shaped like real usage so
readers can map the example onto their case.
Placeholders in UPPER_SNAKE_CASE, followed by "Replace the following:"
with one line per placeholder in order of appearance.
Show the expected output/response alongside the request, so readers can
verify success without guessing.
Include error handling in longer examples — it's where real integrations
spend their time.
Multiple languages via tabs where the audience spans ecosystems; every
tab's example kept equivalent.
Test examples in CI. A fenced code block is a claim; untested claims rot,
and an example that rots is worse than none (§1.7). Extraction and doc-testing
patterns per ecosystem are in mechanics.md; mark deliberately non-runnable
fragments so the untagged default stays "this must run".
8. API documentation
The specialized high-stakes case. Structure around the developer's journey, and
measure it by time-to-first-successful-call.
Required components
Component
Bar to clear
Getting started
Working integration inside ~15 minutes; never buried
Complete request/response cycles — paths, methods, parameters, schemas, status codes — not a bare endpoint list
Guides
Organized by real tasks ("Send a message", "Accept a payment"), not by endpoint inventory
Error catalog
Every error code with context and the remediation, including near-miss distinctions (400 vs 422)
Changelog
Timestamped, discoverable, flags breaking changes and deprecations loudly (templates.md for the format)
Practices that separate the best API docs
Pair generated reference with authored guides. Auto-generation from an
OpenAPI spec is a starting point only — it has no editorial judgment, no
use-case coverage, no workflow ordering. Layer opinionated guides on top;
never ship the generated reference alone.
Workflow-first organization (the Stripe pattern): each reference page
carries descriptive titles, per-language samples, realistic request/response
pairs, and usage notes. This is the sanctioned type-blend — scoped to the API
reference surface (§3).
Copy-paste-ready everywhere, ideally with the reader's own test
credentials injected when docs are behind a logged-in state — but never
require login to read the docs; gated docs kill self-service evaluation.
Skimmable and searchable: developers arrive with a task, not to read
linearly.
Interactive playgrounds on reference pages turn specs into executable
experiences.
Design for LLM consumption: consistent formatting and rich examples let AI
assistants generate correct integration code from your docs — an adoption
channel in its own right.
9. Page templates
templates.md holds compressed skeletons — ordered sections, a one-line note
per section, and the 2–3 quality criteria separating a good instance from a
mediocre one — for:
Use them as the "conform to type" baseline (§6): start from the skeleton, delete
sections that genuinely don't apply, and keep the order. Two worth
internalizing:
README = cognitive funnel, not manual. Broadest first — what it is (< 120
chars), who it's for, a runnable usage example — so the reader can bail out at
any depth having lost minimal time. Depth belongs in the docs tree; the README
links there. License last.
Changelogs are for humans, not machines. Never paste git log. Group by
Added/Changed/Deprecated/Removed/Fixed/Security, newest first, ISO dates, an
[Unreleased] section at the top, and always announce deprecations one
version before removal — selective entries "can be as dangerous as not having
a changelog".
10. Media
Media is supplementary. If the workflow is clear in text alone, don't add
visuals — every asset is a maintenance liability that silently rots when the
UI changes. Screenshots for UI elements that are hard to describe; diagrams as
code (Mermaid — text-diffable) over image exports; video only for long
procedures, and only with captions. Non-negotiable: alt text on images
(descriptive and specific — "OAuth 2.0 flow", not "diagram"), and never present
information only in an image — it's invisible to screen readers, search, and
AI retrieval alike.
11. Discoverability (SEO and AEO)
Most readers arrive from a search engine or an AI assistant, not your nav.
Answer Engine Optimization is §6 done well — there is no separate trick:
literal headings, self-contained sections, defined terms, stated prerequisites,
complete examples, documented errors and deprecations, loud deprecation markers.
The classic mechanical layer still applies: titles ~50–60 characters and meta
descriptions ~150–160 frontloading the terms users actually search (harvested
from user language, §2); descriptive link anchors; compressed images; a current
sitemap. Skip structured-data gymnastics unless you have evidence your audience
arrives through them.
12. Maintenance
Docs rot by default; only a system prevents it.
Docs-as-code: docs live in git, change via PRs, deploy automatically,
version alongside the code they describe. Review catches errors before
publication and lets engineers contribute through tools they already use.
ARID, not DRY — "Accept (some) Repetition In Documentation." Docs are read
in fragments, so they can't be as DRY as code: single-source what you can,
duplicate deliberately where the reader needs it in place — and give every
duplicated fact one designated canonical home so drift is detectable (this
ecosystem's selective-duplication policy in docs/skills/README.md is this
principle applied).
Couple docs to shipping: a user-facing change isn't done until its docs
are updated — enforce in the definition of done or PR template, and automate
detection of drift (e.g. flag when the OpenAPI spec changes but the guide
didn't).
Automate the boring checks: broken links, heading hierarchy, missing alt
text, filler words, terminology consistency, example compilation — the full
toolbox with configs is in mechanics.md.
Edit in sequenced passes, one concern each — drafting and editing are
different acts; never do both at once. The order: (1) technical accuracy — do
the instructions produce the promised result; (2) completeness — can the
reader succeed with what's here; (3) structure — do headings and prerequisites
guide the reader; (4) clarity and brevity — cut. Self-review with the §13
checklist first, then peer review with a specific ask, then expert technical
review for complex topics.
Prioritize by impact, not schedule: the 10 most-viewed pages get
disproportionate attention. Use the traffic × rating grid:
high-traffic/low-rating pages are the urgent queue; low-traffic/ high-rating
pages hold patterns worth replicating.
Assign ownership. Documentation without a named owner diffuses into no
one's job and quietly dies.
Deprecate before deleting: mark the content deprecated in place, point to
the replacement, give notice — then delete what no longer serves users (§1.7).
13. Measuring success
Numbers require interpretation — "don't fall into the trap that a bigger number
means better performance."
Signal
Reading it honestly
Page views
Interest — or bots, or a product bug driving people to the docs
Time on page
Engagement — or frustration hunting for an answer
Zero-result searches
Direct gap list; the highest-signal analytic
Thumbs-up ratio
Target ~75%+; below that, the page misleads or misses
Support ticket volume on documented topics
The docs' business case: each deflected ticket is the win
AI-assistant query logs
What users actually ask, in their words — feeds §2
Compare against your own baseline over time, not absolute thresholds. Tie the
program to business outcomes: onboarding speed, support deflection, retention.
14. Pre-publish checklist
Before a page ships:
Every behavioral claim verified — executed, observed, or read in source;
anything unverifiable is marked, not asserted (§1.1)
One content type, chosen via the compass if unclear; no type-mixing smells
(§3)
One primary persona; prerequisites stated at the top
The answer/outcome appears in the first paragraph; the opening establishes
context for a reader arriving from search
Headings are descriptive, front-load key terms, and don't skip levels
Every code example runs as-copied and shows expected output; non-runnable
fragments are marked
Terminology consistent — grep for known synonyms of key terms
No filler (simply|easily|just|obviously), no time-bound words
(currently|new|soon) outside release notes, present tense for product
behavior (§4)
Procedures follow §5: one action per step, location before action, results
stated, completing action present
Page conforms to its type's skeleton (templates.md)
Errors and edge cases the reader will hit are documented
Links have descriptive anchors and resolve; no positional language
Images have alt text; media passes the "necessary?" test (§10)
Title/description frontload searchable terms
The page has an owner and a reason to exist that analytics could later
confirm
15. Task cards
Card: Documenting a new feature
Identify the persona and their goal (§2). Write the five W's.
Verify the behavior first (§1.1): run the feature, note the actual
commands, flags, outputs, and failure modes — this raw material is the
draft's skeleton and its fact-check.
Split the material by type (§3): quickstart steps → tutorial or how-to;
option/flag inventory → reference; design rationale → explanation. Resist the
single mega-page.
Outline first — every step the reader needs, then reorder to the reader's
flow. Draft the how-to first (it forces the user-goal framing) from its
templates.md skeleton, then extract reference entries, then backfill
explanation.
Write and run every code example.
Edit in passes — accuracy, completeness, structure, brevity (§12) — then run
the §14 checklist; place pages in the tree by type.
Card: Reviewing/auditing an existing page
Determine its intended type (use the compass, §3) and persona. If
undeclarable, that's finding #1.
Check the opening: does it establish context and state what the page
delivers?
Run examples. Diff terminology against the rest of the docs.
Check staleness against the product's current behavior — wrong content is the
highest-severity finding (§1.7).
Grep for the mechanical smells: filler words, time-bound words, "click here",
skipped heading levels (§14).
Verdict per finding: fix, split (type-mixing), or delete.
Card: Standing up docs for a new project
Skeleton by type: Getting Started → How-to Guides → Reference → Concepts
(§3), pages from templates.md.
Write the getting-started path first and make it bulletproof — working result
in ≤15 minutes.
Reference next (breadth), explanations last (depth).
Wire the maintenance system before content grows: docs-as-code, link
checking, prose lint, docs-updated-with-change policy, and the machine
surface (llms.txt) — configs in mechanics.md.
Thereafter improve incrementally (§3): one small published step at a time;
never a big-bang restructure.
16. Sources
Distilled July 2026 from:
Mintlify Guides — https://mintlify.com/guides/introduction
(know-your-audience, content-types, writing-style-tips, navigation,
media, seo, maintenance, success), itself compiled from interviews
with technical writers at Stripe, Amplitude, Anaconda, and GitHub; plus
Mintlify's API-documentation recommendations and developer-docs blog posts
Diátaxis framework — https://diataxis.fr (the four types, the compass,
tutorials-vs-how-to, complex hierarchies, per-type language guidance, quality;
Daniele Procida)
Google developer documentation style guide —
https://developers.google.com/style (word list, tense, anthropomorphism,
timeless documentation, procedures, link text, accessibility, translation)
1---2name: docs-writing3description: Write, restructure, or review documentation — tutorials, how-to guides, reference pages, concept/explanation docs, API references, READMEs, changelogs, release notes, and troubleshooting guides. Distills documentation craft from Mintlify's guides (compiled from technical writers at Stripe, GitHub, Amplitude, and Anaconda), the Diátaxis framework (including the compass and per-type voice), the Google and Microsoft style guides, Every Page Is Page One, Write the Docs, and Docs for Developers: audience analysis, content-type selection, style and word-level rules, procedure writing, structure for humans and AI agents, code-example standards, page templates (templates.md), mechanical enforcement and llms.txt (mechanics.md), maintenance, and success metrics. Use this skill when the user asks to "write docs", "document this feature", "improve this page", "review these docs", "write a tutorial / how-to / reference page", "structure the docs", "write API documentation", "write a README / changelog", or when authoring 4---56# Writing documentation78Documentation craft distilled for the moment of writing. The core stance:9**people don't read docs for fun; they arrive with a goal — and they read at10most ~20–28% of the words on a page** (NN/g). Every rule below serves getting11the reader from arrival to accomplished goal with minimum friction — and the12same properties that serve a skimming human serve an AI agent reading the page.1314Companion files, read on demand:1516- `templates.md` — page skeletons + quality bars for how-to, tutorial,17 reference, concept, README, changelog, release notes, and troubleshooting18 pages.19- `mechanics.md` — mechanical enforcement (Vale, markdownlint, link checking,20 testing code examples) and the llms.txt format.2122## 1. The seven principles that override default writing intuitions2324Writing docs is not writing prose. These override what generic "good writing"25instincts would suggest:26271. **Verify before you document.** Never document behavior you haven't executed,28 observed, or read in the source. LLM-written docs fail here in characteristic29 ways: plausible flags that don't exist, documented _intent_ instead of actual30 behavior, invented defaults, hedged claims papering over unchecked ones. If31 you can't run it, read the code that implements it; if you can do neither,32 mark the claim unverified rather than asserting it. This is the docs analogue33 of `skmtc-debug`'s verify-first stance.34352. **One page, one content type, one persona.** Decide _before_ drafting whether36 the page is a tutorial, how-to, reference, or explanation (§3), and who it's37 for (§2). "Writing for multiple audiences leads to compromises that satisfy38 no one." A page that teaches AND exhaustively catalogs AND justifies design39 does none of them well.40413. **Lead with the answer, not the context.** Readers scan in an F-pattern and42 abandon pages whose opening doesn't confirm what the title promised. Put the43 outcome or instruction in the first paragraph; front-load the44 information-carrying words in headings. A reader should be able to leave45 after the first paragraph having gotten what they came for.46474. **The curse of knowledge is the default failure mode.** You know how48 everything works; the reader doesn't. State prerequisites explicitly, define49 acronyms on first use, never assume internal conventions (naming schemes,50 auth flows, team shorthand) are known. Validate against real evidence —51 support tickets, friction logs, user questions — not assumptions. Test: could52 someone who joined yesterday follow this?53545. **Every page is page one.** Readers arrive from search engines, deep links,55 and AI retrieval — never at your table of contents. Each page must establish56 its own context (what it covers, who it's for, what it assumes) in its57 opening. Reading-order dependencies ("as mentioned above", "in the previous58 section") are forbidden; link to supporting material instead.59606. **Code examples are load-bearing, not decorative.** Many readers only read61 the code blocks. Every example must be complete and runnable as-copied —62 imports, setup, the call, response handling. "A code example is worth a63 thousand words."64657. **Wrong docs are worse than no docs.** "Consider incorrect documentation to66 be worse than missing documentation" (Write the Docs). Outdated or misleading67 content wastes users' time and erodes trust in the whole product. When you68 can't maintain a page, delete it — removal often serves users better than69 retention.7071## 2. Know your audience7273Center the reader's goal, not the product's feature list.7475### The four personas7677| Persona | Needs | Serve with |78| ------------------------ | ---------------------------------- | ----------------------------------------------------------------------------------- |79| Technical decision maker | Evaluate fit and architecture | Overviews, concept docs, comparison-friendly framing |80| New end user | Get to first success fast | Getting-started tutorial, quickstart |81| Integrating developer | Implement correctly | How-tos, reference, complete examples |82| AI agent / LLM | Retrieve and act without inference | Structure, explicit prerequisites, self-contained sections, unambiguous terminology |8384Pick **one** primary persona per page. The AI-agent persona is served by the85same properties that serve skimming humans — clear headings, semantic markup,86defined terms, runnable examples — so it rarely needs separate pages, but it87does raise the bar on explicitness (§6).8889### Defeating the curse of knowledge9091- Talk to users (or their proxies: support, UX research, product). Harvest the92 _terminology they actually use_ — it often differs from internal naming, and93 it's what they'll search for.94- **Keep a friction log**: use the product as a new user would and record every95 step — expected vs. actual, every confusion, workaround, and surprise. Each96 entry is either a docs fix or a product bug; file it as one or the other.97 (This ecosystem already runs one at `docs/friction-log/`.)98- Use the five W's to define a page's scope before writing: who is this for,99 what will they accomplish, why would they need it, where/when does it apply —100 then how.101- Embed with support: recurring tickets are a ranked list of doc gaps.102- Test docs by asking an AI assistant product questions and seeing whether the103 docs let it answer correctly — a cheap proxy for "does the page carry its own104 context".105- **Assume the reader is qualified** for the page's task; don't explain basics106 inline. Give unqualified readers enough context to _recognize_ they're on the107 wrong page, plus a link to where they can qualify themselves — a page "can't108 bring every possible reader up to speed without becoming a textbook."109- Don't over-document niche edge cases in guides; route those to community110 channels and keep guides focused on majority paths. (Reference is different —111 see §3: exhaustive within its scope.)112113## 3. Content types (Diátaxis)114115Four types, distinguished by what the reader is trying to do. Assign each page116exactly one type before drafting.117118| Type | Reader's goal | Reader's mode | Structure | Voice |119| ---------------- | --------------------------- | ------------- | ------------------------------------ | ---------------------------------- |120| **Tutorial** | "Teach me by doing" | Study | Linear steps, guaranteed outcome | Guiding: "we", first person plural |121| **How-to guide** | "Solve my specific problem" | Work | Problem → solution steps, may branch | Direct, conditional imperatives |122| **Reference** | "Give me the precise fact" | Work | Scannable catalog, consistent format | Neutral, terse, austere |123| **Explanation** | "Help me understand why" | Study | Discursive, conceptual | Reflective, comparative |124125### The compass — when the type is unclear126127Ask two questions about the content (works at page, section, or sentence level):1281291. Does it inform **action** (doing) or **cognition** (thinking)?1302. Does it serve **acquisition** of skill (study) or **application** of skill131 (work)?132133action + acquisition → tutorial · action + application → how-to · cognition +134application → reference · cognition + acquisition → explanation.135136**Type is function, not difficulty.** An advanced course is still a tutorial (a137lesson, safely in the instructor's hands); a trivial one-step procedure is still138a how-to (a worker's task). "Beginner content = tutorial, advanced content =139how-to" is Diátaxis's most common and most harmful misreading — classify by140study-vs-work, never by difficulty.141142Navigation should mirror the split: Getting Started → Guides → Reference →143Concepts. The SKMTC docs tree instantiates this as `using/tutorials/` +144`using/how-to/` + `using/recipes/`, `authoring/` (same trio), `reference/`, and145`concepts/` + `explanation/`. **Recipes are how-to guides in recipe form** — the146recipe is Diátaxis's own model for the type (assumes competence, answers one147specific question, no teaching). The four types classify _needs_, not directory148names; a section may be named anything so long as each page serves one need149well.150151### Writing rules per type152153**Tutorials** — learning-oriented:154155- Open by stating exactly what the reader will have built/achieved at the end.156- First person plural, teacher's voice: "In this tutorial, we will…";157 unambiguous imperatives: "First, do x. Now, do y."158- Every step delivers a **visible result**, and the text names it: "The output159 should look something like…" — checkpoints let readers self-verify they're on160 track.161- Small incremental steps; a tutorial "doesn't offer choices or alternatives" —162 one carefully-managed path.163- Teach through experience, not explanation — link to explanation docs rather164 than digressing: "We must do x before y because… (see [explanation] for165 details)."166- Must work every time: "so well constructed that things can't go wrong" — a167 tutorial that fails at step 4 loses the user, possibly permanently. Expect168 high maintenance cost as the product evolves.169170**How-to guides** — task-oriented:171172- Title is the task in the user's words ("Skip operations for one generator"),173 not the feature's name.174- **Conditional imperatives** carry the branching: "If you want x, do y. To175 achieve w, do z." (Tutorials never branch; how-tos usually do.)176- About goals, not machinery: address the real-world task, not a walkthrough of177 the tool's controls.178- Assume foundational knowledge; state the specific prerequisites, then skip the179 obvious steps.180- "Practical usability is more helpful than completeness" — only the context181 necessary for _this_ task; offload option inventories to reference: "Refer to182 the x reference for a full list."183184**Reference** — information-oriented:185186- "Austere and uncompromising": describe, and _only_ describe. Neutral statement187 of fact; no instruction, no rationale.188- Structure mirrors the product's structure, and entry order mirrors the source189 of truth, so drift is visible.190- Maximize scannability: tables, identical per-entry format, parallel phrasing,191 one naming convention across every entry.192- Copy-paste-ready examples per entry (examples illustrate without explaining —193 they're welcome); required vs. optional marked explicitly; constraints and194 defaults stated, not just the name restated.195- Exhaustive within its declared scope — a reference that omits entries is196 broken in a way a how-to never is.197198**Explanations** — understanding-oriented:199200- The "About" test: an explanation title should tolerate an implicit "About …"201 prefix ("About user authentication"). If it can't, the page probably isn't202 explanation.203- Cover design decisions, constraints, and the alternatives that were rejected204 (and why).205- Opinion is allowed and required here: explanation "can and must consider206 alternatives, counter-examples or multiple different approaches."207- Explanation "tends to absorb other things" — expel instruction and technical208 description to their proper homes.209210### Type-mixing smells211212- A tutorial that pauses for three paragraphs of rationale → move the rationale213 to an explanation doc, link it.214- A tutorial offering choices ("you could also use…") → cut; one path.215- A reference entry with step-by-step setup → extract a how-to.216- A how-to that exhaustively lists every option → extract reference material,217 keep only the options the task needs.218- A how-to that keeps stopping to teach → trust the reader's competence; link219 the tutorial instead.220- Time-sensitive content (release notes, announcements) in evergreen docs →221 belongs in a changelog or blog (see `templates.md`).222223**Scoped exception — API reference surfaces.** Reference pages for an HTTP API224may deliberately blend the catalog with per-language samples, request/response225pairs, and short usage notes (the Stripe pattern, §8). That blend is confined to226the API reference surface; docs-tree pages keep one type each.227228### Applying Diátaxis incrementally229230Don't restructure top-down into four empty boxes and shovel content in —231"Diátaxis changes the structure of your documentation from the inside." The232loop: choose something small; assess what user need it serves and how well;233decide on a single next action; do it and publish immediately. Documentation is234_never finished_ — but at every moment it can be _complete_: useful, correct,235and coherent at its current scope. Never hold back an improvement waiting for236"done".237238## 4. Style and tone239240- **Cut ruthlessly — within a section.** Every unnecessary word taxes a reader241 who is there to get something done. But brevity governs sentences and242 paragraphs; **explicitness governs boundaries**: restating context at a page243 or section opening is not filler — it's the entry point for a reader (or244 retrieval chunk) landing there (§1.5). Cut words, not context.245- **Active voice, imperative mood.** "Create a file", not "a file should be246 created".247- **Second person.** "You" — the doc serves the reader's task. (Exception:248 tutorials use "we" — §3.)249- **Short paragraphs** (2–4 sentences), meaningful headings, lists for250 enumerable things, tables for structured facts.251- **One term per concept, everywhere.** "API key" and "API token" used252 interchangeably reads as two different things. Pick one; grep for the other253 (enforceable with a Vale `consistency` rule — `mechanics.md`).254- **Don't narrate the obvious.** "Click Save to save" is negative value.255 Document what isn't intuitive.256- **Spelling and grammar are trust signals.** Errors in the docs read as errors257 in the product.258259### Word-level rules (bad → good)260261The high-leverage subset of the Google and Microsoft style guides — rules a262fluent writer (or LLM) gets wrong by default:263264- **Delete "simply", "easily", "just", "obviously", "of course".** What's easy265 for the writer isn't for the reader; the sentence survives without them.266 "Simply run the installer" → "Run the installer."267- **No "please" in instructions.** "Please click Save" → "Click Save."268- **Present tense for product behavior; never "will" or "would".** "The server269 will send an acknowledgment" → "The server sends an acknowledgment."270- **Timeless docs: ban "currently", "new", "now", "soon", "as of this writing",271 "latest", "old", "eventually".** "The emulator now supports filters" → "The272 emulator supports filters." If "new" is unavoidable, anchor it to a date.273 Exception: changelogs and release notes.274- **No anthropomorphism.** Software doesn't want, think, see, know, or care.275 "The PC sees a new device" → "The PC detects a new device."276- **"may" = permission only; "might" = possibility; "can" = ability.** "The call277 may fail" → "The call might fail."278- **"should" is ambiguous** — use "must" for requirements; rewrite279 recommendations as "we recommend" or a direct imperative.280- **Spell out Latin abbreviations**: "e.g." → "for example", "i.e." → "that is";281 avoid "etc." (finish the list or use "such as").282- **"allows you to" / "enables you to" → "lets you"** — or make the reader the283 subject: "The API allows you to filter results" → "Filter results with…".284- **"in order to" → "to"; "utilize"/"leverage" → "use".**285- **Start instructions with the verb** — kill "You can…" and "There is/are…"286 openers. "You can access the settings from…" → "Open the settings from…".287- **Sentence-style capitalization for all headings.** Never Title Case. Oxford288 comma always. Contractions are fine.289- **"select"** for UI interaction (not "click"/"tap" — accurate for keyboard,290 touch, and assistive tech); **select/clear** checkboxes (never291 "check"/"uncheck").292- **Never inflect code identifiers** — attach a noun and inflect that: "`Node`s"293 → "`Node` objects"; "`ADDRESS`'s value" → "the `ADDRESS` constant's value".294- **Inclusive defaults**: allowlist/blocklist, primary/replica, placeholder (not295 dummy), "stops responding" (not hangs), singular "they" (never "he/she").296297### Writing for a global audience298299Docs are read by non-native speakers and machine translation:300301- Short sentences, one idea each; no more than two clauses chained with302 and/or/but.303- Keep optional function words — "Verify all tables migrated" → "Verify **that**304 all tables **were** migrated."305- Avoid ambiguous connectives: "once" → "after"/"when"; "while" →306 "although"/"during"; "since"/"as" → "because" (unless temporal).307- Place "only" immediately before the word it modifies: "Only request one token"308 → "Request only one token."309- No noun stacks (max two nouns as modifiers), no phrasal verbs where a single310 verb exists, no idioms, colloquialisms, humor, or culture-bound references.311- Dates: spell out the month ("January 19, 2026") or ISO 8601 (2026-01-19);312 never 04/15/17; never seasons.313314Lean on the Google or Microsoft style guide for the long tail; automate315enforcement with Vale in CI (`mechanics.md`) rather than relitigating style in316review.317318## 5. Writing procedures319320Step sequences have their own mechanics (Google/Microsoft procedure rules):321322- **Numbered list; one action per step.** Combine actions only when they're323 trivial and happen in the same place.324- **Location and purpose before action**: "In Google Docs, select **File >325 New**" — not "Select **File > New** in Google Docs". "To start a new run,326 click…" — the goal first, so the reader can skip steps they don't need.327- **State a step's result in the same paragraph as the action**, after it — not328 as its own numbered step: "Drag the tiles to an open space. When a gray bar329 appears, release them."330- **A single-step procedure is one bullet**, not "1.".331- **Optional steps start with "Optional:"**.332- **End with the completing action** — the **Save**/**Apply** step; don't leave333 the procedure hanging. If the end state isn't obvious, say what success looks334 like.335- **Menu paths**: bold items separated by ">" (**File > New > Document**); use336 one convention throughout, and only when every hop uses the same interaction.337- **One method per procedure.** Alternatives and keyboard shortcuts belong in a338 reference table, not woven into the steps.339- **Task-phrased, parallel headings** ("Create a profile", "Add an account");340 don't follow the heading with a sentence that repeats it.341342## 6. Structure for humans AND AI agents343344The same page properties serve skimming humans, search engines, and LLM345retrieval. Optimize once:346347- **Establish context in the opening**: what the page is about, who it's for,348 where it fits — position in the nav tree doesn't travel with the page into a349 search result or a retrieval chunk.350- **Descriptive headings with honest information scent.** Readers choose links351 and sections by an estimate of what's behind them — from the label alone.352 "Rate limiting" beats "Keeping things under control"; phrase task headings the353 way a user would ask ("Rotate an API key"). A heading should answer "is my354 answer in this section?" without reading the section. Over-promising titles355 get the page abandoned and burn trust.356- **Semantic markup**: proper heading hierarchy (H2 → H3 → H4, no skipped357 levels), lists for enumerations, tables for structured data (headers in the358 first row only, no merged cells), fenced code blocks with language tags.359- **Explicit prerequisites** at the top of task pages — humans skip them at360 their own risk; AI agents cannot infer unstated context.361- **Definitions before edge cases; common cases before advanced.**362- **Stay on one level.** Don't oscillate between high-level principle and363 low-level detail on one page; link _up_ to concepts and _down_ to reference364 and let the reader change levels when they choose.365- **Link richly, along subject affinity** — every page is a hub. Descriptive366 anchors ("see the enrichments reference"), never "click here"; no positional367 language ("above"/"below" → name the section or link it).368- **Self-contained sections**: a section pulled out of the page by a retrieval369 system should still make sense. Restate the subject noun (not "it"); restate370 (briefly) rather than relying on "as mentioned above".371- **Conform to type**: pages with the same purpose share the same sections in372 the same order (`templates.md`) — predictability serves scanners, and a373 defined shape makes gaps visible.374- **Document error scenarios and deprecations explicitly** — error strings are375 among the highest-value search and retrieval targets, and the least often376 documented.377- Delete or clearly mark outdated content: AI retrieval surfaces deprecated378 pages with no sense of staleness.379- **Ship the machine surface**: an `/llms.txt` index (and `llms-full.txt` if the380 corpus fits a context window) — format and rules in `mechanics.md`.381382### Validating the structure383384- Analytics: where do readers enter, what do they search for ( especially385 searches with zero results), where do they exit.386- Session paths: do readers follow the navigation you designed, or fight it?387- Direct tests: watch a user (or a new hire — an excellent proxy) try to answer388 a specific question using only the docs.389- Common pitfalls: overloaded top-level categories (seven items is a comfortable390 limit for an unordered list), essential pages buried three levels deep,391 section labels only insiders understand.392393## 7. Code examples394395The most-read part of any developer doc. Standards:396397- **Runnable as-copied.** Full workflow: imports, setup, authentication398 placeholder, the call, response handling. A fragment that needs unstated399 scaffolding is a support ticket.400- **Realistic data** — not `foo`/`bar`; use values shaped like real usage so401 readers can map the example onto their case.402- **Placeholders in `UPPER_SNAKE_CASE`**, followed by "Replace the following:"403 with one line per placeholder in order of appearance.404- **Show the expected output/response** alongside the request, so readers can405 verify success without guessing.406- **Include error handling** in longer examples — it's where real integrations407 spend their time.408- **Multiple languages via tabs** where the audience spans ecosystems; every409 tab's example kept equivalent.410- **Test examples in CI.** A fenced code block is a claim; untested claims rot,411 and an example that rots is worse than none (§1.7). Extraction and doc-testing412 patterns per ecosystem are in `mechanics.md`; mark deliberately non-runnable413 fragments so the untagged default stays "this must run".414415## 8. API documentation416417The specialized high-stakes case. Structure around the developer's journey, and418measure it by **time-to-first-successful-call**.419420### Required components421422| Component | Bar to clear |423| --------------- | --------------------------------------------------------------------------------------------------------------- |424| Getting started | Working integration inside ~15 minutes; never buried |425| Authentication | Step-by-step credential setup, token placement, expiry and rate limits, per-method examples (curl + SDKs) |426| API reference | Complete request/response cycles — paths, methods, parameters, schemas, status codes — not a bare endpoint list |427| Guides | Organized by real tasks ("Send a message", "Accept a payment"), not by endpoint inventory |428| Error catalog | Every error code with context and the _remediation_, including near-miss distinctions (400 vs 422) |429| Changelog | Timestamped, discoverable, flags breaking changes and deprecations loudly (`templates.md` for the format) |430431### Practices that separate the best API docs432433- **Pair generated reference with authored guides.** Auto-generation from an434 OpenAPI spec is a starting point only — it has no editorial judgment, no435 use-case coverage, no workflow ordering. Layer opinionated guides on top;436 never ship the generated reference alone.437- **Workflow-first organization** (the Stripe pattern): each reference page438 carries descriptive titles, per-language samples, realistic request/response439 pairs, and usage notes. This is the sanctioned type-blend — scoped to the API440 reference surface (§3).441- **Copy-paste-ready everywhere**, ideally with the reader's own test442 credentials injected when docs are behind a logged-in state — but never443 _require_ login to read the docs; gated docs kill self-service evaluation.444- **Skimmable and searchable**: developers arrive with a task, not to read445 linearly.446- **Interactive playgrounds** on reference pages turn specs into executable447 experiences.448- **Design for LLM consumption**: consistent formatting and rich examples let AI449 assistants generate correct integration code from your docs — an adoption450 channel in its own right.451452## 9. Page templates453454`templates.md` holds compressed skeletons — ordered sections, a one-line note455per section, and the 2–3 quality criteria separating a good instance from a456mediocre one — for:457458how-to guide · tutorial · reference entry · concept/explanation · README ·459changelog (Keep a Changelog format) · release notes · troubleshooting guide460461Use them as the "conform to type" baseline (§6): start from the skeleton, delete462sections that genuinely don't apply, and keep the order. Two worth463internalizing:464465- **README = cognitive funnel, not manual.** Broadest first — what it is (< 120466 chars), who it's for, a runnable usage example — so the reader can bail out at467 any depth having lost minimal time. Depth belongs in the docs tree; the README468 links there. License last.469- **Changelogs are for humans, not machines.** Never paste `git470 log`. Group by471 Added/Changed/Deprecated/Removed/Fixed/Security, newest first, ISO dates, an472 `[Unreleased]` section at the top, and _always_ announce deprecations one473 version before removal — selective entries "can be as dangerous as not having474 a changelog".475476## 10. Media477478Media is supplementary. **If the workflow is clear in text alone, don't add479visuals** — every asset is a maintenance liability that silently rots when the480UI changes. Screenshots for UI elements that are hard to describe; diagrams as481code (Mermaid — text-diffable) over image exports; video only for long482procedures, and only with captions. Non-negotiable: alt text on images483(descriptive and specific — "OAuth 2.0 flow", not "diagram"), and never present484information _only_ in an image — it's invisible to screen readers, search, and485AI retrieval alike.486487## 11. Discoverability (SEO and AEO)488489Most readers arrive from a search engine or an AI assistant, not your nav.490**Answer Engine Optimization is §6 done well** — there is no separate trick:491literal headings, self-contained sections, defined terms, stated prerequisites,492complete examples, documented errors and deprecations, loud deprecation markers.493The classic mechanical layer still applies: titles ~50–60 characters and meta494descriptions ~150–160 frontloading the terms users actually search (harvested495from user language, §2); descriptive link anchors; compressed images; a current496sitemap. Skip structured-data gymnastics unless you have evidence your audience497arrives through them.498499## 12. Maintenance500501Docs rot by default; only a system prevents it.502503- **Docs-as-code**: docs live in git, change via PRs, deploy automatically,504 version alongside the code they describe. Review catches errors before505 publication and lets engineers contribute through tools they already use.506- **ARID, not DRY** — "Accept (some) Repetition In Documentation." Docs are read507 in fragments, so they can't be as DRY as code: single-source what you can,508 duplicate deliberately where the reader needs it in place — and give every509 duplicated fact one designated canonical home so drift is detectable (this510 ecosystem's selective-duplication policy in `docs/skills/README.md` is this511 principle applied).512- **Couple docs to shipping**: a user-facing change isn't done until its docs513 are updated — enforce in the definition of done or PR template, and automate514 detection of drift (e.g. flag when the OpenAPI spec changes but the guide515 didn't).516- **Automate the boring checks**: broken links, heading hierarchy, missing alt517 text, filler words, terminology consistency, example compilation — the full518 toolbox with configs is in `mechanics.md`.519- **Edit in sequenced passes, one concern each** — drafting and editing are520 different acts; never do both at once. The order: (1) technical accuracy — do521 the instructions produce the promised result; (2) completeness — can the522 reader succeed with what's here; (3) structure — do headings and prerequisites523 guide the reader; (4) clarity and brevity — cut. Self-review with the §13524 checklist first, then peer review with a _specific ask_, then expert technical525 review for complex topics.526- **Prioritize by impact, not schedule**: the 10 most-viewed pages get527 disproportionate attention. Use the traffic × rating grid:528 high-traffic/low-rating pages are the urgent queue; low-traffic/ high-rating529 pages hold patterns worth replicating.530- **Assign ownership.** Documentation without a named owner diffuses into no531 one's job and quietly dies.532- **Deprecate before deleting**: mark the content deprecated in place, point to533 the replacement, give notice — then delete what no longer serves users (§1.7).534535## 13. Measuring success536537Numbers require interpretation — "don't fall into the trap that a bigger number538means better performance."539540| Signal | Reading it honestly |541| ------------------------------------------ | --------------------------------------------------------------- |542| Page views | Interest — or bots, or a product bug driving people to the docs |543| Time on page | Engagement — or frustration hunting for an answer |544| Zero-result searches | Direct gap list; the highest-signal analytic |545| Thumbs-up ratio | Target ~75%+; below that, the page misleads or misses |546| Support ticket volume on documented topics | The docs' business case: each deflected ticket is the win |547| AI-assistant query logs | What users actually ask, in their words — feeds §2 |548549Compare against your own baseline over time, not absolute thresholds. Tie the550program to business outcomes: onboarding speed, support deflection, retention.551552## 14. Pre-publish checklist553554Before a page ships:555556- [ ] Every behavioral claim verified — executed, observed, or read in source;557 anything unverifiable is marked, not asserted (§1.1)558- [ ] One content type, chosen via the compass if unclear; no type-mixing smells559 (§3)560- [ ] One primary persona; prerequisites stated at the top561- [ ] The answer/outcome appears in the first paragraph; the opening establishes562 context for a reader arriving from search563- [ ] Headings are descriptive, front-load key terms, and don't skip levels564- [ ] Every code example runs as-copied and shows expected output; non-runnable565 fragments are marked566- [ ] Terminology consistent — grep for known synonyms of key terms567- [ ] No filler (`simply|easily|just|obviously`), no time-bound words568 (`currently|new|soon`) outside release notes, present tense for product569 behavior (§4)570- [ ] Procedures follow §5: one action per step, location before action, results571 stated, completing action present572- [ ] Page conforms to its type's skeleton (`templates.md`)573- [ ] Errors and edge cases the reader will hit are documented574- [ ] Links have descriptive anchors and resolve; no positional language575- [ ] Images have alt text; media passes the "necessary?" test (§10)576- [ ] Title/description frontload searchable terms577- [ ] The page has an owner and a reason to exist that analytics could later578 confirm579580## 15. Task cards581582### Card: Documenting a new feature5835841. Identify the persona and their goal (§2). Write the five W's.5852. **Verify the behavior first** (§1.1): run the feature, note the actual586 commands, flags, outputs, and failure modes — this raw material is the587 draft's skeleton and its fact-check.5883. Split the material by type (§3): quickstart steps → tutorial or how-to;589 option/flag inventory → reference; design rationale → explanation. Resist the590 single mega-page.5914. Outline first — every step the reader needs, then reorder to the reader's592 flow. Draft the how-to first (it forces the user-goal framing) from its593 `templates.md` skeleton, then extract reference entries, then backfill594 explanation.5955. Write and _run_ every code example.5966. Edit in passes — accuracy, completeness, structure, brevity (§12) — then run597 the §14 checklist; place pages in the tree by type.598599### Card: Reviewing/auditing an existing page6006011. Determine its intended type (use the compass, §3) and persona. If602 undeclarable, that's finding #1.6032. Check the opening: does it establish context and state what the page604 delivers?6053. Run examples. Diff terminology against the rest of the docs.6064. Check staleness against the product's current behavior — wrong content is the607 highest-severity finding (§1.7).6085. Grep for the mechanical smells: filler words, time-bound words, "click here",609 skipped heading levels (§14).6106. Verdict per finding: fix, split (type-mixing), or delete.611612### Card: Standing up docs for a new project6136141. Skeleton by type: Getting Started → How-to Guides → Reference → Concepts615 (§3), pages from `templates.md`.6162. Write the getting-started path first and make it bulletproof — working result617 in ≤15 minutes.6183. Reference next (breadth), explanations last (depth).6194. Wire the maintenance system before content grows: docs-as-code, link620 checking, prose lint, docs-updated-with-change policy, and the machine621 surface (llms.txt) — configs in `mechanics.md`.6225. Thereafter improve incrementally (§3): one small published step at a time;623 never a big-bang restructure.624625## 16. Sources626627Distilled July 2026 from:628629- Mintlify Guides — https://mintlify.com/guides/introduction630 (`know-your-audience`, `content-types`, `writing-style-tips`, `navigation`,631 `media`, `seo`, `maintenance`, `success`), itself compiled from interviews632 with technical writers at Stripe, Amplitude, Anaconda, and GitHub; plus633 Mintlify's API-documentation recommendations and developer-docs blog posts634- Diátaxis framework — https://diataxis.fr (the four types, the compass,635 tutorials-vs-how-to, complex hierarchies, per-type language guidance, quality;636 Daniele Procida)637- Google developer documentation style guide —638 https://developers.google.com/style (word list, tense, anthropomorphism,639 timeless documentation, procedures, link text, accessibility, translation)640- Microsoft Writing Style Guide — https://learn.microsoft.com/en-us/style-guide/641 (top 10 tips, bias-free communication, global communications, step-by-step642 instructions)643- Every Page Is Page One — Mark Baker (the seven characteristics of EPPO topics;644 information foraging) — https://everypageispageone.com645- Write the Docs — https://www.writethedocs.org/guide/ (docs principles incl.646 ARID, docs-as-code, style guides)647- Docs for Developers (Bhatti, Corleissen, Lambourne, Nunez, Waterhouse) —648 https://docsfordevelopers.com (friction log, drafting process, editing passes,649 content taxonomy)650- Nielsen Norman Group — how little users read, the F-shaped pattern,651 information scent — https://www.nngroup.com/articles/652- The Good Docs Project templates — https://thegooddocsproject.dev (via653 `templates.md`)654- Keep a Changelog 1.1.0 — https://keepachangelog.com (via `templates.md`)655- Art of README + standard-readme (via `templates.md`)656- llms.txt spec — https://llmstxt.org; Vale — https://vale.sh; markdownlint;657 lychee (via `mechanics.md`)
Run npx skillmds@latest add skmtc/docs-writing in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Write, restructure, or review documentation — tutorials, how-to guides, reference pages, concept/explanation docs, API references, READMEs, changelogs, release notes, and troubleshooting guides. Distills documentation craft from Mintlify's guides (compiled from technical writers at Stripe, GitHub, Amplitude, and Anaconda), the Diátaxis framework (including the compass and per-type voice), the Google and Microsoft style guides, Every Page Is Page One, Write the Docs, and Docs for Developers: audience analysis, content-type selection, style and word-level rules, procedure writing, structure for humans and AI agents, code-example standards, page templates (templates.md), mechanical enforcement and llms.txt (mechanics.md), maintenance, and success metrics. Use this skill when the user asks to "write docs", "document this feature", "improve this page", "review these docs", "write a tutorial / how-to / reference page", "structure the docs", "write API documentation", "write a README / changelog", or when authoring It is listed under Docs & Writing on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
skmtc (@skmtc) published this skill. Their other Agent Skills are listed on their SkillMD profile.