Load when writing, auditing, or repairing any doc a project ships — README, quick start, how-to, architecture record, API or CLI reference, docstrings, migration guide, release notes — or when a reader got stuck. Picks reader and doc type first, traces every identifier to a file actually read, and returns a friction log in audit mode.
Skill: Documentation Architect — Docs That Survive Contact With a Reader
Apply Guidelines Skill — load the guidelines-meta skill before proceeding.
Profile section owned: §Documentation Standards (Guidelines §5). On first use, if it is missing or TODO, read the repo for the answers first — the format is in the existing docs, the voice is in the README, the docstring convention is in the source, the site generator is in the manifest and config. Then fill it per Guidelines §5.1–§5.4. §Documentation Targets — which docs exist and when each is touched — is owned by rolling-history; read it, don't rewrite it.
The problem this exists to solve: documentation fails in two directions and both look fine from the inside. It is written from the code outward — accurate, complete, and useless, because it answers "what is this symbol" when the reader asked "how do I do the thing". Or it is written once, correctly, and then the code moves and the doc doesn't, so it becomes a confident liar that costs more than no doc at all. Everything below aims at one outcome: a reader with the stated goal gets there, and nothing in the file claims something the repo cannot back up.
Operational Constraints
Document what exists, not what is planned. An unbuilt flag, an unmerged endpoint, an aspirational config key — none of them appear. This is Guidelines §15 in the place it does the most damage: a fabricated code sample is executed by the reader, and it fails on their machine, not yours. If a doc must mention something not yet shipped, it is labelled unreleased and dated, or it waits.
Read the code before writing about it. Every command, path, flag, env var, endpoint, type, and default is read from a real file or run in a real shell before it is written down. Never transcribe from memory of what such a project usually does.
The project's committed doc conventions win. Markup flavour, heading depth, file layout, terminology, voice, and docstring style come from the docs that already exist — read a representative one before adding a sibling. Improving the house style is a separate task from writing today's page.
Surgical edits over rewrites. An existing doc gets the smallest edit that makes it true (Guidelines §3). A wholesale rewrite needs the user's agreement and a stated reason, because it destroys the review history of every sentence that was already correct.
Never create a doc the project doesn't have without asking. A new top-level file is scope creep, and an orphan doc nobody links to is worse than the gap it filled.
Bounded passes (Guidelines §16). Draft fully → one batched verification round (run the examples, resolve the links, check the symbols in the same pass) → one fix batch → at most one confirm round → stop.
1. Pick the Reader and the Doc Type First
A document serves one reader with one goal. Mixing types is the most common structural failure — the tutorial that stops to explain the architecture, the reference page that opens with a sales pitch, the how-to that turns into a changelog. Name the type in one line before writing.
Type
The reader is
Success looks like
What outranks what
Tutorial / Quick Start
New, no context, low patience
Something ran on their machine
Working beats complete. One happy path, zero choices, no theory. Every branch you offer is a place to stop.
How-to guide
Knows the goal, not the steps
The task is done
Task-shaped headings in the reader's words ("Deploy to staging", not "The deployment module"). No conceptual detours.
Reference
Knows what they want, needs exactness
Found the exact answer fast
Completeness and precision. Scannable, uniform, alphabetical or grouped. Personality is noise here.
Explanation / Architecture / ADR
Deciding, reviewing, or maintaining
Understands why it is like this
The reasoning, the alternatives rejected, and the constraint that forced the choice. This is the only type where prose is the point.
Two follow-on rules:
The README is not a type — it is a router. It answers "what is this, is it for me, how do I start" and then links out. A README that has grown a reference section has outgrown itself; propose splitting it rather than continuing to grow it.
If the reader can't be named, stop and ask. "The docs need updating" without a reader produces a page that serves nobody. One question here is cheaper than a rewrite.
2. Establish Ground Truth Before Writing
Cheapest signal first; nothing below is optional when the doc makes claims about any of it.
Resolve targets — from the profile's §Documentation Targets (owner: rolling-history), the file's path and whether it already exists. From §Documentation Standards, the markup flavour, voice, and any docs-site build. If neither section exists yet, read the docs that are there and match them.
Resolve the entry points you are about to document — the package manifest's scripts, the CLI's own --help, the router or route table, the exported surface, the env example. The manifest is the authority on commands, not the old README — a README that contradicts the manifest is the bug you are fixing, not a source.
Run the happy path yourself where the environment allows it. A quick start you have not executed is a hypothesis. If you cannot run it, say so in the output — "install steps read from the manifest, not executed here" — rather than implying verification you didn't do (Guidelines §15).
Check what the reader already hit. If this was triggered by someone getting stuck, their exact error is the spec. Reproduce it before rewriting around it.
3. The Documentation Floor
The floor and the refuse list — prerequisites before the first command, runnable language-tagged blocks, every identifier traced to a file you read, task-shaped headings, resolving links, fixed terminology, sourced version facts, diagrams that show a mechanism, and the slop a document defaults to when nobody decided — live in the module-writing-floor skill. Load it and sweep the rendered document against it in one batched verification round.
It is shared with product-architect, search-optimization-architect, rolling-history, and deployment-architect, all of which emit documents a reader follows. This skill owns which document to write and for whom; that module owns whether it reads.
4. One Home Per Fact
Doc rot is almost never a writing failure — it is a duplication failure. Every fact copied into a second file is a fact that will disagree with itself, and the copy nobody remembers is the one the reader finds.
The rule: each fact has exactly one authoritative home, and everything else links to it. Prefer the home the tooling already keeps honest.
Fact
Authoritative home
Docs should
Available commands / scripts
the package manifest
name the command, not restate the whole script list
Env vars and their defaults
the env example / config schema
link it; document meaning, not the list
CLI flags
the CLI's own help output
show real usage; generate the exhaustive table if the tool can
API request/response shapes
the schema or type definitions
link or generate; hand-copied payloads drift silently
Supported runtime versions
the manifest / CI matrix
cite which one it read
Current architecture
one architecture doc + its diagram
other docs link to it rather than re-describing
What shipped when
the changelog (owner: rolling-history)
never re-narrate release history in the README
When a duplicate is unavoidable (a quick start genuinely needs the install command inline), keep the copy minimal and marked: one line, plus a link to the home. And when you find an existing contradiction between two files, fix the direction of truth, not just the wording — say in the output which file you made authoritative and which now links to it.
5. What to Read, and When
Read
When
${CLAUDE_SKILL_DIR}/references/reference-docs.md
Writing reference docs or docstrings on an exported surface.
${CLAUDE_SKILL_DIR}/references/audit-mode.md
Auditing existing docs. Read-only; produces a friction log, not a verdict.
module-writing-floor
Always, before emitting. The floor and the refuse list.
module-findings
Reporting audit findings and their banded verdict.
6. Modes of Invocation
Ask
What this skill does
Generate a doc
§1 type → §2 ground truth → draft → module-writing-floor → §7 sweep.
Audit existing docs
references/audit-mode.md. Read-only, friction log first, path:line on every finding.
Reference for a module, API, or CLI
references/reference-docs.md over the exported surface only. Generate from schema or types where the project can; hand-write the when to use this.
Polish
module-writing-floor only. No restructuring, no new sections, no scope growth.
Explain / ADR
Explanation type: the constraint, the options considered, the choice, and what it costs. Record it where the project keeps decisions; if it keeps none, ask before creating that convention.
Release notes
User-facing translation of what shipped — "fixed a crash when creating a profile", not "fix NPE in UserSvc" — grouped as features / fixes / breaking, with a migration guide for every breaking item and the required action stated as steps. The changelog itself belongs to rolling-history; this produces the human-facing notes from it, and never invents a version number or a date.
Docstrings
references/reference-docs.md across the public surface. Never a docstring on a private helper whose name already says it (Guidelines §13).
7. Before Emitting — Gate Sweep
Run the six-axis pre-emit self-critique (Guidelines §18) first; anything under 3 gets one revision pass. Then confirm:
Reader and doc type named, and the document serves exactly one of each (§1).
Every command, path, flag, env var, and symbol traced to a file you read or a command you ran (§2, Guidelines §15).
The happy path was executed — or the output says plainly that it wasn't.
module-writing-floor swept: prerequisites first, blocks runnable and tagged, headings task-shaped, links and anchors resolve, no time estimates, refuse list clean.
No fact duplicated without a link to its home; any contradiction found was resolved by naming an authority (§4).
Diagrams show a mechanism, carry a caption, and match the current structure.
Nothing documented that does not exist yet; nothing unreleased mentioned without a label.
Edits were surgical; no doc created that the project didn't have without asking.
Verification stayed within two rounds (Guidelines §16).
If a gate fails, fix it. A confidently wrong doc costs more than a missing one.
v1.0 — version history in CHANGELOG.md
1---2name: documentation-architect3description: Load when writing, auditing, or repairing any doc a project ships — README, quick start, how-to, architecture record, API or CLI reference, docstrings, migration guide, release notes — or when a reader got stuck. Picks reader and doc type first, traces every identifier to a file actually read, and returns a friction log in audit mode.4---56# Skill: Documentation Architect — Docs That Survive Contact With a Reader78> **Apply Guidelines Skill** — load the `guidelines-meta` skill before proceeding.9> **Profile section owned:** §Documentation Standards (Guidelines §5). On first use, if it is missing or `TODO`, **read the repo for the answers first** — the format is in the existing docs, the voice is in the README, the docstring convention is in the source, the site generator is in the manifest and config. Then fill it per **Guidelines §5.1–§5.4**. §Documentation Targets — *which* docs exist and when each is touched — is owned by `rolling-history`; read it, don't rewrite it.1011**The problem this exists to solve:** documentation fails in two directions and both look fine from the inside. It is written *from the code outward* — accurate, complete, and useless, because it answers "what is this symbol" when the reader asked "how do I do the thing". Or it is written once, correctly, and then the code moves and the doc doesn't, so it becomes a confident liar that costs more than no doc at all. Everything below aims at one outcome: a reader with the stated goal gets there, and nothing in the file claims something the repo cannot back up.1213---1415## Operational Constraints16171. **Document what exists, not what is planned.** An unbuilt flag, an unmerged endpoint, an aspirational config key — none of them appear. This is Guidelines §15 in the place it does the most damage: a fabricated code sample is *executed* by the reader, and it fails on their machine, not yours. If a doc must mention something not yet shipped, it is labelled unreleased and dated, or it waits.182. **Read the code before writing about it.** Every command, path, flag, env var, endpoint, type, and default is read from a real file or run in a real shell before it is written down. Never transcribe from memory of what such a project usually does.193. **The project's committed doc conventions win.** Markup flavour, heading depth, file layout, terminology, voice, and docstring style come from the docs that already exist — read a representative one before adding a sibling. Improving the house style is a separate task from writing today's page.204. **Surgical edits over rewrites.** An existing doc gets the smallest edit that makes it true (Guidelines §3). A wholesale rewrite needs the user's agreement and a stated reason, because it destroys the review history of every sentence that was already correct.215. **Never create a doc the project doesn't have** without asking. A new top-level file is scope creep, and an orphan doc nobody links to is worse than the gap it filled.226. **Bounded passes** (Guidelines §16). Draft fully → one batched verification round (run the examples, resolve the links, check the symbols in the same pass) → one fix batch → at most one confirm round → stop.2324---2526## 1. Pick the Reader and the Doc Type First2728A document serves one reader with one goal. **Mixing types is the most common structural failure** — the tutorial that stops to explain the architecture, the reference page that opens with a sales pitch, the how-to that turns into a changelog. Name the type in one line before writing.2930| Type | The reader is | Success looks like | What outranks what |31|---|---|---|---|32| **Tutorial / Quick Start** | New, no context, low patience | Something ran on their machine | **Working beats complete.** One happy path, zero choices, no theory. Every branch you offer is a place to stop. |33| **How-to guide** | Knows the goal, not the steps | The task is done | Task-shaped headings in the reader's words ("Deploy to staging", not "The deployment module"). No conceptual detours. |34| **Reference** | Knows what they want, needs exactness | Found the exact answer fast | **Completeness and precision.** Scannable, uniform, alphabetical or grouped. Personality is noise here. |35| **Explanation / Architecture / ADR** | Deciding, reviewing, or maintaining | Understands *why* it is like this | The reasoning, the alternatives rejected, and the constraint that forced the choice. This is the only type where prose is the point. |3637Two follow-on rules:3839- **The README is not a type — it is a router.** It answers "what is this, is it for me, how do I start" and then *links out*. A README that has grown a reference section has outgrown itself; propose splitting it rather than continuing to grow it.40- **If the reader can't be named, stop and ask.** "The docs need updating" without a reader produces a page that serves nobody. One question here is cheaper than a rewrite.4142---4344## 2. Establish Ground Truth Before Writing4546Cheapest signal first; nothing below is optional when the doc makes claims about any of it.47481. **Resolve targets** — from the profile's §Documentation Targets (owner: `rolling-history`), the file's path and whether it already exists. From §Documentation Standards, the markup flavour, voice, and any docs-site build. If neither section exists yet, read the docs that are there and match them.492. **Resolve the entry points you are about to document** — the package manifest's scripts, the CLI's own `--help`, the router or route table, the exported surface, the env example. **The manifest is the authority on commands, not the old README** — a README that contradicts the manifest is the bug you are fixing, not a source.503. **Run the happy path yourself** where the environment allows it. A quick start you have not executed is a hypothesis. If you cannot run it, say so in the output — "install steps read from the manifest, not executed here" — rather than implying verification you didn't do (Guidelines §15).514. **Check what the reader already hit.** If this was triggered by someone getting stuck, their exact error is the spec. Reproduce it before rewriting around it.5253---5455## 3. The Documentation Floor5657The floor and the refuse list — prerequisites before the first command, runnable language-tagged blocks, every identifier traced to a file you read, task-shaped headings, resolving links, fixed terminology, sourced version facts, diagrams that show a mechanism, and the slop a document defaults to when nobody decided — live in the **`module-writing-floor`** skill. Load it and sweep the rendered document against it in one batched verification round.5859It is shared with `product-architect`, `search-optimization-architect`, `rolling-history`, and `deployment-architect`, all of which emit documents a reader follows. This skill owns *which document to write and for whom*; that module owns *whether it reads*.6061---6263## 4. One Home Per Fact6465Doc rot is almost never a writing failure — it is a **duplication** failure. Every fact copied into a second file is a fact that will disagree with itself, and the copy nobody remembers is the one the reader finds.6667The rule: **each fact has exactly one authoritative home, and everything else links to it.** Prefer the home the tooling already keeps honest.6869| Fact | Authoritative home | Docs should |70|---|---|---|71| Available commands / scripts | the package manifest | name the command, not restate the whole script list |72| Env vars and their defaults | the env example / config schema | link it; document *meaning*, not the list |73| CLI flags | the CLI's own help output | show real usage; generate the exhaustive table if the tool can |74| API request/response shapes | the schema or type definitions | link or generate; hand-copied payloads drift silently |75| Supported runtime versions | the manifest / CI matrix | cite which one it read |76| Current architecture | one architecture doc + its diagram | other docs link to it rather than re-describing |77| What shipped when | the changelog (owner: `rolling-history`) | never re-narrate release history in the README |7879When a duplicate is unavoidable (a quick start genuinely needs the install command inline), keep the copy **minimal and marked**: one line, plus a link to the home. And when you find an existing contradiction between two files, **fix the direction of truth, not just the wording** — say in the output which file you made authoritative and which now links to it.8081---8283## 5. What to Read, and When8485| Read | When |86|---|---|87| `${CLAUDE_SKILL_DIR}/references/reference-docs.md` | Writing reference docs or docstrings on an exported surface. |88| `${CLAUDE_SKILL_DIR}/references/audit-mode.md` | Auditing existing docs. Read-only; produces a friction log, not a verdict. |89| `module-writing-floor` | Always, before emitting. The floor and the refuse list. |90| `module-findings` | Reporting audit findings and their banded verdict. |9192---9394## 6. Modes of Invocation9596| Ask | What this skill does |97|---|---|98| **Generate** a doc | §1 type → §2 ground truth → draft → `module-writing-floor` → §7 sweep. |99| **Audit** existing docs | `references/audit-mode.md`. Read-only, friction log first, `path:line` on every finding. |100| **Reference** for a module, API, or CLI | `references/reference-docs.md` over the exported surface only. Generate from schema or types where the project can; hand-write the *when to use this*. |101| **Polish** | `module-writing-floor` only. No restructuring, no new sections, no scope growth. |102| **Explain / ADR** | Explanation type: the constraint, the options considered, the choice, and what it costs. Record it where the project keeps decisions; if it keeps none, ask before creating that convention. |103| **Release notes** | User-facing translation of what shipped — "fixed a crash when creating a profile", not "fix NPE in UserSvc" — grouped as features / fixes / **breaking**, with a migration guide for every breaking item and the required action stated as steps. The **changelog itself belongs to `rolling-history`**; this produces the human-facing notes from it, and never invents a version number or a date. |104| **Docstrings** | `references/reference-docs.md` across the public surface. Never a docstring on a private helper whose name already says it (Guidelines §13). |105106---107108## 7. Before Emitting — Gate Sweep109110Run the six-axis pre-emit self-critique (Guidelines §18) first; anything under 3 gets one revision pass. Then confirm:111112- [ ] Reader and doc type named, and the document serves exactly one of each (§1).113- [ ] Every command, path, flag, env var, and symbol traced to a file you read or a command you ran (§2, Guidelines §15).114- [ ] The happy path was executed — or the output says plainly that it wasn't.115- [ ] `module-writing-floor` swept: prerequisites first, blocks runnable and tagged, headings task-shaped, links and anchors resolve, no time estimates, refuse list clean.116- [ ] No fact duplicated without a link to its home; any contradiction found was resolved by naming an authority (§4).117- [ ] Diagrams show a mechanism, carry a caption, and match the current structure.118- [ ] Nothing documented that does not exist yet; nothing unreleased mentioned without a label.119- [ ] Edits were surgical; no doc created that the project didn't have without asking.120- [ ] Verification stayed within two rounds (Guidelines §16).121122If a gate fails, fix it. A confidently wrong doc costs more than a missing one.123124---125126_v1.0 — version history in CHANGELOG.md_
Run npx skillmds@latest add matis-dev/documentation-architect 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.
Load when writing, auditing, or repairing any doc a project ships — README, quick start, how-to, architecture record, API or CLI reference, docstrings, migration guide, release notes — or when a reader got stuck. Picks reader and doc type first, traces every identifier to a file actually read, and returns a friction log in audit mode. It is listed under Security 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.
matis-dev (@matis-dev) published this skill. Their other Agent Skills are listed on their SkillMD profile.