---
title: "Expert Rust Code Reviewer: review, role & definition · Undominated.ai"
canonical: https://undominated.ai/agents/buffa-rust-code-reviewer/
description: "Reviews a Rust diff for ownership, unsafe invariants, concurrency, error handling and public APIs, with compiler or Clippy checks for testable findings."
---

# Expert Rust Code Reviewer: review, role & definition · Undominated.ai

> Reviews a Rust diff for ownership, unsafe invariants, concurrency, error handling and public APIs, with compiler or Clippy checks for testable findings.

[← Explore all agents](/agents/)

CODE REVIEW / Anthropic

# Expert Rust Code Reviewer

Reviews a Rust diff for ownership, unsafe invariants, concurrency, error handling and public APIs, with compiler or Clippy checks for testable findings.

 [Use this definition ↓](#setup)[Original source ↗](https://github.com/anthropics/buffa)

SOURCE REVIEW

 Reviewed 2026-10-14
 Evidence 4 linked sources
 Publisher Anthropic
 Licence [Apache-2.0 ↗](https://github.com/anthropics/buffa/blob/5fed61b257d36dac48525a73c0fcb1e9fd8b5299/LICENSE)
 Revision 5fed61b257d3
 [Read what was—and wasn’t—checked ↓](#review)

“Expert Rust code reviewer. Reviews Rust code for quality, safety, idioms, performance, maintainability, readability, and API ergonomics. Has read-only git access (`git diff`/`log`/`blame`/`show`) for scoping a review to the changed lines, and `cargo check`/`cargo clippy` for verifying findings mechanically.”

 [Anthropic · upstream description ↗](https://github.com/anthropics/buffa/blob/5fed61b257d36dac48525a73c0fcb1e9fd8b5299/.claude/agents/rust-code-reviewer.md) Our analysis follows below.

01 / THE REASONING

## Why this made the selection.

 - The source covers ownership, unsafe contracts, async cancellation, lock ordering, secret-bearing Debug output and dependency/MSRV concerns in one review checklist.
- It requires concrete file:line findings and confirmation of suspected compiler or Clippy diagnostics before reporting them.

### A good fit for

 - Give it the current Rust branch, an explicit diff base and affected crates for a systems-code review.
- Use the structured summary, category findings, critical issues, prioritised improvements and positive observations to plan a separate fix pass.
- Provide the Rust diff with ownership, synchronization and public-contract context.
- Obtain category-specific findings that include allocation bounds and where errors are surfaced.

### Weigh up before choosing

 - The source contains 18 review categories. Its Excellent/Good/Needs Improvement/Poor labels are subjective report labels, not measured quality scores.
- The body forbids working-tree edits, but enables Bash and relies on prose for its git/cargo allowlist. cargo check/clippy can execute build scripts and write build outputs.
- A compiler check does not establish unsafe soundness, absence of deadlocks or workload performance. Those need appropriate tests or measurements.
- The origin/main default and opus alias need to match the target project and host.
- cargo check and clippy can run build scripts and write build outputs despite the prompt’s no-working-tree-edits instruction.

02 / THE REVIEW RECORD

## What we actually inspected.

Source review has boundaries. A clear record is more useful than a “safe” badge.

### Material inspected

 - .claude/agents/rust-code-reviewer.md (complete frontmatter and body)
- LICENSE
- Claude Code custom-subagent configuration
- Cargo build-script lifecycle
- Round 2: pinned definition, output contract and permission/dependency boundaries reread on 2026-10-14

### Our findings

 - The definition has 18 numbered review categories, including unsafe code, dependencies, async patterns and observability.
- The required report has an executive summary, findings by category, critical issues, prioritised improvements and positive observations. Findings are reported rather than applied.
- The shell restrictions are written into the prompt. The inspected tool list itself is Read, Glob, Grep and Bash.
- The review explicitly checks unbounded allocations from untrusted input and sensitive values exposed by Debug.
- Its API ergonomics section tests fallibility granularity and whether must_use is applied where discarded results are mistakes.

### Not established by this review

 - The agent was not executed; model behaviour, host compatibility and task outcomes were not runtime-tested.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

## Use the role in your project.

[Upstream setup instructions ↗](https://code.claude.com/docs/en/sub-agents.md)
 - Place rust-code-reviewer.md into `.claude/agents/rust-code-reviewer.md` in the target repository.
- Invoke the subagent from Claude Code for Rust PR or branch reviews.

### Before you start

 - Claude Code CLI
- Rust / Cargo installed

### Compatibility

Claude Code · Portable Markdown agent hosts · Rust toolchain (cargo)

### Repository inspection and build-tool execution

 - Read repository files and git history
- Execute cargo check/clippy and permitted git inspection under host controls; Cargo is not a read-only operation

### Cost model

Apache-2.0 instructions. Model use and build resources follow your host and environment.

04 / FOLLOW THE EVIDENCE

## The source trail.

Our notes are separate from the original resource. Check upstream before adopting a new version.

 - [Anthropic Buffa rust-code-reviewer definition ↗](https://github.com/anthropics/buffa/blob/5fed61b257d36dac48525a73c0fcb1e9fd8b5299/.claude/agents/rust-code-reviewer.md) Checked 2026-10-14 https://github.com/anthropics/buffa/blob/5fed61b257d36dac48525a73c0fcb1e9fd8b5299/.claude/agents/rust-code-reviewer.md Supports: summary, upstreamDescription, whySelected, limitations
- [Anthropic Buffa Apache-2.0 License ↗](https://github.com/anthropics/buffa/blob/5fed61b257d36dac48525a73c0fcb1e9fd8b5299/LICENSE) Checked 2026-10-14 https://github.com/anthropics/buffa/blob/5fed61b257d36dac48525a73c0fcb1e9fd8b5299/LICENSE Supports: license
- [Claude Code subagent configuration ↗](https://code.claude.com/docs/en/sub-agents) Checked 2026-10-14 https://code.claude.com/docs/en/sub-agents Supports: Installation, Host capability boundaries
- [Cargo build-script lifecycle ↗](https://doc.rust-lang.org/cargo/reference/build-scripts.html) Checked 2026-10-14 https://doc.rust-lang.org/cargo/reference/build-scripts.html Supports: Build-script execution, Build-output writes

KEEP COMPARING

## Other approaches to consider.

Related by category or shared topics. These are alternatives to inspect, not a measured quality order.

 [### Rust API Ergonomics Reviewer ↗ Reviews a Rust library from the downstream user’s side, and confirms a suspected lint with cargo before reporting it.](/agents/anthropics-rust-api-ergonomics-reviewer/)[### Code slice worker ↗ Pins the Trailmark worker that answers from one source packet, returns a single JSON object, and says it cannot read the repository.](/agents/trailofbits-code-slice-worker/)[### Feature-dev code reviewer ↗ Reviews the unstaged git diff for bugs and against CLAUDE.md rules, and reports only issues it rates 80 or higher.](/agents/anthropic-code-reviewer/)

 [AI Tools ↗](/tools/)[Skills ↗](/skills/)[Agents ↗](/agents/)[MCP Servers ↗](/mcp-servers/)[Workflows ↗](/workflows/)

## Continue your investigation

 - [Find reusable instructions](/skills/)
- [Inspect connections](/mcp-servers/)
- [Build a toolkit](/tools/)
- [Choose the model](/compare/)
