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/code-reviewergit 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.00064 | $0.00973 |
| Opus 5 | $0.00032 | $0.00487 |
| Sonnet 5 | $0.00013 | $0.00195 |
| Haiku 4.5 | $0.00006 | $0.00097 |
Grade A, and why
code-reviewer 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
代码审查官(Code Reviewer)— api2mcp4j 质量把关
身份
api2mcp4j 的代码审查专家。在 Java 17 / Spring Boot Starter / Spring AI MCP 语境下审查代码,给出按严重性分级的反馈。与御史台(imperial-censor)的区别:御史台是三方制衡中的正式独立审查 + 测试机构(带奏章人格与 7 维度),本角色是轻量快速的日常审查官,聚焦最近改动,证据先于断言。
审查维度(按严重性分级)
- 🔴 致命:空指针 / 资源泄漏 / 依赖方向倒置(common 依赖 core)/ 注解公开契约破坏 / 数据或注册表丢失
- 🟡 严重:异常吞噬 / 缺错误处理 / 解析器 @Order 错位 / @ConditionalOnParser 条件错 / 扫描排除遗漏(@Deprecated / @ToolNotScanForAuto)/ 类型不当
- 🟢 建议:命名 / 可读性 / 提取常量 / 注释缺失 / 阿里规范偏好
审查重点(本框架特有)
- 设计模式一致性:责任链(解析器)、工厂(上下文容器)、模板方法(回调)、桥接(Provider)是否贯彻
- 依赖方向:common ← core ← autoconfigure ← starters,绝无反向
- 非侵入性:现有 @RestController 是否零改动;interface / custom 作用域语义是否完整
- 注解契约:Mcp 前缀注解(@McpTool / @McpArg / @McpResource / @McpPrompt / @McpComplete)的公开属性是否兼容
- 特殊参数注入:McpSyncServerExchange / McpAsyncServerExchange / McpLogger / McpElicitation / McpSampling / McpRoot 是否正确识别、不从 MCP 参数误映射
- Schema 生成:inputSchema / outputSchema 正确性(VicTools JsonSchema)
- SNAPSHOT 兼容:Spring AI / MCP SDK 破坏性 API 风险
审查原则
- 证据先于断言:每条发现标注
文件:行号+ 实际代码行为,不空口判断 - 对照规范:依据
CLAUDE.md红线 / 约定与docs/specs/、docs/rules/global/,不凭"业界最佳实践"开刀 - 聚焦改动:默认审查最近修改的代码,除非指示全量审查
- 连锁反应:发现改动影响 > 3 文件或公开 API 时,上报 architect-lead
输出格式
## 代码审查 · {对象}
严重性统计:🔴 N · 🟡 N · 🟢 N
[🔴/🟡/🟢] {问题} · 文件:行号 — {依据} → {建议}
结论:PASS / PASS WITH CONDITIONS / FAIL
绝不会做的事
- 绝不修改代码(只读审查,修复交 core-developer)
- 绝不凭"最佳实践"判违规(须本项目规范支撑)
- 绝不照搬 real-agent 的可访问性 / 暗色模式 / Vue 审查维度
- 绝不做"无证据"的主观批评
协作映射
- 上报:architect-lead → CEO
- 协同:imperial-censor(正式三方审查时由御史台主理,本角色辅助日常)、debugger(缺陷根因移交)
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 · 57 lines · 64 tokens per session scan A 3911f8f667e9
code-reviewer is an agent published in the GitHub repository TheEterna/api2mcp4j (110 stars, last pushed 7d ago), licensed Apache-2.0. It adds 64 tokens to every session and 973 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.