/software-writer:writing-docsfrom software-writer
Guides writing and editing repository documentation surfaces (READMEs, architecture docs, CLAUDE.md/AGENTS.md pointer files). Enforces the invariant that every fact has exactly one owning surface.
Ships in software-writer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Where an existing surface diverges from a rule below, the rule wins — fix the surface, do not copy the divergence.
The governing invariant: every fact has exactly one owning surface. Other surfaces point at it — §Heading by name — they do not restate it. Surfaces registered as exempt-duplication via docs.surfaces are the only exception.
The workflow below can be extended by content earlier in context. Two shapes are recognized:
## Pre-Step-N. If it does, execute its content as additional instructions, then continue with Step N. After Step N, do the same check for ## Post-Step-N.`docs.pointer_file`). When such a name appears, check whether earlier context assigns a value to it. If yes, use the assigned value; otherwise use the inline default.Both checks default to no-op. When earlier context contains no matching section or assignment, the skill runs entirely on the defaults documented inline. Extension content may cite project files by path; read a cited file when the step that cites it runs, not before.
digraph writing_docs {
"Start" [shape=doublecircle];
"Step 1: Confirm the surface" [shape=box];
"Surface type?" [shape=diamond];
"STOP: wrong skill — code comment, commit/PR prose, or plan" [shape=octagon, style=filled, fillcolor=red];
"Step 2: Apply the surface shape (prose)" [shape=box];
"Module owns a hard cross-cutting constraint?" [shape=diamond];
"STOP: module gets no pointer file" [shape=octagon, style=filled, fillcolor=red];
"Step 2: Apply the pointer skeleton" [shape=box];
"Step 3: Write the content (prose)" [shape=box];
"Step 3: Write the pointer bullets" [shape=box];
"Step 4: Anti-slop pass" [shape=box];
"Step 5: Final quality gate" [shape=box];
"All checks pass?" [shape=diamond];
"Done" [shape=doublecircle];
"Start" -> "Step 1: Confirm the surface" -> "Surface type?";
"Surface type?" -> "STOP: wrong skill — code comment, commit/PR prose, or plan" [label="out of scope"];
"Surface type?" -> "Step 2: Apply the surface shape (prose)" [label="prose surface"];
"Surface type?" -> "Module owns a hard cross-cutting constraint?" [label="pointer file"];
"Module owns a hard cross-cutting constraint?" -> "STOP: module gets no pointer file" [label="no"];
"Module owns a hard cross-cutting constraint?" -> "Step 2: Apply the pointer skeleton" [label="yes"];
"Step 2: Apply the surface shape (prose)" -> "Step 3: Write the content (prose)" -> "Step 4: Anti-slop pass" -> "Step 5: Final quality gate";
"Step 2: Apply the pointer skeleton" -> "Step 3: Write the pointer bullets" -> "Step 5: Final quality gate";
"Step 5: Final quality gate" -> "All checks pass?";
"All checks pass?" -> "Done" [label="yes"];
"All checks pass?" -> "Step 2: Apply the surface shape (prose)" [label="single-owner fails (prose)"];
"All checks pass?" -> "Step 2: Apply the pointer skeleton" [label="single-owner fails (pointer)"];
"All checks pass?" -> "Step 3: Write the content (prose)" [label="cross-ref or drift fails (prose)"];
"All checks pass?" -> "Step 3: Write the pointer bullets" [label="cross-ref or drift fails (pointer)"];
}
Name the single surface the content belongs on. The default taxonomy — docs.surfaces replaces or extends the whole map, including per-surface exemptions from the single-owner invariant; default if not otherwise stated: the built-in taxonomy below.
docs/architecture.md) — cross-module narrative plus the invariant-to-owner index.docs.pointer_file; default if not otherwise stated: CLAUDE.md (alternative AGENTS.md; none disables the pointer branch entirely).docs.changelog registers one; default if not otherwise stated: none — do not create a changelog surface.Code comments, commit messages, PR descriptions, and procedural plans or specs are out of scope — STOP and use the owning skill for that content.
Prose branch. Load references/surface-shapes.md for the fixed shape of the target surface. The shape is not yours to refine mid-edit.
Pointer branch. Load references/pointer-file.md for the existence gate, the skeleton, the per-bullet decision test and the companion-file rule. Apply the existence gate first: a module that fails it gets no pointer file (STOP). When the project maintains both the CLAUDE.md and AGENTS.md conventions, apply the companion-file rule.
Prose branch. Apply while writing, not retroactively. docs.style sets the style targets; default if not otherwise stated: sentences ≤25 words averaging 12-17; paragraphs ≤4 sentences; active voice predominant. A number stays only when replacing it with "several" would lose information. docs.jargon_home names the surface where project jargon is defined; default if not otherwise stated: docs/architecture.md. docs.diagrams sets the diagram stance; default if not otherwise stated: add a diagram only when a table cannot express the relationship. Load references/writing-style.md for the heading rule, jargon discipline and diagram stance.
Pointer branch. Write pointer bullets, not prose, within the skeleton's ceilings: every ## Before editing bullet ends with (README §Heading), a root-level pointer file naming the target file path in place of README; no motivation in bullets; front-load by stakes; identifiers mirror the code.
Skip this step for pointer files — bullet pointers, not prose.
For prose surfaces: dispatch the human-author:ai-slop-writing-fixer subagent via the Agent tool with the edited prose as content. Replace the draft with the returned fixed_content. A non-empty changes list means the violations are already corrected — do not re-apply them.
Three checks over the diff:
Single-owner. For each fact in the diff, does another surface already own it? Point or delete the duplicate, keeping the copy on the surface that owns the fact. Surfaces registered as exempt in docs.surfaces skip this check.
Cross-ref integrity. For every heading renamed in this edit, search §<old name> across every surface and update each cross-ref in the same edit.
Code-vs-claim sweep. Every contract row and behavior claim in the diff matches what the named code does today. A doc edit that ships drifted is a regression — fix the doc to match current code, or fix the code to match the contract.
Failure edges: a single-owner failure returns to Step 2 of the matching branch; a cross-ref or drift failure returns to Step 3 of the matching branch.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub it-bens/ai-tools --plugin software-writer4 skills in this plugin
/sweeping-dead-codeUse when the user explicitly asks to find, list, audit, or sweep unused or dead code across a path, the repository, or a branch. Reports only and never edits code. Do NOT activate during implementation work; writing-code handles code an edit orphans./writing-codeUse when writing or editing implementation code — any change that adds, modifies, or removes logic, signatures, or comments on the lines being written. Also covers reviewing, cleaning up, or improving the comments on code being edited. Do NOT activate for test files and their fixtures (the writing-tests skill owns those)./writing-testsUse when authoring, editing, or reviewing an automated test — any change to a test file or its fixtures.Other plugins' skills for the same job