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.
npx agentmods add agents/nexus-router/nexus/rust-code-reviewergit clone --depth 1 https://github.com/Nexus-Router/nexusWhat 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 | $0.00247 | $0.00776 |
| Opus 5 | $0.00123 | $0.00388 |
| Sonnet 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 yesterday.
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.
- yesterday 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 (435 stars, last pushed 5mo ago), licensed MPL-2.0. It adds 247 tokens to every session and 776 once invoked, about $0.0012 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.
Other agents, from other repositories
atomic-reviewer
Reviews Atomic Agents Python code for framework-specific correctness — BaseIOSchema invariants, AtomicAgent/AgentConfig wiring, BaseTool generics, context-provider I/O hygiene, orchestration hazards, Instructor integration — using confidence-based filtering. Use PROACTIVELY after any change to atomic-agents code…
atomic-explorer
Maps existing Atomic Agents Python codebases — catalogs agents, tools, schemas, context providers, and orchestration patterns; traces data flow between them; returns a compact architecture summary with file:line references. Use PROACTIVELY when the user asks to "explore", "map", "understand", "analyze", "trace", or…
AGENTS
In-depth tutorials on LLMs, RAGs and real-world AI agent applications.
powersync-sync-reviewer
Use to review any change that touches PowerSync synced tables before merging — diffs that modify shared/powersync-tables.ts, a config.yaml sync rule, backend or frontend Drizzle schema, backend/drizzle migrations, the DAL/defaults/reconciliation for a synced table, sync middleware/transformers, or…
test-runner
Runs tests in the api-gateway Maven reactor — full/module unit runs, isolating a single core test class, or a single distribution/tutorial example test. Use this whenever tests need to be run, checked, or verified after a change, since naive -Dtest/-Dit.test invocations silently run (or skip) the wrong thing in this…
demo-site
Owns the fitter demo/documentation site under demo/ — the WebAssembly playground, the docs, the examples gallery, and the GitHub Pages deploy. Use for any work on demo/index.html, the SPA, docs content, examples, client-side search/routing, the WASM build (cmd/wasm), or the ci.yaml pages job. Trigger phrases: "demo…