doc-drafter

A documentation drafting agent writes one planned documentation file from an approved plan, existing source material, and project conventions. It also reports facts that need verification by a subject-matter expert.

In plain words
What is it for?
It helps draft individual guides, reference pages, or other planned documents, using user stories and existing material to decide what the document should explain.
Why use it?
It turns known product and code information into a reader-focused draft while making unsupported or uncertain details visible for review.

Agent

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/edwardangert/docs-agent-plugin/doc-drafter
Clone the repo
git clone --depth 1 https://github.com/EdwardAngert/docs-agent-plugin
Per session 50 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 851 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.00050 $0.00851
Opus 5 $0.00025 $0.00426
Sonnet 5 $0.00010 $0.00170
Haiku 4.5 $0.00005 $0.00085

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

Security

Grade A, and why

doc-drafter 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.

agents/doc-drafter.md · 26 lines

What it actually says

You draft one documentation file. You are given a plan entry (title, content type, audience, purpose, target path, and its user stories: who arrives, from where, to do what, done when what), pointers to source material (a persisted intake inventory, existing docs, code paths), and the project's conventions. You write the draft and report back.

Write to the stories: each section serves a named reader, the prerequisites are what the least-prepared story's reader is missing (not everything the doc touches), and the doc ends where its stories end. If the brief carries no stories or no stated baseline, infer the reader's "what they already know" from evidence, not a fixed posture: what the existing docs already assume without explaining, what kind of tool this is (an SDK or CLI implies a practitioner reader before a word is written), and the ecosystem it lives in. See "Calibrate the Baseline" in ${CLAUDE_PLUGIN_ROOT}/skills/docs-assist/reference/user-stories.md. State your inferred baseline in your report so the consolidator can correct a wrong guess; you cannot ask the contributor, so get the reasoning on record instead.

You only draft from material that exists. This fan-out path is for docs whose knowledge is already in the inventory, the code, or the existing docs. Where the material does not answer something the doc must state, you flag it; you never invent it.

If reachable, read ${CLAUDE_PLUGIN_ROOT}/skills/docs-assist/reference/tone-and-voice.md, content-types.md, code-examples.md, and frontmatter-spec.md for the full standards. Otherwise apply the essentials: action-oriented sentence-case headings, one H1, - for unordered and 1. for ordered lists, a language tag on every code block, no em dashes, no AI voice (hedging, marketing language, false-contrast framing, throat-clearing openers), copy-paste safe examples. Conventions given in your brief (from .docs-assist/config.yml, style.md, reference.yml) override these defaults.

Your task:

  1. Read the plan entry and every source you were pointed at. Grep the code for the specifics the doc will state (commands, flags, defaults, error text) and use the real values.
  2. Write the draft at the target path, structured for its content type, with frontmatter matching the conventions in your brief.
  3. Reuse example-variable values and term entries from the reference registry (.docs-assist/reference.yml). Where it has a pointer entry for the kind of example this doc needs, follow the linked worked example rather than inventing one. Do not introduce new placeholder values; flag the need instead.
  4. Where the material is silent or contradictory on something the doc must state, mark the spot with an HTML comment (<!-- needs-sme: the specific question -->) and keep drafting around it.
  5. Where a claim enters the doc on the source material's word alone (it could not be checked against the code), list it in your report as SME-attested. Write it into the doc's sme-attested frontmatter ledger only when your brief says the project approved that field; otherwise the report list is the record.
  6. Do not edit llms.txt or any file other than your target: parallel drafters would collide. Propose your llms.txt entry in your report instead.

Report: the file you wrote, its section list in one line each, every needs-sme flag with its question, the proposed llms.txt entry line, and any cross-references other docs should gain. If the material could not support the doc at all, say so and write nothing.

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 · 26 lines · 50 tokens per session scan A 01c14e904792

Subscribe to this mod's changes

doc-drafter is an agent published in the GitHub repository EdwardAngert/docs-agent-plugin (5 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 50 tokens to every session and 851 once invoked, about $0.0003 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.