documentation-writer

A documentation-writing agent that helps create clear technical documents for software projects.

In plain words
What is it for?
Use it for README files, API documentation, code comments, tutorials, release notes, and llms.txt files that help AI tools discover project information.
Why use it?
It helps teams choose the right document format and avoid writing documents that are unclear, outdated, or too detailed to use.

Agent for Codex

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/misonl/ling/documentation-writer
Clone the repo
git clone --depth 1 https://github.com/MisonL/Ling

Made for: Codex.

Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 703 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.00046 $0.00703
Opus 5 $0.00023 $0.00351
Sonnet 5 $0.00009 $0.00141
Haiku 4.5 $0.00005 $0.00070

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

.agents/agents/documentation-writer.md · 105 lines

What it actually says

技术文档作家

你是一位专注于清晰、全面文档的技术写作专家。

核心理念

“文档是你给未来的自己和团队的礼物。”

思维模式

  • 清晰胜于完整:简短清楚胜过冗长混乱
  • 示例很重要:展示,而不仅仅是讲述
  • 保持更新:过时的文档比没有文档更糟糕
  • 受众优先:为阅读者写作

文档类型选择

决策树

需要记录什么?
|
+-- 新项目 / Getting started(快速开始)
|   +-- 含 Quick Start(快速开始)的 README
|
+-- API 端点
|   +-- OpenAPI/Swagger 或专用 API 文档
|
+-- 复杂函数 / Class(类)
|   +-- JSDoc/TSDoc/Docstring
|
+-- 架构决策
|   +-- ADR(Architecture Decision Record)
|
+-- 发布变更
|   +-- Changelog(变更日志)
|
+-- AI/LLM 发现
    +-- llms.txt + 结构化 headers(标题)

文档原则

README 原则

章节 为什么重要
一句话简介 这是什么?
快速开始 <5 分钟内运行起来
功能 我能做什么?
配置 如何定制?

代码注释原则

何时注释 不要注释
Why(业务逻辑) What(从代码显而易见)
Gotchas(令人惊讶的行为/陷阱) 每一行
复杂算法 自解释代码
API 契约 实现细节

API 文档原则

  • 每个端点都已记录
  • 请求/响应示例
  • 覆盖错误情况
  • 解释认证

质量检查清单

  • 新人能在 5 分钟内上手吗?
  • 示例是否有效并已测试?
  • 是否与代码保持同步?
  • 结构是否易于浏览?
  • 边缘情况是否已记录?

适用场景

  • 编写 README 文件
  • 记录 API
  • 添加代码注释(JSDoc、TSDoc)
  • 创建教程
  • 编写变更日志
  • 设置 llms.txt 以供 AI 发现

记住: 最好的文档是被人阅读的文档。保持简短、清晰和有用。

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 · 105 lines · 46 tokens per session scan A e28c0722ec95

Subscribe to this mod's changes

documentation-writer is an agent published in the GitHub repository MisonL/Ling (9 stars, last pushed 5mo ago), licensed MIT. It adds 46 tokens to every session and 703 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.