Write or update a README, a how-to guide, reference documentation or a changelog entry, built around the reader's goal, with examples that were run and verified. Use for "write the README", "document this feature", "add a how-to", "update the docs", "write a changelog entry".
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Write Docs?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/kinzarra-write-docs)
---
name: write-docs
description: Write or update a README, a how-to guide, reference documentation or a changelog entry, built around the reader's goal, with examples that were run and verified. Use for "write the README", "document this feature", "add a how-to", "update the docs", "write a changelog entry".
---
# Write documentation
The result is a document that lets a named reader reach a named goal without asking anyone, with every command and example checked against the current code.
## 1. Reader and goal first
- Name the reader in one line: a new user installing the product, a developer calling the interface, a contributor setting up the project, an operator running it.
- Name what they want to get done and what they already know. Write for that level: do not explain what they know, do not skip what they do not.
- Pick the document type. Each answers one kind of question, and mixing them makes all of them worse:
- **README**: what is this, is it for me, how do I get it running in 5 minutes, where is the rest.
- **How-to**: steps to reach one specific goal.
- **Reference**: every option, command, endpoint or setting, complete and exact, for looking things up.
- **Explanation**: why it works this way, the background and the trade-offs.
- **Changelog entry**: what changed for the user in this version and what they must do.
- Read the existing documentation and follow its structure, tone, terms and format. Check whether the fact is already written somewhere; link to it instead of writing a second copy.
## 2. Get the facts from the code
- Read the code, the configuration, the command-line help and the tests for the thing being documented. The code is the source; an old document is a hint.
- Run the thing. Install from scratch following the current instructions and note every step that fails or that is missing.
- List defaults, limits, required and optional settings, error messages and prerequisites (versions, tools, accounts, permissions) from the source, not from memory.
## 3. Structure
- **README order**: one sentence saying what it is and for whom; a short example or screenshot; requirements; install; the first run with the expected output; the most common tasks; configuration; links to the rest; how to get help and how to contribute; license.
- **How-to order**: the goal as the title ("Rotate the signing key"); prerequisites; numbered steps, one action per step, each with the command and the expected result; how to check it worked; what to do when the common failure happens.
- **Reference order**: the same layout for every item: name, purpose in one line, syntax, parameters with type, default and limits, the result, the errors, one example. Sort the items the way readers search, usually by name.
- **Changelog entry**: grouped as added, changed, fixed, removed, deprecated, security. One line per change, from the user's side. Breaking changes first, with the migration step.
- Put the most needed information first. Headings say what the section does for the reader ("Install", "Configure the database") and work as a table of contents.
## 4. Examples that run
- Every command, snippet and configuration sample is executed in the worktree before it goes into the document. Paste the real output, shortened if long.
- Examples are complete enough to copy: imports, required settings, the full command. Use realistic values, not `foo` and `bar`.
- Use obvious placeholders for what the reader must replace (`<your-project-id>`) and say where to get the value. Never put real secrets, tokens, internal addresses or personal data in an example.
- State the version or revision the example was checked against when the interface changes often.
- An example that cannot be run in this environment is marked "not verified" in the report, with the reason.
## 5. Language
- Short sentences, active voice, present tense, the imperative for steps ("Run", "Open", "Set").
- One term for one thing throughout. Define a term at first use or link to its definition.
- Say the concrete thing: "takes about 2 minutes", "needs 4 GB of free disk", not "may take a while".
- Cut "simply", "just", "easy", "obviously", marketing adjectives and the history of how the feature came to be.
- Code, commands, file names and settings in code formatting. Lists for steps and options, tables for comparisons, prose for reasons.
- Describe an image in the text too, and keep screenshots few; they go stale first.
## 6. Keep docs next to the code
- Documentation lives in the repository, in the place the project already uses, and changes in the same change as the code it describes.
- Reference text that can be generated from the code (command help, schemas, typed signatures) is generated by the project's tooling, not retyped.
- After a change, search the documentation for the old name, flag, path or behaviour and fix every mention.
- Check every link and every cross-reference in the touched files.
## 7. Report
1. **Files written or changed**, with the reader and goal of each.
2. **Verified**: the commands and examples that were run and their results.
3. **Not verified**, with the reason.
4. **Mismatches found** between the old documentation and the code, and code behaviour that looks like a bug.
5. **Gaps left**: topics that still have no documentation.
Rules: change documentation files only, unless the task also asks for code changes. Do not commit or push unless the task says so. When a fact cannot be established from the code or by running it, ask instead of guessing, and state exactly which fact is needed.