m15-anti-pattern

Identify and replace Rust anti-patterns during code reviews.

1|2|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/dojoengine/torii-core --skill m15-anti-pattern-dojoengine
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: m15-anti-pattern
Source: https://github.com/dojoengine/torii-core/tree/main/.agents/skills/m15-anti-pattern
Command: npx skills add https://github.com/dojoengine/torii-core --skill m15-anti-pattern-dojoengine

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rust codebases often suffer from subtle anti-patterns that reduce safety, clarity, and maintainability. This skill helps identify and address common Rust anti-patterns such as unnecessary clones, unwraps in production, oversized generics, and ownership pitfalls to promote idiomatic, robust code.

Core Features & Use Cases

  • Detection of common Rust anti-patterns across code reviews and educational contexts
  • Guidance on idiomatic replacements and safer alternatives
  • Use case: during code reviews to propose concrete refactors and improvements

Quick Start

Explain anti-patterns in a review and propose idiomatic replacements.

Frequently Asked Questions about m15-anti-pattern

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

FAQPage Schema
How do I identify and fix common Rust anti-patterns in my codebase?

Identify Rust anti-patterns by reviewing code for unnecessary clones, unwrap in production, and oversized generics, then replace them with idiomatic alternatives to improve safety and maintainability.

What are the most common Rust ownership pitfalls to look for during a code review?

Common Rust ownership pitfalls include unnecessary clones and over-broad generics that reduce clarity; code reviews should detect these ownership issues and propose concrete refactors for safer, idiomatic code.

Why is using unwrap in production Rust code considered an anti-pattern?

Using unwrap in production Rust code is an anti-pattern because it risks runtime panics; replacing unwraps with proper error-handling mechanisms promotes robust and safer code execution.

What is the best way to refactor Rust code to improve safety and readability?

The best way to refactor Rust code for safety and readability is to apply a structured taxonomy of anti-patterns and checklists to detect issues and guide idiomatic replacements during code reviews.

Can I use a structured checklist to detect Rust anti-patterns across different projects?

Yes, you can use a structured taxonomy of anti-patterns, thinking prompts, and checklists to detect issues like unnecessary clones and ownership pitfalls consistently across various Rust projects.

When should I avoid over-broad generics in Rust programming?

You should avoid over-broad generics in Rust programming when they reduce code clarity and maintainability, replacing them with more specific types to ensure idiomatic and robust implementations.