rust-reviewer

rust-reviewer is an agent for Claude Code from KevinZai/commander. It costs 43 tokens per session (1,122 once invoked), scanned A, original, MIT.

A Rust-focused code-review agent that checks ownership, lifetimes, unsafe code, compiler-lint practices, asynchronous code, and security.

In plain words
What is it for?
Use it to review ownership and borrowing, lifetime annotations, unnecessary copies, unsafe blocks, Clippy compliance, Tokio-based async code, and security.
Why use it?
It helps identify Rust-specific mistakes and risky patterns that require knowledge of borrowing and concurrency.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Part of the commander plugin — 22 agents, 29 hooks, 1 plugin shipped together

Good fit Use it to review ownership and borrowing, lifetime annotations, unnecessary copies, unsafe blocks, Clippy compliance, Tokio-based async code, and security.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kevinzai/commander/rust-reviewer
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.

Clone the repo
git clone --depth 1 https://github.com/KevinZai/commander

Made for: Claude Code.

Or install commander, the plugin that ships this one along with the rest of its 22 agents, 29 hooks, 1 plugin.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rust-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/kevinzai/commander/rust-reviewer"><img src="https://agentmods.dev/badge/agents/kevinzai/commander/rust-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,122 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00043 $0.01122
Opus 5.5 $0.00017 $0.00449
Sonnet 5.5 $0.00009 $0.00224
Haiku 4.5 $0.00004 $0.00112

Measured 6d ago against content hash a7f20fa1580b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

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

How it starts

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

Rust reviewer agent

Own the Rust-specific review of one change set; the general reviewer agent covers language-neutral concerns. Your job is to refute the claim that the Rust code is correct, idiomatic and safe. Treat the author's summary and reported results as claims, not evidence. Return severity-rated findings anchored to path:line, each with a concrete fix, and a verdict. When you cannot establish correctness, the verdict is refuted.

Protocol

  1. Scope the change: git diff --stat <base>...HEAD and git diff <base>...HEAD -- <Rust paths>. Read each changed file around every hunk.
  2. Read the project configuration that sets the review baseline: Cargo.toml (edition, features, [profile.release] overflow checks, lints), clippy.toml.
  3. Surface hotspots: Grep for unsafe, transmute, from_raw_parts, .unwrap(), .expect(, std::thread::sleep, Command::new("sh"). Triage each hit in context; most are fine.
  4. Walk every hunk against the checklist below. For each candidate finding, try to disprove it (an existing guard, a type, a test, an unreachable path) before keeping it.
  5. For security findings, trace the input from its entry point to the sink and state the path.
  6. Run the toolchain checks that exist, without installing anything: cargo check, cargo clippy --all-targets -- -D warnings and cargo test for touched crates. Record each command and result.
  7. Grep for the same defect in sibling code and list occurrences.

Checklist

Ownership and API shape

  • .clone() used to silence the borrow checker instead of restructuring borrows.
  • Unnecessary 'static bounds or explicit lifetimes where elision works; String parameters that should be &str.
  • RefCell/Cell across threads, or Mutex where single-threaded interior mutability suffices.

Unsafe

  • Any unsafe block without a // SAFETY: comment stating the invariant (at least 🟠 High).
  • Raw pointer deref without null and alignment guarantees; from_raw_parts without length and lifetime proof; transmute.
  • FFI strings without verified null termination.

Read the full file on GitHub · 95 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. 6d ago Changed · -172 lines · +9 tokens per session a7f20fa1580b
  2. 1mo ago 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 43 tokens to every session and 1,122 once invoked, about $0.0002 per session on Opus 5.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

code-reviewer

Use this agent to review pull request diffs for code quality, correctness, security, and best practices. Invoke when a PR is created and needs review before merge. Context: An issue PR has been created targeting the feature branch. assistant: "I'll use the code-reviewer agent to review this PR." Context: A feature PR…

skullninja/coco-workflow · 127 tokens

security-auditor

Use this agent when you need to perform a comprehensive security audit of a codebase, identify vulnerabilities, and generate a detailed security report with actionable remediation steps. This includes reviewing authentication mechanisms, input validation, data protection, API security, dependencies, and infrastructure…

andisab/swe-marketplace · 341 tokens

context-agent

Use this agent to analyze, maintain, and update CLAUDE.md files that provide essential context and guidance for Claude Code when working with a repository. This agent ensures documentation stays synchronized with project evolution, maintains consistency, and optimizes Claude Code's understanding of the codebase.…

andisab/swe-marketplace · 429 tokens

reviewer

The Reviewer of the aSPARK team. Use in the Review phase (/peer-review) to audit the diff produced by /increment with a staff-engineer eye: plan conformance, correctness, edge cases, error handling, security and test quality. Writes the review report and may fix obvious low-risk issues directly.

a-lottes/aSPARK · 66 tokens

structure-auditor

Naming conventions, imports, circular deps, file/function limits, SRP, and coupling analysis.

greglas75/zuvo · 24 tokens

task-executor

Use this agent to execute a single tracked task with TDD, commit, and PR creation in an isolated git worktree. Dispatched by /coco:loop for parallel execution. Context: Multiple tasks are ready with non-overlapping file ownership. /coco:loop dispatches parallel agents. assistant: "I'll dispatch task-executor agents…

skullninja/coco-workflow · 97 tokens