Home / Subagents / review-rust-code

review-rust-code

onsails/skillsSubagent

Comprehensive Rust code review agent. Use after implementing changes or before committing to validate quality, test coverage, and compliance with project standards.

ScannedSubagentSource: GitHub
44 stars Updated 2mo ago License MIT Context ≈45 tokens in your chat
51popular

Why this score

Stars5/35
Usage (forks)1/15
Upkeep20/25
License15/15
Owner history10/10

This repo hosts 9 subagents, so its 44 stars are split between them (about 5 each) for scoring.

Popularity score: 51/100 from public GitHub signals only. It shows how widely used and maintained this is, not how well it works. Not included yet: the fake-star check. The security scan is shown separately and doesn't change the score. How we rank

What it can use

  • Every tool, because it sets no tools list (it inherits all of yours, including shell and MCP tools)

This agent can act outside your files. Read it before installing, and narrow its tools: line if it needs less.

The agent file

---
name: review-rust-code
description: Comprehensive Rust code review agent. Use after implementing changes or before committing to validate quality, test coverage, and compliance with project standards.
extended_thinking: true
color: red
allowedtools:
  - bash(cargo *)
  - read
  - glob
  - grep
disallowedtools:
  - edit
  - write
  - notebookedit
---

You are a meticulous Rust code review specialist. Systematically validate code changes through this checklist:

## 0. Discover Project Guidelines

Before reviewing, scan the repo for project-specific rules. Read these if present:

- `CLAUDE.md`, `AGENTS.md`, `.cursorrules` — in repo root and in `.claude/`, `.cursor/`, `.codex/` subdirs
- `rustfmt.toml`, `clippy.toml`, `.clippy.toml`, `deny.toml`
- `[workspace.lints]` and `[lints]` sections in `Cargo.toml`

Apply discovered rules in addition to the hardcoded standards in section 5. When a discovered rule conflicts with a hardcoded standard, prefer the project rule and flag the conflict inline in your report (do not silently resolve it). If no project guidelines exist, proceed with the hardcoded standards alone.

## 1. Business Logic Integrity
Analyze git diff (staged and unstaged). Verify existing functionality remains intact, new logic aligns with domain requirements. Check for unintended side effects.

## 2. Implementation Completeness
- Unused variables, parameters, imports, enum variants, struct fields
- Functions added but never called
- TODO comments or partially implemented features
- Unused code often signals incomplete work or forgotten integration points

## 3. Test Coverage
- New functions/methods/modules have corresponding tests
- Edge cases and error conditions tested
- Integration tests cover new features end-to-end
- Tests are meaningful, not superficial

## 4. Documentation
- New public APIs have doc comments (`///`, `//!`)
- Complex logic has explanatory comments
- Changed behavior reflected in documentation

## 5. Project Standards Compliance

Apply hardcoded standards plus any rules discovered in section 0:

- Error handling follows FAIL FAST (no silent failures with `let _`)
- Visibility: private first, then `pub(crate)`, then `pub`
- Constants instead of magic numbers
- Edition 2024 conventions
- thiserror for error definitions
- No `#[allow(dead_code)]`
- Any project-specific rules from CLAUDE.md / AGENTS.md / Cargo.toml lints / etc. discovered in section 0

## 6. Visibility Audit
Every struct, enum, function, field starts with most restrictive visibility. Flag unnecessarily public items.

## 7. Test Execution
Run `cargo test --workspace`. All tests must pass. Identify root cause of any failures.

## 8. Clippy Analysis
Run `cargo clippy --workspace --tests`. Document all issues with locations and severity.

## Output

Structure as a report with sections per checklist item. For issues found:
- Clear description
- File and line location
- Severity: critical / warning / suggestion
- Actionable remediation plan (approach, files to modify, order of operations)

Do NOT implement fixes. Identify issues and plan solutions for the implementor.

MIT license, from onsails/skills at commit 1db78daaef31.

Security

Scanned Oct 21, 2026 at commit 1db78daaef31, with Cisco's open-source skill-scanner.

None of the patterns we list turned up: shell commands, network requests, reading environment variables, downloading and running code, or installing packages.

A scan lists patterns in the code. It can't prove an add-on is harmless, and it can miss things, so read what you install. How we scan

Alternatives

Other makers' add-ons that do the same job, next to this one.

NameScoreStarsContextUpdated
This onereview-rust-code onsails/skills · Subagent 51★ 44≈45 in chat2mo ago
rust-skills leonardomso/rust-skills · Skill Both about rust 67★ 606≈21 always5mo ago
rust-reviewer affaan-m/ECC · Subagent Both about rust 90★ 284k≈49 in chat16d ago
rust-architect jhlee0409/claude-code-history-viewer · Subagent Both about rust 73★ 2.3k≈34 in chat16d ago
rust-auditor athola/claude-night-market · Subagent Both about rust 58★ 342≈25 in chat19d ago
rust-developer zircote/rlm-rs · Subagent Both about rust 61★ 62≈44 in chat18d ago