ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

review-rust

Comprehensive Rust code review with optional parallel agents

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/anderskev/review-rust
Or

Rust 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).

  1. Scope gate: You have an explicit list of .rs paths under review (from Step 1 or the user-provided path). Pass: List printed or "No Rust files in scope" — then stop with no Issues.
  2. Compiler/linter gate: Step 3 commands were run from the crate or workspace root (Cargo.toml present); if they cannot run, one line states why (e.g. missing toolchain, no Cargo.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.
  3. Protocol gate: beagle-rust:review-verification-protocol is 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.
  4. Evidence gate (Critical/Major): For each Critical or Major item, you re-read the file at FILE:LINE with 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_fn is deny by default — unsafe operations inside unsafe fn MUST use explicit unsafe {} blocks
  • extern "C" {} blocks must be unsafe extern "C" {}
  • #[no_mangle] and #[export_name] must be #[unsafe(no_mangle)] and #[unsafe(export_name)]
  • -> impl Trait captures ALL in-scope lifetimes by default (RPIT lifetime capture change); use + use<'a> for precise capture
  • gen is a reserved keyword — code using it as an identifier must use r#gen
  • ! (never type) falls back to ! instead of () — may change behavior of inferred types
  • Temporaries in if let conditions and tail expressions are dropped earlier than in edition 2021
  • Box<[T]> now implements IntoIterator

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

Author@anderskev
Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-anderskev-review-rust": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.