rust-idioms

安装量: 44
排名: #16706

安装

npx skills add https://github.com/pproenca/dot-skills --skill rust-idioms

Comprehensive refactoring and idiomatic patterns guide for Rust applications, maintained by the Rust Community. Contains 44 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Writing new Rust code with strong type guarantees

  • Refactoring ownership and borrowing patterns

  • Designing error handling strategies

  • Creating public APIs with traits and generics

  • Organizing modules and controlling visibility

Rule Categories by Priority

| 1 | Type Safety & Newtype Patterns | CRITICAL | type-

| 2 | Ownership & Borrowing | CRITICAL | own-

| 3 | Error Handling Patterns | HIGH | err-

| 4 | API Design & Traits | HIGH | api-

| 5 | Module & Visibility | MEDIUM-HIGH | mod-

| 6 | Conversion Traits | MEDIUM | conv-

| 7 | Idiomatic Patterns | MEDIUM | idiom-

| 8 | Iterator & Collections | LOW-MEDIUM | iter-

Quick Reference

1. Type Safety & Newtype Patterns (CRITICAL)

2. Ownership & Borrowing (CRITICAL)

3. Error Handling Patterns (HIGH)

4. API Design & Traits (HIGH)

5. Module & Visibility (MEDIUM-HIGH)

6. Conversion Traits (MEDIUM)

7. Idiomatic Patterns (MEDIUM)

8. Iterator & Collections (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Full Compiled Document

For a single-file comprehensive guide, see AGENTS.md.

返回排行榜