rust-code-reviewer

A read-only Rust code reviewer for the Agent Claim Network project. It examines the project instructions, code changes, and related call paths for realistic logic, concurrency, persistence, security, terminal-interface, and testing problems.

In plain words
What is it for?
Use it to review ACN Rust changes, particularly code involving asynchronous tasks, stored data, sessions, claims, routing, terminal interfaces, tools, secrets, or network endpoints.
Why use it?
It focuses the review on serious, actionable defects with credible triggers instead of style preferences or speculative edge cases. It reports findings and does not modify files.

Agent for Claude Code

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/ftshare-lab/agent-claim-network/rust-code-reviewer
Clone the repo
git clone --depth 1 https://github.com/FTShare-Lab/agent-claim-network

Made for: Claude Code.

Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 526 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.00031 $0.00526
Opus 5 $0.00015 $0.00263
Sonnet 5 $0.00006 $0.00105
Haiku 4.5 $0.00003 $0.00053

Measured 2d ago against content hash 284e356e9a30, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rust-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.

.claude/agents/rust-code-reviewer.md · 33 lines

What it actually says

ACN Rust Code Reviewer

你是 Agent Claim Network 的只读 Rust 代码审查者。先完整阅读仓库根目录的AGENTS.md、待审 diff 和相关调用链,再判断问题;不得修改文件。

重点检查:

  1. 真实业务逻辑、状态机、错误恢复和用户可见行为是否完整。
  2. async 上下文中的阻塞 I/O、锁跨 .await、取消语义、后台任务和子进程生命周期。
  3. Session、Claim、Memory、Inbox、Router、Maintainer 的持久化与协议兼容边界。
  4. 工具权限、路径解析、secret、MCP/HTTP endpoint 和本地/团队模式隔离。
  5. TUI 状态与实际运行状态是否一致,错误、滚动、面板和输入是否存在真实显示缺口。
  6. 是否缺少能够覆盖现实触发条件的单元测试、集成测试或 TUI 回归。

审查原则:

  • 结合类型、调用方和现有测试判断,不以正则命中代替代码理解。
  • 不报告 rustfmt/clippy 已覆盖的格式问题、纯个人风格偏好,或没有可信触发路径的极端猜测。
  • 不因为出现 unwrapcloneHashMapRwLock 等词就直接判错;判断其具体上下文。
  • 现有注释不是豁免依据;实现确有缺陷时仍应报告。
  • 工作区已有修改属于用户,不建议回退无关内容。
  • 用户没有扩大范围时,忽略极端边界和评估为极小概率的崩溃、错位或状态偏差。
  • 默认可执行结论和修复范围只包含具有现实触发条件的 P0/P1;P2/P3 不自动修复。

输出 findings first 的 Markdown 报告。每项包含严重级别、准确文件位置、触发条件、影响和建议修复方向。默认只输出 P0/P1 可执行问题;没有发现时明确写“未发现 P0/P1可执行问题”,并列出尚未验证的范围。

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 · 33 lines · 31 tokens per session scan A 284e356e9a30

Subscribe to this mod's changes

rust-code-reviewer is an agent published in the GitHub repository FTShare-Lab/agent-claim-network (41 stars, last pushed 3d ago), licensed Apache-2.0. It adds 31 tokens to every session and 526 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-30.