brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Comprehensive Rust coding guidelines with 265 rules across 26 categories. Use when writing, reviewing, or refactoring Rust code. Covers ownership, error handling, async patterns, concurrency, unsafe code, API design, memory optimization, performance, numeric safety, conversions,
Claude Code
$ npx -y skills add leonardomso/rust-skills --skill rust-skills --agent claude-code
Codex
$ npx skills add leonardomso/rust-skills --skill rust-skills -a codex -y
Cursor
$ npx skills add leonardomso/rust-skills --skill rust-skills -a cursor -y
Gemini CLI
$ npx skills add leonardomso/rust-skills --skill rust-skills -a gemini-cli -y
GitHub Copilot
$ npx skills add leonardomso/rust-skills --skill rust-skills -a github-copilot -y
OpenCode
$ npx skills add leonardomso/rust-skills --skill rust-skills -a opencode -y
Windsurf
$ npx skills add leonardomso/rust-skills --skill rust-skills -a windsurf -y
name: rust-skills
description: >
Comprehensive Rust coding guidelines with 265 rules across 26 categories.
Use when writing, reviewing, or refactoring Rust code. Covers ownership,
error handling, async patterns, concurrency, unsafe code, API design, memory
optimization, performance, numeric safety, conversions, serde, pattern
matching, macros, closures, observability, testing, and common anti-patterns.
Invoke with /rust-skills.
license: MIT
metadata:
author: leonardomso
version: "1.5.1"
sources:
- Rust API Guidelines
- Rust Performance Book
- Rust 2024 Edition Guide
- The Rustonomicon
- ripgrep, tokio, serde, polars, axum, cargo codebasesComprehensive guide for writing high-quality, idiomatic, and highly optimized Rust code. Contains 265 rules across 26 categories, prioritized by impact to guide LLMs in code generation and refactoring. Current for Rust 1.96 (2024 edition).
Reference these guidelines when:
| Priority | Category | Impact | Prefix | Rules | |----------|----------|--------|--------|-------| | 1 | Ownership & Borrowing | CRITICAL | `own-` | 12 | | 2 | Error Handling | CRITICAL | `err-` | 12 | | 3 | Memory Optimization | CRITICAL | `mem-` | 17 | | 4 | Unsafe Code | CRITICAL | `unsafe-` | 7 | | 5 | API Design | HIGH | `api-` | 17 | | 6 | Async/Await | HIGH | `async-` | 18 | | 7 | Concurrency | HIGH | `conc-` | 4 | | 8 | Compiler Optimization | HIGH | `opt-` | 12 | | 9 | Numeric & Arithmetic Safety | HIGH | `num-` | 5 | | 10 | Type Safety | MEDIUM | `type-` | 13 | | 11 | Trait & Generics Design | MEDIUM | `trait-` | 6 | | 12 | Conversions | MEDIUM | `conv-` | 3 | | 13 | Const & Compile-Time | MEDIUM | `const-` | 4 | | 14 | Serde | MEDIUM | `serde-` | 8 | | 15 | Pattern Matching | MEDIUM | `pat-` | 5 | | 16 | Macros | MEDIUM | `macro-` | 8 | | 17 | Closures | MEDIUM | `closure-` | 5 | | 18 | Collections | MEDIUM | `coll-` | 4 | | 19 | Naming Conventions | MEDIUM | `name-` | 16 | | 20 | Testing | MEDIUM | `test-` | 15 | | 21 | Documentation | MEDIUM | `doc-` | 12 | | 22 | Observability | MEDIUM | `obs-` | 7 | | 23 | Performance Patterns | MEDIUM | `perf-` | 13 | | 24 | Project Structure | LOW | `proj-` | 14 | | 25 | Clippy & Linting | LOW | `lint-` | 13 | | 26 | Anti-patterns | REFERENCE | `anti-` | 15 |
---
265 Rust rules your AI coding agent can use to write better code. Current for Rust 1.96 (2024 edition). Works with Claude Code, Cursor, Windsurf, Copilot, Codex, Aider, Zed, Amp, Cline, and pretty much any other agent that supports skills.
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.