Create and improve technical documentation. Use when the user wants to write docs, create a README, write an ADR, document an API, create a quickstart guide, write a runbook, create a migration guide, write an RFC or design doc, improve existing documentation, or mentions "docs" or "documentation".
Write clear, warm, well-structured documentation that helps readers accomplish their goals.
If the user has explicitly stated what they want documented, proceed to step 2.
If not, ask:
If the audience is obvious from context (for example, a README in an open source library targets developers), proceed.
If not obvious, ask the user explicitly. Never assume the audience. The tone, depth, and structure all depend on who is reading.
Consult the relevant guide based on doc type. Every document falls into one of two categories.
User-facing documentation — apply the :
| Doc type | Guide | Diátaxis category |
|---|---|---|
| README | readme.md | Hybrid (orientation + quickstart) |
| Quickstart / Getting started | quickstart.md | Tutorial |
| How-to guide | how-to-guide.md | How-to |
| API reference | api-reference.md | Reference |
Decision and design documents — purpose-specific templates:
| Doc type | Guide |
|---|---|
| ADR (Architecture Decision Record) | adr.md |
| RFC / Design doc | rfc-design-doc.md |
| Migration guide | migration-guide.md |
| Runbook | runbook.md |
For all doc types, also consult:
If it's clear what's being documented: explore the codebase first. Read relevant source files, tests, and existing docs. Then propose a document structure to the user for approval before writing.
If it's not clear: ask the user first (step 1), then explore.
Default: docs/ directory in the repo root.
Negotiate with the user if the default doesn't fit. Ask where they want the document placed.
Flag delivery gaps: if the document is clearly meant for end users (help articles, product guides, onboarding docs) and lives only in a git repo, raise this with the user: the target audience probably won't find it there. Don't scope creep into building a docs site or CI pipeline — just inform so the user can make a conscious choice.
Apply guidance from the relevant doc type guide and cross-cutting concerns:
Before presenting the document to the user, run the bundled lint script:
bash ${CLAUDE_PLUGIN_ROOT}/skills/docs/scripts/lint-docs.sh <file-or-directory>
This runs markdownlint and Vale (if installed). See linting.md for configuration details.
Additionally: