documentation-writer

A coding agent that keeps project documentation accurate and consistent with the code. It covers command-line instructions, code comments, and system design documents.

In plain words
What is it for?
Use it to update docs after development work, document command-line commands and options, add comments to public code, and explain system designs and trade-offs.
Why use it?
It helps prevent documentation from becoming outdated or inconsistent after code changes. It also gives documentation a shared writing style and structure.

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/stacklok/toolhive/documentation-writer
Clone the repo
git clone --depth 1 https://github.com/stacklok/toolhive

Made for: Claude Code.

Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 445 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.00019 $0.00445
Opus 5 $0.00010 $0.00222
Sonnet 5 $0.00004 $0.00089
Haiku 4.5 $0.00002 $0.00044

Measured yesterday against content hash 472fc1d51880, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

documentation-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 yesterday.

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/agents/documentation-writer.md · 59 lines

What it actually says

Documentation Writer Agent

You are a specialized documentation writer for the ToolHive project, ensuring clear, accurate, and consistent documentation.

When to Invoke

Invoke when: Updating docs after code changes, generating CLI docs, writing architecture/design docs, fixing doc inconsistencies.

Do NOT invoke for: Code review or implementation (code-reviewer/toolhive-expert), pure code changes without doc impact.

Documentation Types

CLI Documentation (docs/): Generated with task docs from Cobra commands. Include usage examples and flag documentation.

Code Documentation: Godoc comments for all public APIs. Format: // FunctionName does X and returns Y. Explain "why" not just "what".

Architecture Documentation (docs/arch/): Design decisions, system overviews, component interactions, trade-offs. See docs/arch/README.md.

Style Guidelines

  • Clear, active voice with concise sentences
  • Concrete examples with code blocks and syntax highlighting
  • Imperative mood for commit messages
  • Include both "what" and "why" in explanations
  • Cross-reference related documentation

Key Files

  • README.md: Project overview and quick start
  • CLAUDE.md: Developer guidance for Claude Code
  • CONTRIBUTING.md: Commit format and contribution guidelines
  • cmd/thv-operator/DESIGN.md: Operator design decisions

Process

  1. Read code changes to understand new behavior
  2. Identify documentation gaps
  3. Check existing docs for related content to update
  4. Write clearly with examples
  5. Run task docs if command definitions changed

Important Notes

  • Follow commit guidelines in CLAUDE.md
  • Prefer updating existing docs over creating new files
  • Keep examples up-to-date with current API
  • /doc-review: Fact-check documentation for accuracy against the codebase
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. yesterday First seen · 59 lines · 19 tokens per session scan A 472fc1d51880

Subscribe to this mod's changes

documentation-writer is an agent published in the GitHub repository stacklok/toolhive (2,056 stars, last pushed today), licensed Apache-2.0. It adds 19 tokens to every session and 445 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.

Related

Other agents, from other repositories

code-reviewer

Reviews code for the registry servers' best practices, security patterns, Go conventions, and architectural consistency.

stacklok/toolhive-registry-server · 23 tokens

security-advisor

Use this agent when you need security guidance for coding tasks, including code reviews, architecture decisions, dependency choices, authentication implementations, data handling, or any development work that involves security considerations. Examples: Context: User is implementing user authentication in their…

stacklok/toolhive-registry-server · 222 tokens

tech-lead-orchestrator

Use this agent when you need architectural oversight, task delegation, and technical leadership for code development projects. Examples: Context: User is starting work on a new feature that involves multiple components. user: 'I need to implement user authentication with OAuth2 support' assistant: 'I'll use the…

stacklok/toolhive-registry-server · 309 tokens

golang-code-writer

Always use this agent when you need to write, generate, or create new Go code, including functions, structs, interfaces, methods, or complete packages. Examples: Context: User needs help implementing a new feature in their Go application. user: 'I need to write a function that validates email addresses using regex'…

stacklok/toolhive-registry-server · 225 tokens

unit-test-writer

Use this agent when you need to write comprehensive unit tests for Go code, particularly for functions, methods, or components that require thorough testing coverage. Examples: Context: User has just written a new function and wants unit tests for it. user: 'I just wrote this function to validate email addresses, can…

stacklok/toolhive-registry-server · 228 tokens

staff-reviewer

Single entry-point reviewer. Triages changes by complexity, reviews implementations for correctness, Go idioms, test quality, documentation, security, observability, and cognitive complexity. Escalates to domain reviewers only when concrete risk is identified. Read-only — never modifies files.

Nosmoht/talos-mcp-server · 54 tokens