rust-expert

Analyze Rust code for ownership, lifetimes, and unsafe block safety.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/thepradip/openfangclaw --skill rust-expert-thepradip
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-expert
Source: https://github.com/thepradip/openfangclaw/tree/main/crates/openfang-skills/bundled/rust-expert
Command: npx skills add https://github.com/thepradip/openfangclaw --skill rust-expert-thepradip

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Rust programming expert helps teams reason about ownership, lifetimes, async runtimes, and unsafe blocks to write correct, efficient systems code.

Core Features & Use Cases

  • Understand and apply Rust ownership and borrowing rules to prevent data races and memory unsafety.
  • Design safe abstractions with traits, generics, and typestate to encode invariants at compile time.
  • Review code for correct use of async runtimes (e.g., tokio), error handling with Result, and safe unsafe blocks.

Quick Start

Review a Rust codebase to identify ownership issues and propose safe, idiomatic patterns.

Frequently Asked Questions about rust-expert

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

FAQPage Schema
How do I fix Rust ownership and borrowing errors in my code?

Rust ownership errors are resolved by analyzing variable lifetimes and adjusting borrows to prevent data races. This Skill reviews your codebase to identify ownership issues and proposes safe, idiomatic patterns that satisfy the borrow checker.

What's the best way to use unsafe blocks safely in Rust systems code?

Using unsafe blocks safely requires documenting safety guarantees and encapsulating them within safe abstractions. This Skill reviews your unsafe code usage to ensure memory safety invariants are maintained and recommends idiomatic constructs.

How do I design Rust traits and generics to encode invariants at compile time?

Designing Rust traits and generics for compile-time invariants involves creating safe abstractions using typestate patterns. This Skill helps you apply ownership rules and trait design to prevent memory unsafety before runtime.

Can I use this to review async runtime patterns and error handling in Rust?

Yes, reviewing async runtime patterns and error handling is supported. This Skill analyzes your Rust code for correct use of async runtimes like tokio, proper Result error handling, and safe concurrency patterns.

Why does my Rust code fail the borrow checker when implementing concurrency patterns?

Rust code fails the borrow checker during concurrency implementation when ownership and borrowing rules conflict with data access patterns. This Skill analyzes your code to identify these ownership issues and proposes safe, idiomatic patterns.

When do I need to analyze Rust API surfaces for ownership and safety guarantees?

Analyzing Rust API surfaces for ownership and safety is needed when building libraries or systems projects that expose public interfaces. This Skill reviews API surfaces to ensure correct lifetimes, safe abstractions, and documented safety guarantees.