rust-patterns

Solid

Analyze Rust codebase for design patterns, idioms, and anti-patterns. Provides detection, suggestion, and evaluation modes for Rust code quality. Keywords: rust, patterns, analysis, idioms, anti-patterns, code-quality

Code & Development 91 stars 6 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 83/100

Stars 20%
65
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# rust-patterns Skill Comprehensive Rust pattern analysis tool for detecting, suggesting, and evaluating design patterns in Rust codebases. ## Overview This skill provides three complementary modes for Rust pattern analysis: 1. **Detection Mode**: Scan codebase to identify existing patterns and anti-patterns 2. **Suggestion Mode**: Recommend patterns to address code smells and improve design 3. **Evaluation Mode**: Score pattern implementation quality against best practices **Complementary to**: `@RUST_PATTERNS.md` (always-active rules) - this skill provides optional deep analysis. ## Invocation ```bash # Detection - scan codebase for patterns /rust-patterns detect [path] # Suggestion - recommend patterns for code smells /rust-patterns suggest [path] # Evaluation - score pattern implementation quality /rust-patterns evaluate [path] [--pattern=<name>] # Help /rust-patterns --help ``` ## Mode 1: Detection **Purpose**: Identify patterns and anti-patterns currently in the codebase. **Workflow**: ``` 1. Scan → Glob for *.rs files in target path 2. Search → Grep for pattern signatures (ownership, newtype, builder, etc.) 3. Detect Anti-patterns → Grep for .clone(), .unwrap(), Arc<Mutex>, blocking ops 4. Classify → Categorize as idiom/pattern/anti-pattern 5. Score Confidence → 0.0-1.0 based on signature strength 6. Report → JSON output with file locations and recommendations ``` **Example**: ```bash /rust-patterns detect src/ ``` **Output Format**: ```json { "scan_su...

Details

Author
FlorianBruniaux
Repository
FlorianBruniaux/ccboard
Created
6 months ago
Last Updated
1 weeks ago
Language
Rust
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category