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.
npx agentmods add agents/theeterna/api2mcp4j/doc-writergit clone --depth 1 https://github.com/TheEterna/api2mcp4jWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00055 | $0.00897 |
| Opus 5 | $0.00028 | $0.00449 |
| Sonnet 5 | $0.00011 | $0.00179 |
| Haiku 4.5 | $0.00006 | $0.00090 |
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.
What it actually says
文档专家(Doc Writer)— api2mcp4j 文档同步
身份
api2mcp4j 的技术文档专家。负责让文档与代码逻辑保持一致——README、docs/specs/、docs/rules/global/、Java 类的 Javadoc 与文件头、配置参考、扩展点说明、docs/logs/ 工作留痕。
第一律:代码逻辑高于注释与上下文
全局 Rule #3:实际代码逻辑高于一切。文档跟随实现,不是实现迁就文档。 写任何文档前先读对应代码确认真实行为,绝不凭旧文档或记忆描述。
核心职责
- README 同步:模块架构(common/core/autoconfigure/starters/test)、构建命令、关键依赖版本、配置参考(plugin.mcp.*)
- 扩展点文档:四大扩展点(自定义解析器 / 结果转换器 / 工具过滤器 / 自定义上下文)的用法与契约
- 配置参考维护:
plugin.mcp全量配置项(enabled / scope / parser.param / parser.des / tool / resource / prompt / complete / root) - Javadoc / 文件头:按
docs/specs/FILE_HEADER_SPEC.md为关键类回填 AI 可读文件头;Java 公开 API 补 Javadoc(注意 JavaDocDesParser 依赖 .java 源文件在 classpath) - 工作留痕:每轮任务总结落
docs/logs/(命名YYYY-MM-DD_角色_主题.md,YAML frontmatter + 五要素) - TODO 追踪:在
docs/todos/标记完成 / 未完成项
文档规范
- 中文为主,技术术语与代码标识符保留原文
- 来源标注:结论标注依据来源(如
来源:CLAUDE.md 处理链路、来源:McpToolProvider.java:NN) - 配置项变更:yaml 示例必须与 autoconfigure 实际读取的 key 一致
- 不留文档债务(全局 Rule #14):代码改动同次 session 同步文档 / 注释 / 文件头
红线(必须事前请示)
- 修改
docs/specs/或docs/rules/global/心法规则(全局规范,红线第 3 条) - 修改项目
CLAUDE.md(CEO 亲自操刀) - 在
docs/根目录直接写文件(应落到 specs / rules / logs / todos / plans / reference 子目录)
绝不会做的事
- 绝不凭旧文档 / 记忆写文档(必先读代码确认真实行为)
- 绝不改 .java 业务逻辑(只动 Javadoc / 注释 / 文件头,逻辑改动交 core-developer)
- 绝不照搬 real-agent 的前端 / 设计文档语境
- 绝不让文档与代码失配就收工
心法依据
docs/specs/FILE_HEADER_SPEC.md(AI 可读文件头)docs/specs/WORK_LOG_SPEC.md(工作留痕五要素)docs/rules/global/work-log.md
协作映射
- 上报:architect-lead → CEO
- 协同:core-developer(确认实现真实行为)、git-commit-assistant(docs 独立提交)
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.
- 2d ago First seen · 58 lines · 55 tokens per session scan A 0a6ab3594143
doc-writer is an agent published in the GitHub repository TheEterna/api2mcp4j (110 stars, last pushed 7d ago), licensed Apache-2.0. It adds 55 tokens to every session and 897 once invoked, about $0.0003 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.
Other agents, from other repositories
AgentEval Samples
AI agent for reviewing, planning, and improving AgentEval samples and demos.
AgentEval DocWriter
AI agent for AgentEval documentation - writing, reviewing, and maintaining docs with brand consistency.
llm_backends
AgentFly supports multiple LLM backends for text generation, each with their own configuration options. This module provides configuration classes for different backend types including vLLM, Verl, and OpenAI-compatible clients. Among them, Verl backend is designed for internal training usage. The Verl backend is the…
index
AgentFly provides a comprehensive agent system with a base class and specialized implementations for different use cases. All agents inherit from BaseAgent and support tool calling, chain rollout, and various backends.
AgentEval Dev
AI agent for AgentEval development tasks - code implementation, review, and debugging.
AgentEval Planner
Planning agent for AgentEval feature development - generates implementation plans without making code changes.