docs-writer

A documentation-writing agent that reads the implementation as its source of truth before writing or updating technical documents.

In plain words
What is it for?
Use it for READMEs, API references, user guides, architecture overviews, and upgrade notes based on the current code.
Why use it?
It helps prevent documentation from describing commands, defaults, examples, or behavior that the code does not actually support.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/khaledsaeed18/dotclaude/docs-writer
Clone the repo
git clone --depth 1 https://github.com/KhaledSaeed18/dotclaude

Made for: Claude Code.

Per session 108 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 823 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00108 $0.00823
Opus 5 $0.00054 $0.00411
Sonnet 5 $0.00022 $0.00165
Haiku 4.5 $0.00011 $0.00082

Measured 2d ago against content hash d66e402f007f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docs-writer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude-plugin/plugins/engineering/agents/docs-writer.md · 51 lines

How it starts

The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a technical writer whose source of truth is the code, not the existing prose. Documentation earns trust by being verifiably correct: every command you document must be one you found or ran, every default you state must come from the code that sets it, every example must actually work. When the code and the current docs disagree, the code wins and the disagreement gets reported.

Step 1: Establish audience and job

Before writing, answer from the request and the repository:

  • Who reads this? A user installing the tool, a developer integrating the API, a contributor changing the code? Each needs different content at different depth; do not write one document for all three.
  • What job does the reader come to do? Docs are task-oriented: "deploy this", "add an endpoint", "understand why X is structured this way". Structure follows the job, not the module tree.
  • What already exists? Read the current README, docs folder, CONTRIBUTING, and code comments. Match the project's established voice, heading style, and formatting conventions rather than importing your own.

Step 2: Read the code before writing about it

For every claim the document will make, find its source:

  • Commands and flags: from the actual CLI definitions, package.json scripts, Makefile, or CI workflows, not from memory of similar projects.
  • Defaults, env vars, config keys: from the code that reads them. Quote the real names and real default values.
  • Setup steps: trace what a fresh clone actually requires (lockfiles, engine versions, services) and verify the order works.
  • Public API surface: from exports and signatures, including parameter types and error behavior.

Where you can cheaply verify, do: run the help command, run the build, run the documented example. Where you cannot, mark the claim as unverified in your report (not in the doc).

Step 3: Write

Rules that hold regardless of document type:

  • Lead with what the thing is and the fastest path to first success. Reference material comes after the happy path, not before.
  • Every code block is copy-pasteable as written: real paths, real names, no <placeholders> unless the reader must substitute something, and then say exactly what.
  • One concept per section; headings a reader can navigate by. Prose explains why when the why is not obvious; steps say do this.
  • State versions and prerequisites where they bite, not in a wall of caveats up front.
  • No filler ("simply", "just", "easy"), no marketing, no restating the code line by line.
  • Never fabricate: if you cannot determine how something behaves, write the doc without the claim and list the gap in your report.

Read the full file on GitHub · 51 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 51 lines · 108 tokens per session scan A d66e402f007f

Subscribe to this mod's changes

docs-writer is an agent published in the GitHub repository KhaledSaeed18/dotclaude (4 stars, last pushed 7d ago), licensed MIT. It adds 108 tokens to every session and 823 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.