Skip to content

documentation-writer agent

The agent works as a technical writer inside your repository, in its own context. You give it a scoped documentation task, and it does the writing following the technical-writing skill while your main session stays on the code.

Use it for a documentation pass with a clear scope:

  • documenting the public API of a module or service;
  • writing a concept, quickstart, how-to or component page, or a section of a user manual;
  • rewriting or translating existing pages without losing technical content;
  • drafting error messages, runbooks or release notes from a commit range;
  • updating doc comments and implementation comments after a change.

Claude Code can delegate to it when the task fits, or you can ask for it by name. Give it the target files or area, the source material (specs, design notes, commits) and, if you know it, the audience:

use the documentation-writer agent to document the public API of src/refunds/, from docs/specs/refunds.md

After docs-impact writes its report, the skill offers to delegate the changes to this agent, using the report as its starting context.

The agent stays within the scope you give it: if it finds wrong or stale documentation nearby, it reports the issue instead of fixing it. Every fact it writes comes from the source material or the code. It reads the project’s ## Documentation section, determines the audience for each document and writes in the language of the document it edits. Project references are moved out of user documentation into implementation comments, specs or decision records rather than dropped, and the agent considers adding a diagram for flows, lifecycles, processes, architecture and data models.

Once the edits are done, it runs the leak scan on every file it changed and, for a rewrite or translation, the fidelity check against a copy of the original. It does not commit or push.

The agent makes the file changes and returns a reply in a fixed order. The reply reports the files changed, the project references it moved and where they now live, the diagrams drawn or their briefs, the gaps (facts missing from the source material, phrased as questions for the owner), the leak scan command with its output and the fidelity check result for a rewrite.

  • It uses only the tools it is given: reading, writing and editing files, searching, and running the two checks in the shell.
  • It draws a diagram only with a skill or tool that produces that diagram type; otherwise it writes a brief.
  • It does not review its own work independently: that is the job of the documentation-reviewer.