Guides safe, concurrent, and high-performance system programming in Rust.
Install
mkdir -p .claude/skills/rust-mkspwr12 && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15169" && unzip -o skill.zip -d .claude/skills/rust-mkspwr12 && rm skill.zipInstalls to .claude/skills/rust-mkspwr12
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Build safe, concurrent, and performant systems with Rust. Use when writing Rust applications, implementing ownership and borrowing patterns, building concurrent code with threads/async, designing trait-based abstractions, or optimizing Rust performance.Key capabilities
- →Build Rust applications and systems
- →Implement ownership, borrowing, and lifetimes patterns
- →Handle errors using `Result` and `Option` types
- →Write concurrent code with threads and `async`
- →Design trait-based abstractions
- →Optimize Rust performance
How it works
This skill provides best practices and guidelines for Rust development, covering project structure, ownership, error handling, concurrency, and performance optimization.
Inputs & outputs
When to use rust
- →Implementing ownership patterns
- →Writing thread-safe concurrent code
- →Designing generic traits
- →Optimizing performance
About this skill
Rust Development
Purpose: Best practices for Rust development including ownership, error handling, concurrency, and safety patterns.
When to Use This Skill
- Building Rust applications and systems
- Working with ownership, borrowing, and lifetimes
- Implementing error handling with Result and Option types
- Writing concurrent code with threads and async
- Designing trait-based abstractions
Prerequisites
- Rust 1.75+ installed via rustup
- Cargo package manager
Table of Contents
- Project Structure
- Ownership and Borrowing
- Error Handling
- Traits and Generics
- Concurrency
- Testing
- Performance
- Security
- Best Practices
Project Structure
Standard Layout
project/
├── src/
│ ├── main.rs # Binary entry point
│ ├── lib.rs # Library root
│ ├── config.rs # Configuration
│ ├── error.rs # Error types
│ ├── models/
│ │ ├── mod.rs
│ │ └── user.rs
│ └── services/
│ ├── mod.rs
│ └── user_service.rs
├── tests/
│ └── integration_tests.rs
├── benches/
│ └── benchmarks.rs
├── examples/
│ └── basic_usage.rs
├── Cargo.toml
├── Cargo.lock
└── README.md
Cargo.toml
[package]
name = "myapp"
version = "0.1.0"
edition = "2021"
authors = ["Your Name <[email protected]>"]
description = "A brief description"
[dependencies]
tokio = { version = "1", features = ["full"] }
serde = { version = "1", features = ["derive"] }
thiserror = "1"
anyhow = "1"
[dev-dependencies]
tokio-test = "0.4"
[profile.release]
lto = true
opt-level = 3
Best Practices
✅ DO
- Use
clippyfor linting:cargo clippy - Format with
rustfmt:cargo fmt - Prefer
&stroverStringfor function parameters - Use
#[derive]for common traits - Write documentation with
/// - Use
Resultfor recoverable errors - Leverage the type system for safety
❌ DON'T
- Use
unwrap()in production code - Ignore compiler warnings
- Use
unsafewithout clear justification - Clone unnecessarily
- Write overly complex lifetimes
- Panic for expected error conditions
References
Version: 1.0 Last Updated: February 5, 2026
Troubleshooting
| Issue | Solution |
|---|---|
| Borrow checker errors | Use .clone() for simple cases, refactor with owned types or Arc<Mutex<T>> |
| Lifetime annotation confusion | Start with owned types, add references only when performance requires it |
| Async runtime errors | Ensure using #[tokio::main] or equivalent, dont mix sync and async without spawn_blocking |
When not to use it
- →When the project does not involve Rust development
- →When the user does not need to implement ownership and borrowing patterns
- →When the user is not building concurrent code with threads/async
Prerequisites
Limitations
- →The skill advises against using `unwrap()` in production code
- →The skill warns against ignoring compiler warnings
- →The skill recommends avoiding `unsafe` without clear justification
How it compares
This workflow offers structured guidance for Rust development, emphasizing specific language features and best practices, which helps in building reliable and efficient systems more effectively than ad-hoc coding.
Compared to similar skills
rust side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| rust (this skill) | 0 | 6mo | No flags | Advanced |
| rust-pro | 3 | 27d | No flags | Advanced |
| implementing-cards | 7 | 2mo | Review | Advanced |
| rust-async-patterns | 11 | 2mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
rust-pro
vudovn
Master Rust 1.75+ with modern async patterns, advanced type system features, and production-ready systems programming. Expert in the latest Rust ecosystem including Tokio, axum, and cutting-edge crates. Use PROACTIVELY for Rust development, performance optimization, or systems programming.
implementing-cards
bcollazo
Fill out the implementation of effects of different attacks, abilities, and trainer cards in this Pokemon TCG Pocket engine codebase.
rust-async-patterns
wshobson
Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns. Use when building async Rust applications, implementing concurrent systems, or debugging async code.
write-rust-tests
RediSearch
Write Rust tests to verify correctness of Rust code.
rust-errors
EpicenterHQ
Rust to TypeScript error handling patterns for Tauri apps. Use when defining Rust errors that will be passed to TypeScript, handling Tauri command errors, or creating discriminated union error types.
write-script-rust
windmill-labs
MUST use when writing Rust scripts.