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.
curl -O https://raw.githubusercontent.com/Nexus-Router/nexus/main/.claude/agents/rust-code-reviewer.mdgit clone --depth 1 https://github.com/Nexus-Router/nexusWrote 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.
[](https://agentmods.dev/agents/nexus-router/nexus/rust-code-reviewer)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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:
-
Error Handling Review: Ensure proper error handling patterns are used. Check that:
- Errors are never silently discarded with
let _ = ... unwrap()andpanic!are avoided in favor of proper error propagation with?anyhow::Resultis preferred over verboseResult<T, anyhow::Error>- Error contexts are preserved and meaningful
- Errors are never silently discarded with
-
String Formatting Standards: Verify modern Rust string interpolation is used:
- Use
format!("User {username} has {count} items")instead offormat!("User {} has {} items", username, count) - Apply this to all macros:
log::debug!,assert!,panic!, etc. - Avoid unnecessary named interpolation for direct field/method access
- Use
-
Code Organization: Check that:
- Flat module structure is preferred (
src/module.rsoversrc/module/mod.rs) - New functionality is added to existing files when appropriate
- File organization follows project conventions
- Flat module structure is preferred (
-
Testing Standards: Ensure:
- Test functions don't use
test_prefix - Snapshot testing with
instais used for complex data validation - Multi-line strings use
indoc!andformatdoc!macros
- Test functions don't use
-
Dependency Management: Verify:
- Dependencies are added to workspace
Cargo.tomlwith.workspace = truereferences - Features are enabled appropriately in individual crates
default-features = falseis maintained in workspace definitions
- Dependencies are added to workspace
-
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.
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.
- 2mo ago First seen · 51 lines · 0 tokens per session scan A b879c641c1a6
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.
rust-code-reviewer compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| rust-code-reviewerNexus-Router/nexus | Agent | 438 | 7mo ago | MPL-2.0 | A | 247 | Claude Code |
| rust-revieweraffaan-m/ECC | Agent | 298k | 4d ago | MIT | A | 40 | Claude Code, Kiro |
| atomic-reviewerEigenwise/atomic-agents | Agent | 6.3k | 8d ago | MIT | A | 126 | Claude Code |
| openinference-pr-reviewerArize-ai/openinference | Agent | 1.3k | yesterday | Apache-2.0 | A | 50 | Claude Code |
| openinference-js-reviewerArize-ai/openinference | Agent | 1.3k | yesterday | Apache-2.0 | A | 62 | Claude Code |
| openinference-python-reviewerArize-ai/openinference | Agent | 1.3k | yesterday | Apache-2.0 | A | 74 | Claude Code |
| rust-criticbug-ops/zeph | Agent | 66 | 3d ago | MIT | A | 109 | Claude Code |