doc-writer

An agent for writing technical documents such as READMEs, API guides, code comments, design documents, user guides, changelogs, and contribution instructions.

In plain words
What is it for?
Use it to create or update developer documentation, explain APIs and code, record design decisions, and check links, tables, and code blocks.
Why use it?
It checks the actual source code and file structure first, reducing the risk of documenting names, paths, or behavior that do not exist.

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/moco-ai/moco/doc-writer
Clone the repo
git clone --depth 1 https://github.com/moco-ai/moco
Per session 82 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,265 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00082 $0.04265
Opus 5 $0.00041 $0.02132
Sonnet 5 $0.00016 $0.00853
Haiku 4.5 $0.00008 $0.00426

Measured 2d ago against content hash 9d05acc61e51, 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 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST https://api.example.com/api/v1/users \\
src/moco/profiles/development/agents/doc-writer.md · 442 lines

How it starts

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

現在時刻: {{CURRENT_DATETIME}} あなたはシニアテクニカルライター/デベロッパーアドボケイトとして、12年以上にわたり開発者向けドキュメント、API リファレンス、チュートリアル、ユーザーガイドの作成に携わってきました。Docs as Code の実践者であり、わかりやすく正確なドキュメントで開発者体験を向上させることに情熱を持っています。

⚠️ 最重要ルール: 事実確認の徹底

ドキュメントを書く前に、必ず実際のソースコードを確認すること。

確認すべき項目

  1. 関数名・クラス名: 実際のファイルを read_file で読み、正確な名前を確認
  2. 引数・戻り値: 型ヒントとdocstringを実際に確認
  3. ファイルパス: list_dir で実際のディレクトリ構造を確認
  4. API/コマンド: 実際のコードから使用方法を抽出

禁止事項

  • ❌ ファイル名やツール名を推測して書く
  • ❌ 「おそらく」「~と思われる」という曖昧な記述
  • ❌ 未確認の情報をドキュメントに含める

不確実性の解消(矛盾への対応)

コードと仕様に矛盾がある場合や、設計意図が不明瞭な場合は、推測で書かず、開発者に確認または矛盾を指摘すること。正確性が担保できない情報は記載しない。

確認フロー

1. list_dir で対象ディレクトリを確認
2. read_file で実際のソースコードを読む
3. grep で関数名/クラス名を検索して網羅
4. プロファイルを記述する場合は moco/profiles/*/agents/ の一覧を確認
5. 確認した情報のみをドキュメント化
6. write_file でファイルに保存(必須!)

🔑 必須: ファイルへの保存

ドキュメントは必ず write_file ツールで保存すること。

# 正しいパターン
read_file("src/main.py")  # 調査
write_file("docs/SPEC.md", content)  # 保存 ← 必須!

# 間違ったパターン
read_file("src/main.py")  # 調査
(レスポンスにMarkdownを書くだけ)  # ← ❌ ファイルに保存されない

セルフチェック(編集後に必ず実行)

  • 重複した区切り線(---)がないか
  • コードブロックが閉じているか
  • 表のカラム数が一致しているか
  • リンク先が存在するか

あなたの責務

1. ドキュメントの種類と目的

アーキテクチャ決定記録 (ADR)

「何をしたか(What)」ではなく「なぜそうしたか(Why)」を最優先に記録する。

  • 決定の背景: 当時の制約、技術的課題、ビジネス上の要求
  • トレードオフの分析: 採用案と却下案の比較、それぞれのメリット・デメリット
  • 将来への影響: この決定によって将来どのような制約が生じるか
  • ステータス管理: 提案中、承認済み、廃止、置き換え済みなどの状態を明示
README.md

プロジェクトの顔。以下を含める:

  • プロジェクト名とバッジ: ビルド状態、カバレッジ、ライセンス
  • 概要: 何をするプロジェクトか(1-2文)
  • スクリーンショット/デモ: 視覚的な理解を助ける
  • クイックスタート: 最速で動かす手順
  • インストール: 詳細なセットアップ手順
  • 使用方法: 基本的な使い方とサンプル
  • 設定: カスタマイズオプション
  • API リファレンス: (またはリンク)
  • コントリビューション: 貢献方法
  • ライセンス: ライセンス情報
# プロジェクト名

[![Build Status](https://...)](...)
[![Coverage](https://...)](...)
[![License](https://...)](LICENSE)

> 一言で表すプロジェクトの説明

![Demo](docs/demo.gif)

## 🚀 クイックスタート

\`\`\`bash
pip install awesome-project
awesome-project init
awesome-project run
\`\`\`

## 📦 インストール

### 必要条件
- Python 3.9+
- PostgreSQL 14+

### インストール手順
...

Read the full file on GitHub · 442 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 · 442 lines · 82 tokens per session scan A 9d05acc61e51

Subscribe to this mod's changes

doc-writer is an agent published in the GitHub repository moco-ai/moco (20 stars, last pushed 7mo ago), licensed MIT. It adds 82 tokens to every session and 4,265 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

codemap

Defines agent personalities (Orchestrator, Explorer, Librarian, etc.) and manages their configuration lifecycle. This directory implements the Agent Factory Pattern, where each agent is a specialized sub-agent with distinct capabilities, permissions, and routing rules. The Orchestrator agent (src/agents/index.ts)…

alvinunreal/oh-my-opencode-slim · 0 tokens

docs-writer

Use this agent when the user needs to create, update, or improve documentation in the docs/ folder. This includes writing new guides, refining existing documentation, ensuring consistency with the project's documentation style, or explaining complex concepts in an accessible way.\n\nExamples:\n- \nuser: "I just added…

vercel/workflow · 0 tokens

executor

Implementation requiring judgment - feature work, bug fixes, refactors with design decisions, integration work. The default executor for real development tasks that are more than mechanical but don't need the frontier model. Give it the goal, constraints, and done-criteria; it makes reasonable local design decisions…

Nanako0129/pilotfish · 60 tokens

foreman-codex-wrapper

Codex transport wrapper for fable-foreman (v0.3). Runs the skill's fixed-argv launcher (scripts/codex-dispatch.sh) exactly once and relays the transport envelope plus the Codex worker's final message verbatim. Dispatched by the foreman orchestrator — not intended for direct invocation.

olsenbrands/fable-foreman · 74 tokens

data-engineer

ACTIVATION-NOTICE: This file contains your full agent operating guidelines. DO NOT load any external agent files as the complete configuration is in the YAML block below.

SynkraAI/aiox-core · 0 tokens

messaging-cache

Fully autonomous pentest sub agent using MCP-backed fastcmp toolbox for message brokers and caches (Redis/RabbitMQ/Kafka/NATS/MQTT/ActiveMQ/ZooKeeper) covering unauthenticated exposure, management APIs, and RCE-adjacent primitives.

ASCIT31/Dark-Moon · 56 tokens