
Rust Skills
193 Rust coding rules across 14 categories.
Install
npx skills add vinhnx/VTCode --skill rust-skills -g -a claude-code -y- Repository
- vinhnx/VTCode897
- Category
- Design
- Updated
- 3d ago
- License
- MIT
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
193 Rust coding rules across 14 categories. Use when writing, reviewing, or refactoring Rust code. Covers ownership, errors, async, API design, memory, performance, testing, and anti-patterns.
Rust Best Practices
Comprehensive guide for writing high-quality, idiomatic, and highly optimized Rust code. Contains 193 rules across 14 categories, prioritized by impact to guide LLMs in code generation and refactoring. Quick reference below; the reasoning behind each rule family lives in the per-source digests under references/ (adapted from BeautifulRust, MIT).
When to Apply
Reference these guidelines when:
- Writing new Rust functions, structs, or modules
- Implementing error handling or async code
- Designing public APIs for libraries
- Reviewing code for ownership/borrowing issues
- Optimizing memory usage or reducing allocations
- Tuning performance for hot paths
- Refactoring existing Rust code
Rule Categories by Priority
| Priority | Category | Impact | Prefix | Rules |
|---|---|---|---|---|
| 1 | Ownership & Borrowing | CRITICAL | own- | 14 |
| 2 | Error Handling | CRITICAL | err- | 14 |
| 3 | Memory Optimization | CRITICAL | mem- | 15 |
| 4 | API Design | HIGH | api- | 17 |
| 5 | Async/Await | HIGH | async- | 16 |
| 6 | Compiler Optimization | HIGH | opt- | 12 |
| 7 | Naming Conventions | MEDIUM | name- | 17 |
| 8 | Type Safety | MEDIUM | type- | 11 |
| 9 | Testing | MEDIUM | test- | 15 |
| 10 | Documentation | MEDIUM | doc- | 11 |
| 11 | Performance Patterns | MEDIUM | perf- | 11 |
| 12 | Project Structure | LOW | proj- | 12 |
| 13 | Clippy & Linting | LOW | lint- | 12 |
| 14 | Anti-patterns | REFERENCE | anti- | 16 |


