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
explanation-docs
Explanation documentation patterns for understanding-oriented content - conceptual guides that explain why things work the way they do
tutorial-docs
Tutorial patterns for documentation - learning-oriented guides that teach through guided doing
pytest-code-review
Reviews pytest test code for async patterns, fixtures, parametrize, and mocking. Use when reviewing test_*.py files, checking async test functions, fixture usage, or mock patterns.
reference-docs
Reference documentation patterns for API and symbol documentation. Use when writing reference docs, API docs, parameter tables, or technical specifications. Triggers on reference docs, API reference, function reference, parameters table, symbol documentation.
serde-code-review
Reviews serde serialization code for derive patterns, enum representations, custom implementations, and common serialization bugs. Use when reviewing Rust code that uses serde, serde_json, toml, or any serde-based serialization format. Covers attribute macros, field renaming, and format-specific pitfalls.