m15-anti-pattern

Identify Rust anti-patterns and suggest idiomatic alternatives during code review.

Updated Feb 12, 2026
One-click install
npx skills add https://github.com/jmduea/emotiv-cortex-rs --skill m15-anti-pattern-jmduea
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: m15-anti-pattern
Source: https://github.com/jmduea/emotiv-cortex-rs/tree/main/.github/skills/m15-anti-pattern
Command: npx skills add https://github.com/jmduea/emotiv-cortex-rs --skill m15-anti-pattern-jmduea

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps developers detect and replace common Rust anti‑patterns, preventing hidden design flaws, runtime panics, and inefficient code.

Core Features & Use Cases

  • Provides a checklist of frequent mistakes such as excessive cloning, unchecked unwraps, and misuse of smart pointers.
  • Links each anti‑pattern to related skills for deeper exploration (e.g., ownership, error handling, performance).
  • Offers concrete refactoring suggestions and a quick‑review template for code reviews or learning sessions.

Quick Start

Use the anti-pattern skill to review the file 'src/main.rs' for clone and unwrap misuse.

Frequently Asked Questions about m15-anti-pattern

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are common Rust anti-patterns I should look for during a code review?

Common Rust anti-patterns include excessive cloning, unchecked unwraps, and unsafe patterns. Identifying these frequent mistakes prevents hidden design flaws, runtime panics, and inefficient code during code reviews.

How do I refactor Rust code to replace excessive clones and unwraps?

To refactor Rust code, apply a structured checklist to pinpoint excessive clones and unchecked unwraps, then apply concrete refactoring suggestions. This provides idiomatic alternatives without executing the codebase.

Can I use a checklist to detect unsafe Rust patterns in my codebase?

Yes, you can use a quick-review checklist to detect unsafe Rust patterns in your codebase. This approach pinpoints common mistakes and offers concrete refactoring recommendations for cleaner code.

What is the best way to learn idiomatic Rust alternatives to common mistakes?

The best way to learn idiomatic Rust is to review your codebase against an anti-pattern checklist. It links common mistakes to related skills for deeper exploration into ownership, error handling, and performance.

Does this Rust anti-pattern review require executing my code?

No, this Rust anti-pattern review does not require executing your code. It analyzes the codebase statically to provide a structured checklist, traceability links, and concrete refactoring recommendations.