#45

Global Rank · of 600 Skills

rust-skills AI Agent Skill

View Source: leonardomso/rust-skills

Critical

Installation

npx skills add leonardomso/rust-skills --skill rust-skills

453

Installs

Rust Skills

179 Rust rules your AI coding agent can use to write better code.

Works with Claude Code, Cursor, Windsurf, Copilot, Codex, Aider, Zed, Amp, Cline, and pretty much any other agent that supports skills.

Install

npx add-skill leonardomso/rust-skills

That's it. The CLI figures out which agents you have and installs the skill to the right place.

How to use it

After installing, just ask your agent:

/rust-skills review this function
/rust-skills is my error handling idiomatic?
/rust-skills check for memory issues

The agent loads the relevant rules and applies them to your code.

What's in here

179 rules split into 14 categories:

Category Rules What it covers
Ownership & Borrowing 12 When to borrow vs clone, Arc/Rc, lifetimes
Error Handling 12 thiserror for libs, anyhow for apps, the ? operator
Memory 15 SmallVec, arenas, avoiding allocations
API Design 15 Builder pattern, newtypes, sealed traits
Async 15 Tokio patterns, channels, spawn_blocking
Optimization 12 LTO, inlining, PGO, SIMD
Naming 16 Following Rust API Guidelines
Type Safety 10 Newtypes, parse don't validate
Testing 13 Proptest, mockall, criterion
Docs 11 Doc examples, intra-doc links
Performance 11 Iterators, entry API, collect patterns
Project Structure 11 Workspaces, module layout
Linting 11 Clippy config, CI setup
Anti-patterns 15 Common mistakes and how to fix them

Each rule has:

  • Why it matters
  • Bad code example
  • Good code example
  • Links to official docs when relevant

Manual install

If add-skill doesn't work for your setup, here's how to install manually:

Claude Code

Global (applies to all projects):

git clone https://github.com/leonardomso/rust-skills.git ~/.claude/skills/rust-skills

Or just for one project:

git clone https://github.com/leonardomso/rust-skills.git .claude/skills/rust-skills
OpenCode
git clone https://github.com/leonardomso/rust-skills.git .opencode/skills/rust-skills
Cursor
git clone https://github.com/leonardomso/rust-skills.git .cursor/skills/rust-skills

Or just grab the skill file:

curl -o .cursorrules https://raw.githubusercontent.com/leonardomso/rust-skills/master/SKILL.md
Windsurf
mkdir -p .windsurf/rules
curl -o .windsurf/rules/rust-skills.md https://raw.githubusercontent.com/leonardomso/rust-skills/master/SKILL.md
OpenAI Codex
git clone https://github.com/leonardomso/rust-skills.git .codex/skills/rust-skills

Or use the AGENTS.md standard:

curl -o AGENTS.md https://raw.githubusercontent.com/leonardomso/rust-skills/master/SKILL.md
GitHub Copilot
mkdir -p .github
curl -o .github/copilot-instructions.md https://raw.githubusercontent.com/leonardomso/rust-skills/master/SKILL.md
Aider

Add to .aider.conf.yml:

read: path/to/rust-skills/SKILL.md

Or pass it directly:

aider --read path/to/rust-skills/SKILL.md
Zed
curl -o AGENTS.md https://raw.githubusercontent.com/leonardomso/rust-skills/master/SKILL.md
Amp
git clone https://github.com/leonardomso/rust-skills.git .agents/skills/rust-skills
Cline / Roo Code
mkdir -p .clinerules
curl -o .clinerules/rust-skills.md https://raw.githubusercontent.com/leonardomso/rust-skills/master/SKILL.md
Other agents (AGENTS.md)

If your agent supports the AGENTS.md standard:

curl -o AGENTS.md https://raw.githubusercontent.com/leonardomso/rust-skills/master/SKILL.md

All rules

See SKILL.md for the full list with links to each rule file.

Where these rules come from

Contributing

PRs welcome. Just follow the format of existing rules.

License

MIT

Installs

Installs 453
Global Rank #45 of 600

Security Audit

ath Critical
socket Safe
Alerts: 0 Score: 90
snyk unknown
EU EU-Hosted Inference API

Power your AI Agents with the best open-source models.

Drop-in OpenAI-compatible API. No data leaves Europe.

Explore Inference API

GLM

GLM 5

$1.00 / $3.20

per M tokens

Kimi

Kimi K2.5

$0.60 / $2.80

per M tokens

MiniMax

MiniMax M2.5

$0.30 / $1.20

per M tokens

Qwen

Qwen3.5 122B

$0.40 / $3.00

per M tokens

How to use this skill

1

Install rust-skills by running npx skills add leonardomso/rust-skills --skill rust-skills in your project directory. Run the install command above in your project directory. The skill file will be downloaded from GitHub and placed in your project.

2

No configuration needed. Your AI agent (Claude Code, Cursor, Windsurf, etc.) automatically detects installed skills and uses them as context when generating code.

3

The skill enhances your agent's understanding of rust-skills, helping it follow established patterns, avoid common mistakes, and produce production-ready output.

What you get

Skills are plain-text instruction files — not executable code. They encode expert knowledge about frameworks, languages, or tools that your AI agent reads to improve its output. This means zero runtime overhead, no dependency conflicts, and full transparency: you can read and review every instruction before installing.

Compatibility

This skill works with any AI coding agent that supports the skills.sh format, including Claude Code (Anthropic), Cursor, Windsurf, Cline, Aider, and other tools that read project-level context files. Skills are framework-agnostic at the transport level — the content inside determines which language or framework it applies to.

Data sourced from the skills.sh registry and GitHub. Install counts and security audits are updated regularly.

EU Made in Europe

Chat with 100+ AI Models in one App.

Use Claude, ChatGPT, Gemini alongside with EU-Hosted Models like Deepseek, GLM-5, Kimi K2.5 and many more.