rust-reviewer

Audit Rust code for ownership, lifetimes, error handling, and unsafe usage.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/physics91/claude-vibe --skill rust-reviewer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-reviewer
Source: https://github.com/physics91/claude-vibe/tree/main/skills/rust-reviewer
Command: npx skills add https://github.com/physics91/claude-vibe --skill rust-reviewer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill reviews Rust projects for ownership/borrowing correctness, lifetime usage, error handling patterns, unsafe code, and idiomatic Rust practices.

Core Features & Use Cases

  • Ownership & borrowing checks: reduce unnecessary clones and borrow issues.
  • Lifetime annotation guidance: ensure explicit and minimal lifetimes.
  • Error handling patterns: promote Result/Option usage with meaningful errors.
  • Unsafe code audit: flag unsafe usage and unsafe blocks risks.
  • Use Case: Clean up a crate by eliminating redundant clones and clarifying lifetimes.

Quick Start

Run the rust-reviewer against a Cargo workspace to get a structured rationale for common Rust patterns and safety recommendations.

Frequently Asked Questions about rust-reviewer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit Rust code for ownership and borrowing issues?

Ownership and borrowing audits detect unnecessary clones, improper borrow patterns, and memory safety violations in Rust projects. Run the reviewer against your Cargo workspace to identify redundant clones, clarify borrow scopes, and receive actionable fixes with severity ratings and rationale.

What does unsafe code auditing in Rust involve?

Unsafe code audits flag unsafe blocks, unsafe function usage, and associated risks in Rust projects. The reviewer analyzes unsafe patterns, documents potential safety violations, and provides structured recommendations to minimize unsafe code scope and document necessary risks.

How do I check lifetime annotations in Rust?

Lifetime annotation checks ensure explicit and minimal lifetime declarations in your Rust code. The reviewer evaluates lifetime usage, identifies over-annotated or ambiguous lifetimes, and generates fixes to align with Rust idioms and reduce cognitive overhead.

Can I use this reviewer to enforce error handling patterns?

Error handling pattern enforcement promotes idiomatic Result and Option usage throughout Rust projects. The reviewer detects anti-patterns, evaluates error propagation, and recommends meaningful error types and handling strategies aligned with Rust best practices.

Does the reviewer work with Cargo workspaces?

Yes, the reviewer integrates with Cargo workspaces and detects Cargo.toml configuration. It runs across multi-crate projects, executes tests, and works with clippy to generate comprehensive, structured review output including severity, rationale, and fixes.

What idiomatic Rust patterns does the reviewer check?

Idiomatic pattern checks cover ownership correctness, borrowing conventions, lifetime usage, unsafe code scope, and error handling semantics. The reviewer flags deviations from Rust best practices and provides actionable guidance to align code with community standards and safety guarantees.