review-rust
Comprehensive Rust code review with optional parallel agents
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/anderskev/review-rustRust Code Review
Arguments
--parallel: Spawn specialized subagents per technology area- Path: Target directory (default: current working directory)
Hard gates
Complete in order before writing Issues in the output (empty scope is allowed; fabricated findings are not).
- Scope gate: You have an explicit list of
.rspaths under review (from Step 1 or the user-provided path). Pass: List printed or "No Rust files in scope" — then stop with no Issues. - Compiler/linter gate: Step 3 commands were run from the crate or workspace root (
Cargo.tomlpresent); if they cannot run, one line states why (e.g. missing toolchain, noCargo.toml, sandbox). Pass: You do not report a problem already shown as an error/warning in Step 3 output, and you do not duplicate compiler or clippy diagnostics the author must fix first. - Protocol gate:
beagle-rust:review-verification-protocolis loaded before Step 7. Pass: Every Critical/Major finding satisfies Step 8 (and the protocol); if there are zero findings, say "Protocol applied; no issues" in the Review Summary. - Evidence gate (Critical/Major): For each Critical or Major item, you re-read the file at
FILE:LINEwith full surrounding context (not only the diff hunk). Pass: The Issue description matches observable code at that location.
Step 1: Identify Changed Files
git diff --name-only $(git merge-base HEAD main)..HEAD | grep -E '\.rs$'
Step 2: Check Rust Edition and MSRV
# Check Cargo.toml for edition and rust-version
grep -E 'edition|rust-version' Cargo.toml
# Check workspace members if workspace
grep -A 20 '\[workspace\]' Cargo.toml
Edition 2024 awareness (requires MSRV 1.85+):
If edition = "2024" is detected, the following behavioral changes apply throughout the review:
unsafe_op_in_unsafe_fnis deny by default — unsafe operations insideunsafe fnMUST use explicitunsafe {}blocksextern "C" {}blocks must beunsafe extern "C" {}#[no_mangle]and#[export_name]must be#[unsafe(no_mangle)]and#[unsafe(export_name)]-> impl Traitcaptures ALL in-scope lifetimes by default (RPIT lifetime capture change); use+ use<'a>for precise capturegenis a reserved keyword — code using it as an identifier must user#gen!(never type) falls back to!instead of()— may change behavior of inferred types- Temporaries in
if letconditions and tail expressions are dropped earlier than in edition 2021 Box<[T]>now implementsIntoIterator
Record the detected edition — it affects severity calibration in Steps 3, 8, and the verification protocol.
Step 3: Verify Linter Status
CRITICAL: Run clippy and check BEFORE flagging style or correctness issues. Do NOT flag issues that clippy or the compiler already catches.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-anderskev-review-rust": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
tutorial-docs
Tutorial patterns for documentation - learning-oriented guides that teach through guided doing
fetch-pr-feedback
Fetch review comments from a PR and evaluate with receive-feedback skill
swift-testing-code-review
Reviews Swift Testing code for proper use of
rust-testing-code-review
Reviews Rust test code for unit test patterns, integration test structure, async testing, mocking approaches, and property-based testing. Covers Rust 2024 edition changes including async fn in traits for mocks,
explanation-docs
Explanation documentation patterns for understanding-oriented content - conceptual guides that explain why things work the way they do