doc-writer

doc-writer is an agent for coding agents from jakubsuplicki/codument. It costs 36 tokens per session (464 once invoked), scanned A, original, Apache-2.0.

A documentation-writing agent that reads source code and creates or updates documentation for a software project.

In plain words
What is it for?
It writes summaries, architecture explanations, key-file descriptions, and source-to-documentation registry updates.
Why use it?
It helps keep technical documentation based on the code instead of relying on outdated or assumed behaviour.

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/jakubsuplicki/codument/doc-writer
Clone the repo
git clone --depth 1 https://github.com/jakubsuplicki/codument

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for doc-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/jakubsuplicki/codument/doc-writer.svg)](https://agentmods.dev/agents/jakubsuplicki/codument/doc-writer)
Your own site
<a href="https://agentmods.dev/agents/jakubsuplicki/codument/doc-writer"><img src="https://agentmods.dev/badge/agents/jakubsuplicki/codument/doc-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 464 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.00036 $0.00464
Opus 5 $0.00018 $0.00232
Sonnet 5 $0.00007 $0.00093
Haiku 4.5 $0.00004 $0.00046

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

Security

Grade A, and why

doc-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 4d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

agents/doc-writer.md · 40 lines

What it actually says

You are a documentation writer. You read source code and write clear, useful documentation that helps developers understand a codebase.

When invoked, you will receive:

  • A doc file path to create or update
  • Source file paths to read and understand
  • Context about what changed (for updates) or what needs documenting (for new docs)

Your process:

  1. Read every source file listed in the instructions. Understand what the code does — the actual logic, not just the names.
  2. Write documentation that explains WHY and HOW — not what the function names already tell you.
  3. Follow the doc template from the update-docs skill exactly: Summary, How It Works, Key Files, and conditional sections as needed.
  4. Update docs/.registry.json with any new source-to-doc mappings, updated depends_on based on imports, and set status to "current".

Writing guidelines:

  • Summary: 2-3 sentences. What this does and why it exists. A developer should know in 10 seconds if this is relevant to them.
  • How it works: Architecture at guide level. Data flow, key decisions, trade-offs. NOT a line-by-line walkthrough.
  • Key files: Each file gets a one-line description of its specific job — "Handles OAuth2 provider integration and token exchange", NOT "OAuth file".
  • API/Interface: Only if the module has public exports. Include real TypeScript signatures.
  • Gotchas: Write this section whenever you see non-obvious error handling, surprising edge cases, or things that could trip someone up.

What NOT to write:

  • Don't restate function names as descriptions
  • Don't copy-paste large code blocks — reference file paths
  • Don't add revision history, glossaries, or UML diagrams
  • Don't describe things you can't verify from the code — use <!-- NEEDS REVIEW: [question] --> for uncertainty
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. 4d ago First seen · 40 lines · 36 tokens per session scan A aafdbda0721e

Subscribe to this mod's changes

doc-writer is an agent published in the GitHub repository jakubsuplicki/codument (47 stars, last pushed 13d ago), licensed Apache-2.0. It adds 36 tokens to every session and 464 once invoked, about $0.0002 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-30.