rust-engineer

Write, review, and debug idiomatic Rust code with ownership and lifetimes.

19|3|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/dirien/yet-another-agent-harness --skill rust-engineer-dirien
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-engineer
Source: https://github.com/dirien/yet-another-agent-harness/tree/main/.claude/skills/rust-engineer
Command: npx skills add https://github.com/dirien/yet-another-agent-harness --skill rust-engineer-dirien

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Rust projects often struggle with ownership, lifetime, and concurrency bugs that lead to memory-safety issues, undefined behavior, and poor performance; this Skill provides patterns, checks, and idiomatic implementations to prevent those problems and produce reliable, maintainable Rust code.

Core Features & Use Cases

  • Analyze ownership and lifetime relationships and propose explicit annotations when inference is insufficient.
  • Design trait hierarchies, generics, and type-safe APIs that favor zero-cost abstractions.
  • Implement async code with tokio, structure error handling using Result/Option and thiserror, and minimize unsafe usage with documented invariants.
  • Validate code by running formatting, clippy, and test recommendations and provide test templates and benchmarks for production readiness.
  • Use Case: Convert a prototype that misuses cloning and blocking I/O into an async tokio-based service with proper lifetimes, error types, and comprehensive unit and integration tests.

Quick Start

Implement a safe, idiomatic Rust module that fixes ownership issues, replaces unnecessary cloning with borrows, adds a custom error enum, and includes unit tests and cargo clippy/fmt instructions.

Frequently Asked Questions about rust-engineer

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

FAQPage Schema
How do I fix Rust ownership and lifetime errors when the compiler cannot infer annotations?

To fix Rust ownership and lifetime errors, analyze variable relationships and add explicit lifetime annotations when inference fails, replacing unnecessary cloning with borrows to ensure memory safety.

What is the best way to structure async Rust applications with tokio?

The best way to structure async tokio applications is to replace blocking I/O with async equivalents, use Result/Option for error handling, and define custom error enums to build reliable concurrent systems.

How do I minimize unsafe Rust code while maintaining performance?

Minimize unsafe Rust code by favoring zero-cost abstractions and trait-based APIs, only using unsafe blocks with explicitly documented invariants to guarantee memory safety and defined behavior.

Does this approach support building FFI bindings and trait-based APIs in Rust 2021?

Yes, this approach supports building FFI bindings and designing trait-based generics using Rust 2021 features to create type-safe APIs that favor zero-cost abstractions for high-performance systems.

Why should I run cargo fmt, cargo clippy, and cargo test for Rust code review?

Run cargo fmt, clippy, and test during Rust code review to validate formatting, catch idiomatic lint violations, execute unit and integration tests, and ensure production readiness.