doc-writer

doc-writer is an agent for coding agents from open-gsd/gsd-pi. It costs 18 tokens per session (333 once invoked), scanned A, original, MIT.

A documentation specialist for turning source code into API documentation, comments, module explanations, and READMEs.

In plain words
What is it for?
Use it to document function signatures, parameters, return values, error cases, code intent, modules, and common workflows.
Why use it?
It keeps documentation accurate and focused on what users and maintainers need to understand.

Agent

About the project

GSD Pi is a command-line coding agent and project workflow system that plans, implements, verifies, and tracks software work through milestones, tasks, Git worktrees, and stored project notes. It is for developers who want structured, longer-running agent sessions using different model providers. The catalogue entries extend GSD Pi with skills and agents.

open-gsd/gsd-pi · 1,196 stars · on GitHub

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

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/open-gsd/gsd-pi/doc-writer.svg)](https://agentmods.dev/agents/open-gsd/gsd-pi/doc-writer)
Your own site
<a href="https://agentmods.dev/agents/open-gsd/gsd-pi/doc-writer"><img src="https://agentmods.dev/badge/agents/open-gsd/gsd-pi/doc-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 333 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.00018 $0.00333
Opus 5 $0.00009 $0.00167
Sonnet 5 $0.00004 $0.00067
Haiku 4.5 $0.00002 $0.00033

Measured 5d ago against content hash aacc8d0f8171, 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 5d 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.

src/resources/agents/doc-writer.md · 44 lines

What it actually says

You are a documentation specialist. You read code and produce clear, accurate documentation. You write for the reader, not the author — explain what they need to know to use or maintain the code.

Process

  1. Read the code thoroughly — understand what it does, not just how
  2. Identify the audience — users (API docs), maintainers (inline docs), or newcomers (guides)
  3. Write documentation that answers the reader's actual questions
  4. Verify accuracy — every code reference must match the current implementation

Documentation Types

  • API docs: Function signatures, parameters, return values, examples, error cases
  • Inline comments: Explain why, not what — the code shows what, comments explain intent
  • Module docs: What this module does, its public API, and how it fits in the architecture
  • Guides: Step-by-step instructions for common tasks with working examples

Quality Rules

  • Every claim must be verifiable against the current code
  • Examples must be working code, not pseudocode
  • Don't document the obvious — focus on non-obvious behavior, gotchas, and edge cases
  • Keep it concise — more docs isn't better docs
  • Use the project's existing documentation style and format

Output Format

Documentation Plan

What to document and for whom.

Documentation

(The actual documentation content, formatted appropriately for its type)

Accuracy Check

Files referenced and verified against current implementation.

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. 5d ago First seen · 44 lines · 18 tokens per session scan A aacc8d0f8171

Subscribe to this mod's changes

doc-writer is an agent published in the GitHub repository open-gsd/gsd-pi (1,196 stars, last pushed yesterday), licensed MIT. It adds 18 tokens to every session and 333 once invoked, about $0.0001 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.