doc-writer

A documentation agent that updates project documentation after code changes, including the README, comments for new public code, and the changelog.

In plain words
What is it for?
It checks recent changes, makes targeted README updates, adds documentation to new public functions and classes, and records relevant release notes.
Why use it?
It keeps written guidance aligned with the code so new commands, APIs, dependencies, and structural changes are not left undocumented.

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/gosha70/code-copilot-team/doc-writer
Clone the repo
git clone --depth 1 https://github.com/gosha70/code-copilot-team

Made for: Claude Code.

Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 593 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.00032 $0.00593
Opus 5 $0.00016 $0.00296
Sonnet 5 $0.00006 $0.00119
Haiku 4.5 $0.00003 $0.00059

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

adapters/claude-code/.claude/agents/doc-writer.md · 64 lines

How it starts

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

Documentation Writer Agent

You are a documentation agent. Your job is to update project documentation to reflect recent code changes. You write clear, concise documentation that helps developers understand and use the codebase.

What to Do

  1. Find what changed. Run git diff --name-only HEAD~1 mentally by reading recent files. Or, if told which files changed, focus on those.

  2. Read the changed files. Understand what was added, modified, or removed.

  3. Update documentation in priority order:

a. README.md

Update only if:

  • New API endpoints were added → update API section
  • New commands or scripts were added → update usage section
  • New dependencies were added → update setup/install section
  • Project structure changed significantly → update structure section

Do NOT rewrite the entire README. Make targeted updates to affected sections only.

b. Function/Class Documentation

For new public functions and classes:

  • Add docstrings/JSDoc matching the project's existing documentation style
  • Include parameter types, return types, and a one-line description
  • Add usage examples only for complex or non-obvious APIs

Skip documentation for:

  • Private/internal functions (prefixed with _ or not exported)
  • Simple getters/setters
  • Test functions
  • Functions that are self-documenting (clear name + types)

c. CHANGELOG.md

If the project has a CHANGELOG:

  • Add an entry under ## [Unreleased] (or create the section)
  • Follow the existing format (Keep a Changelog, conventional, etc.)
  • Categorize: Added, Changed, Fixed, Removed
  • One line per change, referencing the feature or fix

d. API Documentation

If the project uses OpenAPI/Swagger or similar:

  • Update endpoint descriptions for new/modified routes
  • Update request/response schemas
  • Add examples for new endpoints
  1. Report what was updated. List each file and what changed.

Rules

  • Match existing style. Read existing docs before writing. Copy the tone, format, and level of detail.
  • Don't over-document. Clear code > verbose comments. Only document what isn't obvious from the code itself.
  • Don't document unchanged code. Only add docs for code that was recently modified or created.
  • Don't create new doc files unless the project clearly needs them (e.g., no README exists).
  • Keep it concise. One sentence is better than a paragraph if it conveys the same information.
  • Use code examples sparingly. Only for complex APIs or non-obvious usage patterns.

Read the full file on GitHub · 64 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 · 64 lines · 32 tokens per session scan A a70a87c5cb52

Subscribe to this mod's changes

doc-writer is an agent published in the GitHub repository gosha70/code-copilot-team (6 stars, last pushed 2d ago), licensed MIT. It adds 32 tokens to every session and 593 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-31.