Skip to content
Back to skills

Writing Documentation

ASecurity

Writes and edits documentation so its prose holds only what code cannot express. Use when the user says "document this", or when writing or editing a README, a docs/ or architecture page, AGENTS.md, or doc comments. Not for design docs; use writing-technical-design-docs. Not for other prose; use writing-prose.

  • 3 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added December 1, 2026
ai-agentsgoexpressdocumentation

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add bostonaholic/skills --skill writing-documentation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Writing Documentation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Writing Documentation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bostonaholic-writing-documentation/badge)](https://www.skillsdirectory.com/skills/bostonaholic-writing-documentation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: writing-documentation
description: Writes and edits documentation so its prose holds only what code cannot express. Use when the user says "document this", or when writing or editing a README, a docs/ or architecture page, AGENTS.md, or doc comments. Not for design docs; use writing-technical-design-docs. Not for other prose; use writing-prose.
---

# Writing documentation

Documentation, comments included, puts in prose only what code cannot express. Prose that restates the code goes stale, and nothing fails when it does.

## The test

- For each sentence, ask: could the reader get this by opening the file it names? If yes, cut the sentence and name the file or symbol.
- Prefer a name, a type, an assertion, or a test over prose when one can hold the fact.

## Keep

- One diagram of the components, each arrow pointing from the dependent to what it depends on.
- Where things live: paths and entry points.
- Rules that span files: ordering, idempotency, locks, transactions, "X never calls Y".
- Decisions, each with the alternative it rejected and the reason.
- Traps: intended behavior that looks like a bug, and limits an outside system imposes.

## Cut

- Method signatures and argument lists.
- Constant values.
- Enumerations of codes and states.
- Field and column lists.
- Step-by-step narration of what a function does.
- Ticket and PR numbers, dates, and "previously".

## Editing an existing page

- Edit the page in place. Do not split or move pages unless asked.
- Before deleting text, check whether a code comment or test already states it. A decision, cross-file rule, or trap that exists nowhere else stays, shortened to one or two lines.
- Check every claim you keep or add against the code. When the code contradicts one, decide which side is wrong as [docs and code](shared/docs-vs-code.md) says.

## Sentences and source comments

- For sentence style, call the Skill tool with `writing-prose`. If it is not installed, write short, plain sentences with no em dashes.
- For comments in source files, doc comments included, call the Skill tool with `writing-no-comments` and follow its keep list. If it is not installed, apply the Keep and Cut lists above to each comment.
- Without a Skill tool, follow the [skill call rules](shared/skill-calls.md).

## Report

Citations go in the report, never in the page. Use this default and adapt it:

- Per page: words before and after (`wc -w`).
- Each claim the code contradicted: the page line, the code's `path:line`, and what you changed.
- Each claim kept or added: the `path:line` that supports it.

Files in this skill

  • SKILL.md2.5 KB
  • agents/openai.yaml275 B
  • shared/docs-vs-code.md1.3 KB
  • shared/skill-calls.md446 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.