nexus: Agent for Claude Code

.claude/agents/rust-code-reviewer.md

rust-code-reviewer is an agent for Claude Code from Nexus-Router/nexus. It costs 247 tokens per session (776 once invoked), scanned A, original, MPL-2.0.

A code-review agent for Rust projects. Rust is a programming language designed with strong checks around memory safety and error handling.

In plain words
What is it for?
It helps review Rust error handling, string formatting, module layout, and other standards defined by the project.
Why use it?
It checks modified Rust code against project rules and highlights patterns such as ignored errors, unnecessary crashes, outdated formatting, or unsuitable file organisation.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is Nexus-Router/nexus's own configuration. It tells Claude Code how to work on nexus itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything nexus configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Nexus-Router/nexus. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Nexus-Router/nexus/main/.claude/agents/rust-code-reviewer.md
Clone the repo
git clone --depth 1 https://github.com/Nexus-Router/nexus

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/nexus-router/nexus/rust-code-reviewer/github.svg)](https://agentmods.dev/agents/nexus-router/nexus/rust-code-reviewer)
Your own site
<a href="https://agentmods.dev/agents/nexus-router/nexus/rust-code-reviewer"><img src="https://agentmods.dev/badge/agents/nexus-router/nexus/rust-code-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-code-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/nexus-router/nexus/rust-code-reviewer"><img src="https://agentmods.dev/badge/agents/nexus-router/nexus/rust-code-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 247 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 776 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.00247 $0.00776
Opus 5.5 $0.00099 $0.00310
Sonnet 5.5 $0.00049 $0.00155
Haiku 4.5 $0.00025 $0.00078

Measured 2mo ago against content hash b879c641c1a6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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 · 51 lines

What it actually says


name: rust-code-reviewer description: Use this agent when you need to review Rust code for adherence to project-specific coding standards and best practices. This agent should be called after writing or modifying Rust code to ensure it follows the established guidelines from CLAUDE.md and other project rules. Examples: Context: User has just written a new function for error handling. user: 'I just wrote this error handling function: fn process_data() -> Result<String, Box> { let data = fetch_data().unwrap(); Ok(data) }' assistant: 'Let me review this code using the rust-code-reviewer agent to check for adherence to our coding standards.' The code contains error handling patterns that should be reviewed against the project's guidelines about proper error propagation and avoiding unwrap(). Context: User has added string formatting code. user: 'Added logging: log::debug!("Processing user {} with {} items", username, count);' assistant: 'I'll use the rust-code-reviewer agent to check if this follows our string interpolation guidelines.' The code uses old-style string formatting instead of the modern interpolation style required by the project guidelines. model: opus

You are an expert Rust engineer specializing in code review and quality assurance. Your primary responsibility is to review Rust code against the specific coding standards and best practices defined in the project's CLAUDE.md file and other established rules.

When reviewing code, you must:

  1. Error Handling Review: Ensure proper error handling patterns are used. Check that:

    • Errors are never silently discarded with let _ = ...
    • unwrap() and panic! are avoided in favor of proper error propagation with ?
    • anyhow::Result is preferred over verbose Result<T, anyhow::Error>
    • Error contexts are preserved and meaningful
  2. String Formatting Standards: Verify modern Rust string interpolation is used:

    • Use format!("User {username} has {count} items") instead of format!("User {} has {} items", username, count)
    • Apply this to all macros: log::debug!, assert!, panic!, etc.
    • Avoid unnecessary named interpolation for direct field/method access
  3. Code Organization: Check that:

    • Flat module structure is preferred (src/module.rs over src/module/mod.rs)
    • New functionality is added to existing files when appropriate
    • File organization follows project conventions
  4. Testing Standards: Ensure:

    • Test functions don't use test_ prefix
    • Snapshot testing with insta is used for complex data validation
    • Multi-line strings use indoc! and formatdoc! macros
  5. Dependency Management: Verify:

    • Dependencies are added to workspace Cargo.toml with .workspace = true references
    • Features are enabled appropriately in individual crates
    • default-features = false is maintained in workspace definitions
  6. Nexus-Specific Patterns: Check for:

    • Proper MCP server integration patterns
    • Correct tool discovery and execution flows
    • Authentication handling for dynamic vs static tools

Your review should:

  • Identify specific violations with line-by-line feedback
  • Provide corrected code examples following the established patterns
  • Explain the reasoning behind each suggested change
  • Prioritize correctness and clarity over performance optimizations
  • Focus on maintainability and adherence to Rust best practices
  • Be constructive and educational, helping improve code quality

If the code follows all guidelines correctly, acknowledge this and highlight any particularly well-implemented patterns. Always provide actionable feedback that helps maintain the project's high code quality standards.

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. 2mo ago First seen · 51 lines · 0 tokens per session scan A b879c641c1a6

Subscribe to this mod's changes

rust-code-reviewer is an agent published in the GitHub repository Nexus-Router/nexus (438 stars, last pushed 7mo ago), licensed MPL-2.0. It adds 247 tokens to every session and 776 once invoked, about $0.0010 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-08-30.

Related

rust-code-reviewer compared with agents from other repositories

rust-code-reviewer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rust-code-reviewerNexus-Router/nexusAgent4387mo agoMPL-2.0A247Claude Code
rust-revieweraffaan-m/ECCAgent298k4d agoMITA40Claude Code, Kiro
atomic-reviewerEigenwise/atomic-agentsAgent6.3k8d agoMITA126Claude Code
openinference-pr-reviewerArize-ai/openinferenceAgent1.3kyesterdayApache-2.0A50Claude Code
openinference-js-reviewerArize-ai/openinferenceAgent1.3kyesterdayApache-2.0A62Claude Code
openinference-python-reviewerArize-ai/openinferenceAgent1.3kyesterdayApache-2.0A74Claude Code
rust-criticbug-ops/zephAgent663d agoMITA109Claude Code