rust-engineer

Implement memory-safe Rust 2021 code with ownership, lifetimes, traits, and tokio async workflows.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you design and implement reliable Rust systems by applying Rust’s ownership, lifetimes, trait architecture, and async patterns while avoiding common safety and correctness pitfalls.

Core Features & Use Cases

  • Ownership-first design: Plan borrowing and lifetime relationships to prevent invalid references and data races.
  • Trait- and generics-based architecture: Create clean trait hierarchies, generic APIs, and associated types for extensible designs.
  • Async with tokio: Implement robust async workflows with concurrency primitives, cancellation patterns, and safe runtime usage.
  • Error handling discipline: Use Result/Option with explicit propagation, custom error types, and consistent testing strategies.
  • Use Case: When building a backend service that streams work concurrently, uses tokio tasks, and needs correct shutdown behavior with structured error types and thorough tests.

Quick Start

Tell the AI: “Act as a senior Rust 2021 engineer and help me design ownership and lifetimes for this module, then outline the trait structure and tokio async workflow with robust error handling and tests.”

Frequently Asked Questions about rust-engineer

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

FAQPage Schema
How do I structure Rust ownership and lifetimes to prevent data races in my module?

To structure Rust ownership and lifetimes safely, plan borrowing relationships and lifetime annotations explicitly to prevent invalid references. This approach ensures memory safety by enforcing strict reference rules at compile time, eliminating data races before runtime.

What's the best way to design trait-based generic APIs with associated types in Rust?

The best way to design trait-based generic APIs in Rust is to create clean trait hierarchies using associated types for extensible architectures. This method allows you to define flexible, reusable interfaces that maintain strong type safety while adapting to various concrete implementations.

How do I implement robust tokio async workflows with correct cancellation patterns?

Implementing robust tokio async workflows requires using concurrency primitives and safe runtime usage to handle task cancellation correctly. You must structure your async Rust code to manage shutdown behavior explicitly, ensuring tasks complete safely without leaving resources in an inconsistent state.

Why should I use explicit Result and Option error handling instead of unwrap in production Rust?

You should use explicit Result and Option error handling in production Rust because unwrap causes panics on unexpected failures. Propagating errors with custom error types ensures your application handles failures gracefully and maintains robust, safe execution during runtime edge cases.

Can I use minimal unsafe Rust implementations for performance-critical tasks without breaking safety guarantees?

You can use minimal unsafe Rust implementations for performance-critical tasks by enclosing unsafe blocks tightly and validating behavior with thorough cargo tooling tests. This confines risk while allowing low-level memory manipulation necessary for specific systems programming optimizations.