rust-engineer

Generate idiomatic Rust code with ownership, borrowing, and lifetime handling.

1|Updated May 16, 2026
One-click install
npx skills add https://github.com/enigmaicon-eng/AI-Enterprise-OS --skill rust-engineer-enigmaicon-eng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-engineer
Source: https://github.com/enigmaicon-eng/AI-Enterprise-OS/tree/main/examples/claude-skills/skills/rust-engineer
Command: npx skills add https://github.com/enigmaicon-eng/AI-Enterprise-OS --skill rust-engineer-enigmaicon-eng

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps you write, review, and debug idiomatic Rust effectively, avoiding common ownership, borrowing, and error-handling pitfalls while producing reliable, high-performance code.

Core Features & Use Cases

  • Ownership & Lifetimes Guidance: Design borrowing patterns and lifetime relationships to prevent dangling references and unnecessary cloning.
  • Trait-Based API Design: Create clean trait hierarchies with generics and associated types for extensible Rust libraries and services.
  • Async with Tokio: Implement correct async/await concurrency patterns, including parallel execution and graceful shutdown.
  • Error Handling Mastery: Use Result/Option with robust custom error types via thiserror, and propagate failures predictably.

Use case example: You’re building a Rust service that concurrently fetches remote data, transforms it, and returns structured domain errors—this skill guides the implementation from lifetimes through Tokio orchestration to testable, clippy-clean code.

Quick Start

Use rust-engineer to implement a Tokio-based async function that fetches two URLs concurrently, transforms the results, and returns a typed thiserror-based AppError.

Frequently Asked Questions about rust-engineer

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

FAQPage Schema
How do I resolve Rust ownership and borrowing conflicts without unnecessary cloning?

To resolve Rust ownership and borrowing conflicts, analyze lifetime relationships and design borrowing patterns that satisfy the borrow checker. This ensures safe memory access without dangling references or excessive cloning overhead.

What is the best way to handle errors in async Rust with Tokio?

The best way to handle errors in async Rust with Tokio is using Result and Option with custom error types via thiserror. This propagates failures predictably through async functions without relying on panics.

How do I design extensible Rust trait hierarchies with generics and associated types?

To design extensible Rust trait hierarchies, define traits with generics and associated types for clean API boundaries. This structures trait design to support flexible, generic library and service implementations.

Can I use unsafe Rust blocks for performance without compromising safety?

You can use unsafe Rust blocks for performance, but they must be strictly documented and isolated. Implement safe wrappers around unsafe code to maintain overall memory safety and prevent undefined behavior.

Why does my Rust code fail clippy checks when using async concurrency?

Rust code fails clippy checks during async concurrency due to non-idiomatic patterns or inefficient logic. Validate the implementation strictly using cargo fmt, cargo clippy, and cargo test to ensure zero-cost abstractions.

When do I need explicit lifetime annotations in Rust function signatures?

You need explicit lifetime annotations in Rust function signatures when references have complex relationships the compiler cannot infer. Analyze lifetimes and borrowing to prevent dangling references and ensure data validity.