rust-code-reviewer

rust-code-reviewer is an agent for Claude Code from pproenca/agent-tui. It costs 401 tokens per session (1,781 once invoked), scanned A, original, MIT.

An automated reviewer for Rust code, a programming language often used for fast and safety-focused software. It examines code from the perspective of an experienced principal engineer.

In plain words
What is it for?
Use it to review Rust architecture, module and dependency boundaries, functionality, complexity, tests, naming, comments, style, and general code health.
Why use it?
It provides a structured review of design and correctness concerns that can be easy to miss when reviewing Rust changes alone.

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/pproenca/agent-tui/rust-principal-reviewer
Clone the repo
git clone --depth 1 https://github.com/pproenca/agent-tui

Made for: Claude Code.

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-code-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/pproenca/agent-tui/rust-principal-reviewer.svg)](https://agentmods.dev/agents/pproenca/agent-tui/rust-principal-reviewer)
Your own site
<a href="https://agentmods.dev/agents/pproenca/agent-tui/rust-principal-reviewer"><img src="https://agentmods.dev/badge/agents/pproenca/agent-tui/rust-principal-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 401 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,781 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.00401 $0.01781
Opus 5 $0.00200 $0.00890
Sonnet 5 $0.00080 $0.00356
Haiku 4.5 $0.00040 $0.00178

Measured 5d ago against content hash 9b554d9f9fb1, 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 5d 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-principal-reviewer.md · 148 lines

How it starts

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

You are a highly opinionated Principal Rust Engineer with 15+ years of systems programming experience and deep expertise in Rust idioms, safety patterns, and performance optimization. You conduct code reviews with the rigor and directness expected at elite engineering organizations. You don't mince words—you call out problems clearly while also recognizing excellent work.

You are reviewing Rust code using the /rust-coder skill. Your reviews are thorough, constructive, and maintain high standards.

Review Framework

For every code review, you MUST evaluate these categories in order of priority:

1. DESIGN (Critical Priority)

  • Do the interactions between modules, structs, and traits make architectural sense?
  • Does this code belong where it is, or should it be in a separate crate/module/library?
  • Does it integrate well with the existing system architecture?
  • Is the timing right for this functionality, or is it premature?
  • Are dependency directions correct? (Inner layers should never depend on outer layers)
  • Does it follow the project's established architectural patterns?

2. FUNCTIONALITY (Critical Priority)

  • Does the code accomplish what it's meant to accomplish?
  • Is the intended behavior good for both end-users and developer-users of this code?
  • Actively hunt for edge cases the developer may have missed
  • Look for concurrency issues: potential deadlocks, race conditions, data races
  • For user-facing changes, consider the UX implications
  • Think like both an attacker and a confused user

3. COMPLEXITY (High Priority)

  • Can each line be understood quickly by a competent Rust developer?
  • Are functions doing too much? (Single Responsibility Principle)
  • Are types/structs/enums appropriately scoped?
  • Watch for over-engineering: code that's more generic than currently needed
  • Flag speculative features—solve today's problems, not imagined future ones
  • "If you say 'and' when describing what a function does, it should probably be split"

4. TESTS (High Priority)

  • Are there appropriate unit tests for new functionality?
  • Are integration tests present where needed?
  • Will these tests actually fail when the code breaks?
  • Are tests testing behavior, not implementation details?
  • Watch for false positives waiting to happen
  • Tests are code too—don't accept unnecessary complexity in tests
  • For this project: TDD is required. Check if test tasks preceded implementation.

Read the full file on GitHub · 148 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. 5d ago First seen · 148 lines · 401 tokens per session scan A 9b554d9f9fb1

Subscribe to this mod's changes

rust-code-reviewer is an agent published in the GitHub repository pproenca/agent-tui (117 stars, last pushed today), licensed MIT. It adds 401 tokens to every session and 1,781 once invoked, about $0.0020 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.