Decides what a document holds and what it leaves to the code: names the audience first, keeps the why, the invariants, the traps and the knowledge that lives outside the code, points at the defining file instead of copying values, and cuts what no reader needs. Use when writing, rewriting or cutting a README, an architecture or contributor guide, user documentation, or an agent instruction file such as CLAUDE.md or AGENTS.md, and when a change makes a document's subject obsolete.
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 Writing Documentation?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/jpicklyk-writing-documentation)
---
name: writing-documentation
description: "Decides what a document holds and what it leaves to the code: names the audience first, keeps the why, the invariants, the traps and the knowledge that lives outside the code, points at the defining file instead of copying values, and cuts what no reader needs. Use when writing, rewriting or cutting a README, an architecture or contributor guide, user documentation, or an agent instruction file such as CLAUDE.md or AGENTS.md, and when a change makes a document's subject obsolete."
user-invocable: false
---
# Writing Documentation
Where the project documents its own conventions for documents, they take precedence over this skill.
## Before writing
- Name the document's audience (user, contributor or agent) and its one type. A document that serves two audiences is split into two.
- For each section ask: could a reader with the code and a search find this in a minute? If yes, cut it, unless it is one of the things the next list keeps. A pointer to a check that enforces a rule stays too, as the agent-file rule below says.
- Cut before you update. A change may cut a section or a whole document, and should when its subject is gone. A living doc that keeps describing something that no longer exists misleads more than a gap does. When the subject is gone, cut the section (or the document) with no note that it is gone or was removed: a note about an absent thing is still a claim about it. History belongs in the changelog.
## What a document keeps
What the code cannot say:
- The why: decisions, rejected options, consequences.
- Invariants and boundaries, including an absence ("nothing here talks to the network").
- Traps, where reading the code would mislead.
- Knowledge outside the repository: how to verify, deploy and run the process around the code.
- A coarse map of modules by searchable name, not a tour of files.
- A user's tasks: getting started, how-to, troubleshooting, public reference.
## What it never copies
- A count, default, limit, version or inventory: point at the defining file or symbol, or generate the block.
- A file and line: name the symbol instead of linking a location that moves.
- A fact that has a home elsewhere: link to the home. One fact, one home.
## Agent instruction files
- Hold only what an agent cannot discover from the code. No overview of the tree and no list of files.
- A rule that must always hold belongs in an automated check. Once the check exists, the prose line shrinks to a pointer at where the check lives; it is never cut.
## Records
- The why a reader needs stays in the document. A decision that a later reader might undo also earns a decision record (context, options, consequences), written once and not edited to match later changes.
- A changelog entry is history: it is not edited to match the code later.