Rust Patterns
Idiomatic Rust patterns for ownership, error handling, enums, traits, iterators, and concurrency in production code.
- CCM score
- 71 of 100
- skills.sh installs
- 12.9K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers ownership and borrowing,
Resultand?propagation, enum state modeling, traits and generics, iterators, andArc<Mutex<T>>concurrency - Includes code examples contrasting idiomatic and anti-pattern versions, such as avoiding
unwrap()and wildcard match arms - Enforces
thiserrorfor typed library errors andanyhowfor application errors, with exhaustive matching on business logic - Designed for writing, reviewing, or refactoring Rust code where ownership, error handling, traits, or concurrency is in question
Install
$ npx -y skills add affaan-m/ecc --skill rust-patterns -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Rust Development Patterns
Idiomatic Rust patterns and best practices for building safe, performant, and maintainable applications.
When to Use
- Writing new Rust code
- Reviewing Rust code
- Refactoring existing Rust code
- Designing crate structure and module layout
How It Works
This skill enforces idiomatic Rust conventions across six key areas: ownership and borrowing to prevent data races at compile time, Result/? error propagation with thiserror for libraries and anyhow for applications, enums and exhaustive pattern matching to make illegal states unrepresentable, traits and generics for zero-cost abstraction, safe concurrency via Arc<Mutex<T>>, channels, and async/await, and minimal pub surfaces organized by domain.
Core Principles
1. Ownership and Borrowing
Rust's ownership system prevents data races and memory bugs at compile time.
// Good: Pass references when you don't need ownership
fn process(data: &[u8]) -> usize {
data.len()
}
// Good: Take ownership only when you need to store or consume
fn store(data: Vec<u8>) -> Record {
Record { payload: data }
}
Details
- Repository
- github.com/affaan-m/ecc
- Category
- Rust
- First seen
- Jul 14, 2026
Questions
What does the rust-patterns skill help with?
The rust-patterns skill covers idiomatic Rust patterns, including ownership and borrowing, error handling, traits, and concurrency. It is meant for writing, reviewing, and refactoring Rust code, and for designing crate structure and module layout.
Where does rust-patterns rank among Rust skills?
On the Rust category page on Claude Marketplaces, rust-patterns ranks in the top 10. Other skills in the same category include fix-errors, rust-best-practices, rust-async-patterns, rust-testing, and memory-safety-patterns.
How do I install the rust-patterns skill?
Run npx -y skills add affaan-m/ecc --skill rust-patterns -y in your project. Once installed, the agent can enforce idiomatic Rust conventions such as Result and ? error propagation, enum-based state modeling, and safe concurrency with Arc and Mutex.
Does rust-patterns recommend error crates for Rust projects?
Yes, the skill recommends thiserror for library code, where errors are structured and typed, and anyhow for application code, where error handling is more flexible. It also advises against unwrap() in production code.
More from affaan-m/ecc
All 257- Kotlin Coroutines Flows12.9K
- Configure Ecc12.9K
- Laravel Tdd12.8K
- Agentic Engineering12.8K
- Clickhouse Io12.7K
- Cost Aware Llm Pipeline12.7K
- Kotlin Patterns12.7K
- Iterative Retrieval12.6K
- Django Verification12.6K
- Nextjs Turbopack12.6K
- Content Engine12.5K
- Springboot Verification12.5K
- Context Budget12.5K
- Nutrient Document Processing12.5K
- Autonomous Loops12.4K
- Architecture Decision Records12.4K
- Investor Materials12.4K
- Swiftui Patterns12.4K
- Pytorch Patterns12.3K
- Bun Runtime12.3K
- Ai First Engineering12.3K
- Flutter Dart Code Review12.2K
- Perl Security12.2K
- Regex Vs Llm Structured Text12.2K
Similar to Rust Patterns
More Rustrust-engineerjeffallan/claude-skills7K installsIdiomatic Rust engineering skill covering ownership, lifetimes, traits, async tokio, and error handling.
rust-best-practicesapollographql/skills24.3K installsIdiomatic Rust guidance covering ownership, error handling, performance, linting, testing, and documentation, drawn from Apollo's handbook.
m01-ownershipactionbook/rust-skills3.9K installsRust ownership and lifetime error guide that maps compiler codes to design questions before quick fixes.
rust-skillsleonardomso/rust-skills7.7K installsComprehensive Rust coding guidelines with 265 rules across 26 categories for writing and reviewing code.
rust-systems-programmingmanutej/luxor-claude-marketplace492 installsComplete Rust guide covering ownership, borrowing, concurrency, async, and unsafe code for memory-safe systems work.
rustmindrally/skills833 installsExpert Rust guidance covering ownership-based safety, error handling, performance, and async programming with tokio.