Rust Skills
A collection of Rust rules that AI coding agents load as a skill to write idiomatic, fast, and safe Rust code.
At a Glance
Rust Skills rule collection for AI coding agents, released under the MIT License and free to use, copy, modify and distribute.
Engagement
Available On
Alternatives
Listed Dec 2026
About Rust Skills
Rust Skills is an open-source, MIT-licensed collection of Rust coding rules packaged as an agent skill, published by leonardomso. The README lists 268 rules across 26 categories, current for Rust 1.100 (2024 edition), for use with AI coding agents such as Claude Code, Cursor, Windsurf, Copilot, Codex, Aider, Zed, Amp and Cline.
What It Is
Rust Skills is a rule set that guides AI coding agents toward expert-level Rust. The README says that out of the box agents tend to write average Rust, such as cloning to avoid the borrow checker, unwrapping everywhere, or using Box where impl Trait would do. The rules encode idiomatic alternatives. Each rule includes why it matters, a bad example, a good example, and links to related rules and sources.
How the Rules Are Organized
A lightweight SKILL.md index lists every rule as a one-line summary grouped by category. Individual rule files live in a rules directory with prefixes such as own-, err-, unsafe- and async-. The agent reads the index first and opens only the rules relevant to the code at hand, which keeps context small. Categories include ownership and borrowing, error handling, memory, unsafe code, API design, async, concurrency, optimization, serde, macros, testing, observability, project structure, linting and anti-patterns.
Setup and Usage
Install with npx skills add leonardomso/rust-skills, which detects installed agents and places the skill appropriately. The skills CLI requires a recent Node.js (declared node >= 22.20.0). Manual installs via git clone or curl are documented for Claude Code, OpenCode, Cursor, Windsurf, Codex, Copilot, Aider, Zed, Amp, Cline and AGENTS.md-compatible agents. Once installed, users ask the agent for tasks such as reviewing a function, checking error handling idioms, finding memory issues, or judging whether an unsafe block is sound.
Provenance and Verification
The rules are original write-ups distilled from official Rust documentation, the Rust API Guidelines, well-known books and idioms in widely used crates. According to the README, Rust code examples outside Bad sections are type-checked in CI on a pinned toolchain via a checks harness.
Community Discussions
Be the first to start a conversation about Rust Skills
Share your experience with Rust Skills, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
Rust Skills rule collection for AI coding agents, released under the MIT License and free to use, copy, modify and distribute.
- 268 Rust rules across 26 categories
- Works with Claude Code, Cursor, Windsurf, Copilot, Codex, Aider, Zed, Amp, Cline
- Install via npx skills add leonardomso/rust-skills or manual git clone/curl
- MIT License
Capabilities
Key Features
- 268 Rust rules across 26 categories
- Bad and good code examples for each rule
- Lightweight SKILL.md index with progressive disclosure
- One Markdown file per rule with category prefixes
- Install via npx skills add
- Manual install options for many agents
- Compile-checked examples in CI
- Anti-pattern lookup mapped to fixing rules
- Covers Rust 2024 edition
