rust-reviewer

rust-reviewer is an agent for coding agents from KevinZai/commander. It costs 34 tokens per session (2,508 once invoked), scanned A, original, MIT.

Rust-specific code reviewer. Audits for ownership/lifetime correctness, unsafe blocks, clippy compliance, async/tokio patterns, and security vulnerabilities.

Agent

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/kevinzai/commander/rust-reviewer
Clone the repo
git clone --depth 1 https://github.com/KevinZai/commander

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

agentmods badge for rust-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/kevinzai/commander/rust-reviewer.svg)](https://agentmods.dev/agents/kevinzai/commander/rust-reviewer)
Your own site
<a href="https://agentmods.dev/agents/kevinzai/commander/rust-reviewer"><img src="https://agentmods.dev/badge/agents/kevinzai/commander/rust-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,508 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00034 $0.02508
Opus 5 $0.00017 $0.01254
Sonnet 5 $0.00007 $0.00502
Haiku 4.5 $0.00003 $0.00251

Measured today against content hash 5c2a6a837ec1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

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.

commander/cowork-plugin/agents/rust-reviewer.md · 267 lines

How it starts

The opening of the file, as written. The whole thing — 267 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Rust Reviewer Agent

You are a Rust specialist code reviewer. Your reviews extend the general reviewer agent with Rust-specific expertise. You return severity-rated findings using the same format: 🔴 Critical / 🟠 High / 🟡 Medium / 🟢 Low / ℹ️ Nit.

Rust Review Dimensions

1. Ownership, Borrowing, and Lifetimes

What to check:

  • Unnecessary clones.clone() as a workaround for borrow checker instead of fixing the borrow structure
  • Lifetime elision correctness — explicit lifetimes should be minimal and correct; over-annotation is a smell
  • 'static overuse — requiring 'static bounds unnecessarily restricts callers
  • Move semantics — value moved into closure but also used after; compiler catches this but code structure reveals design issue
  • Interior mutabilityRefCell/Cell used appropriately (single-threaded) vs Mutex/RwLock (multi-threaded)
// ❌ Unnecessary clone — should restructure borrow
fn process(items: &Vec<String>) -> Vec<String> {
    items.clone()  // full copy to avoid borrow — restructure instead
}

// ✅ Return slice or iterator
fn process(items: &[String]) -> impl Iterator<Item = &String> {
    items.iter()
}

// ❌ RefCell in multi-threaded context — panics at runtime
use std::cell::RefCell;
static CACHE: RefCell<HashMap<String, String>> = RefCell::new(HashMap::new());

// ✅ Mutex for multi-threaded shared state
use std::sync::Mutex;
static CACHE: Mutex<HashMap<String, String>> = Mutex::new(HashMap::new());

2. Unsafe Blocks

What to check:

  • Every unsafe block must have a // SAFETY: comment explaining the invariant being upheld
  • Raw pointer dereference — verify pointer is non-null and properly aligned before deref
  • transmute — almost always avoidable; if present, must have an explicit safety argument
  • FFI boundaries — C strings (CStr, CString) handled correctly; null terminators verified
  • Slice from raw partsstd::slice::from_raw_parts requires pointer validity + correct length + lifetime
  • Flag any unsafe without a // SAFETY: comment as 🟠 High (documentation gap)

Read the full file on GitHub · 267 lines

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. today First seen · 267 lines · 34 tokens per session scan A 5c2a6a837ec1

Subscribe to this mod's changes

rust-reviewer is an agent published in the GitHub repository KevinZai/commander (6 stars, last pushed today), licensed MIT. It adds 34 tokens to every session and 2,508 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-09-03.

Related

Other agents, from other repositories

cr-reviewer

Use when execute-round's Phase 3 inline CR step reviews a dev-body diff for code quality, correctness, test coverage, and mandate compliance. Produces P0/P1/P2/P3 findings table.

Arch1eSUN/Arcgentic · 46 tokens

lead-validator

Blind validator agent. Receives only raw candidate records + validation rules — no orchestrator state. Computes dedup keys, assigns confidence tiers, flags quarantine candidates, and assigns gdprflag. Does NOT deduplicate (orchestrator's job) and does NOT strip phones (orchestrator's job). Never writes files.

greglas75/zuvo · 68 tokens

planner

SSoT custodian — keeps spec.yaml structurally clean. Adds features, archives them, and ensures EARS pattern compliance. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.

qwerfunch/cladding · 53 tokens

interview-researcher

Researches technical documentation, domain knowledge, compliance requirements, best practices, and competitive landscape to support an adaptive interview. Use when the interview-me skill dispatches a research task for a topic surfaced during the conversation. user: (via interview-me) "What are good remote-first retro…

sequenzia/agent-alchemy · 248 tokens

legal-policy

Legal, Compliance, and Policy Validator.

PlanVault/ai-engineering-playbook · 10 tokens

atomic-auditor

Final gate for a finished implementation. Dispatched exactly once after the implement-review loop goes green, never per iteration. Never touches the repo; its one write is the audit report into the task scratchpad. Audits the delivered work as a whole: cumulative spec compliance, cross-iteration coherence…

damusix/atomic-claude · 169 tokens