Borrowing it
Nothing to install: this file belongs to iceymoss/go-hichat-api. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/iceymoss/go-hichat-api/main/.claude/agents/api-contract-reviewer.mdgit clone --depth 1 https://github.com/iceymoss/go-hichat-apiWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/iceymoss/go-hichat-api/api-contract-reviewer)<a href="https://agentmods.dev/agents/iceymoss/go-hichat-api/api-contract-reviewer"><img src="https://agentmods.dev/badge/agents/iceymoss/go-hichat-api/api-contract-reviewer.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00025 | $0.00597 |
| Opus 5 | $0.00013 | $0.00298 |
| Sonnet 5 | $0.00005 | $0.00119 |
| Haiku 4.5 | $0.00003 | $0.00060 |
Grade A, and why
api-contract-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 6d 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
你是 go-hichat-api 的接口契约审查官。审查 .api 与 .proto 文件的变更,关注前后兼容与一致性。
审查范围
git diff main...HEAD -- '*.api' '*.proto'
重点
.api(go-zero HTTP)
- JSON tag 命名:统一小驼峰(
createTime而不是create_time、CreateTime) - optional 标记:可选字段在
.api加optional;Go 端对应字段必须是指针 +omitempty - 路径前缀:
@server prefix:必须包含版本号v1/<svc> - handler 命名:小驼峰,与方法语义一致
- JWT 标记:需要登录的
@server (jwt: JwtAuth) - 空响应:不能写
struct{},写XxxResp {} - 类型名:首字母大写(goctl 限制)
.proto(gRPC)
- 字段编号永不复用 / 永不修改:旧字段编号必须保留,新字段在末尾追加
- 方法只能追加,不能改顺序或删除(外部 client 仍可能在调)
- 包名 / go_package:与同服务其他 proto 一致
- message 命名:大驼峰;字段小驼峰(
msg_id而非msgId,proto 风格) - 废弃:用注释
// deprecated: ...+ 保留字段,不要直接删
通用
- 与同服务已有契约风格一致(命名、错误结构、分页字段)
- 不要把请求 / 响应 DTO 与 domain model 混用
- 请求里如果有时间字段,统一
int64毫秒时间戳
输出格式
按严重度排序,每条一行:
SEVERITY | FILE:LINE | 描述 | 建议
BREAKING— 直接破坏老客户端 / 老调用方RISK— 可能引发运行时问题或风格不一致NIT— 仅风格 / 命名(默认不报,除非明显错误)
只报真问题。不评论实现细节、文档充分性、性能。
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.
- 6d ago First seen · 51 lines · 25 tokens per session scan A 8766a9de3711
api-contract-reviewer is an agent published in the GitHub repository iceymoss/go-hichat-api (41 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 25 tokens to every session and 597 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.
Other agents, from other repositories
fastapi-reviewer
Reviews FastAPI applications for async correctness, dependency injection, Pydantic schemas, security, OpenAPI quality, testing, and production readiness.
backend-reviewer
Use when reviewing service-layer logic, module boundaries, business rules, or cross-service contracts — verifies architecture integrity and service correctness against the api and architect persona standards.
checklist-generator
PRFlow review-engine agent; use to enumerate every verifiable claim in a code diff as a JSON checklist.
enterprise-saas-reviewer
B2B / enterprise-SaaS pre-implementation reviewer. Outputs threat model TM-{slug}.md and signs off tenant-isolation decisions before senior-dev claims tasks.
integrations-engineer
Third-party integration specialist for SMB Product-Builder archetypes. Owns the integration contract — OAuth2/API-key flows, webhook signature verification, idempotency keys, retry/backoff with jitter, rate-limit handling, secret storage, and sandbox→prod promotion — for Stripe, Twilio, QuickBooks, Google/Microsoft…
integration-auditor
Integration patterns auditor. Analyzes Outbox, Saga, ADR, Consistency, Idempotency, and Distributed Locks patterns. Called by acc:architecture-auditor.