
Rust Patterns
Writes idiomatic Rust: ownership, error handling, enums, traits and safe concurrency.
- Repository
- affaan-m/ECC
- Stars
- 295,127
- Licence
- MIT
- Files
- 1 file
What it does
When you ask the agent to write, review or refactor Rust code, this skill makes it follow common Rust best practices. It nudges the agent to borrow instead of cloning, use Result and the ? operator instead of unwrap() in production code, use thiserror for libraries and anyhow for applications, model states with enums, and keep public APIs small. The guidance is written in Spanish, with Rust code examples.
Great for
- Developers learning idiomatic Rust conventions
- Teams who want an AI assistant to review or refactor Rust code consistently
- Library authors deciding between thiserror and anyhow
Skip it if
- Non-Rust projects, since the patterns only apply to Rust code
- Experts looking for deep, up-to-date language detail; this is a short checklist of conventions and does not cover every edge case
Try asking
- “Revisa este módulo de Rust y dime dónde usa unwrap() o clones innecesarios”
- “Refactoriza este struct para usar un patrón newtype en los IDs”
- “Diseña el manejo de errores de esta biblioteca con thiserror”
- “Reescribe este match con comodín para que sea exhaustivo”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 1 original files, the MIT licence and an attribution note.
rust-patterns.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip rust-patterns.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip rust-patterns.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Point the agent at specific files or crates so it applies the patterns to real code rather than generic examples.
- Say whether you are building a library or an application, since the skill recommends different error crates for each.
- Treat the suggestions as guidance and run cargo build, clippy and your tests to verify the changes.
What's inside
- SKILL.md
Redistributed unmodified from affaan-m/ECC under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.