
rust-patterns
Idiomatic Rust patterns, ownership, error handling, traits, concurrency
by affaan-mFree
Description
rust-patterns is an agent skill from the ECC collection by affaan-m, listed on skills.sh. It enforces idiomatic Rust conventions across six areas. Ownership and borrowing are used to prevent data races at compile time. Errors are propagated with Result and the ? operator, using thiserror for libraries and anyhow for applications. Enums and exhaustive pattern matching make illegal states unrepresentable. Traits and generics give zero-cost abstraction. Concurrency uses Arc with Mutex, channels, and async and await. Crate structure keeps public surfaces small and organised by domain. The skill applies when writing new Rust code, reviewing it, refactoring existing code, and designing crate structure and module layout. Because it is a SKILL.md file of instructions, an AI coding agent loads it for those tasks and applies the same conventions. It is free and open source, and the skills.sh listing shows all three security audits passing.…
Highlights
- Ownership and borrowing rules
- Result, ? and thiserror or anyhow for errors
- Enums and exhaustive matching
- Arc, Mutex, channels and async
Ratings & Reviews
No ratings yet
Be the first to rate rust-patterns.
People also visit

coding-standards
Baseline cross-project coding conventions for naming, readability, immutability

cpp-coding-standards
C++ coding standards based on the C++ Core Guidelines (isocpp.github.io)

dotnet-patterns
Idiomatic C# and .NET patterns, conventions, dependency injection, async/await

golang-patterns
Idiomatic Go patterns, best practices, and conventions for building robust

inherit-legacy-style
Prevent AI style drift on legacy projects by scanning the codebase
rust-patterns FAQ
What does the rust-patterns skill do?
It guides an agent in writing, reviewing and refactoring idiomatic Rust, covering ownership, errors, enums, traits, concurrency and crate layout.
Which error crates does it recommend?
thiserror for libraries and anyhow for applications.
Does it cover async?
Yes. Concurrency covers channels and async and await alongside Arc and Mutex.
How do I install it?
Run: npx skills add https://github.com/affaan-m/ecc --skill rust-patterns
Is it free?
Yes. It is free and open source.
Are there security findings?
The skills.sh listing shows Gen Agent Trust Hub, Socket and Snyk all passing.
What are the best rust-patterns alternatives?
Popular alternatives to rust-patterns include coding-standards, cpp-coding-standards and dotnet-patterns. See all rust-patterns alternatives









