Skills

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

PriorityCategoryImpactPrefixRules
1Ownership & BorrowingCRITICALown-14
2Error HandlingCRITICALerr-14
3Memory OptimizationCRITICALmem-15
4API DesignHIGHapi-17
5Async/AwaitHIGHasync-16
6Compiler OptimizationHIGHopt-12
7Naming ConventionsMEDIUMname-17
8Type SafetyMEDIUMtype-11
9TestingMEDIUMtest-15
10DocumentationMEDIUMdoc-11
11Performance PatternsMEDIUMperf-11
12Project StructureLOWproj-12
13Clippy & LintingLOWlint-12
14Anti-patternsREFERENCEanti-16

Quick Reference

1. Ownership & Borrowing (CRITICAL)

Read the whole SKILL.md on GitHub

More in Design