SkillAgentSearch skills...

m15-anti-pattern

Use when reviewing code for anti-patterns. Keywords: anti-pattern, common mistake, pitfall, code smell, bad practice, code review, is this an anti-pattern, better way to do this, common mistake to avoid, why is this bad, idiomatic way, beginner mistake, fighting borrow checker, clone everywhere, unw…

Install / Use

npx skills add actionbook/rust-skills --skill m15-anti-pattern

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

87/100

Supported Platforms

Universal

Our assessment of m15-anti-pattern

m15-anti-pattern scores 87/100 on our quality scale, 2176th of 4,700 Development & Engineering skills we index (top 47%).

Its SKILL.md is 4.7 KB long, well organised into 12 sections with 2 code examples: a solid amount of guidance for an agent.

With 1,479 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
26/30
Structure
18/20
Description
15/15
Adoption
13/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated about 3 months ago, so m15-anti-pattern is actively maintained.
  • Our last check on 2026-11-02 found the source still online.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-10-03. Automated pattern scan on 2026-10-03. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

m15-anti-pattern compared with similar skills

All 4 of these similar skills score higher than m15-anti-pattern; compare them before choosing.

SkillScoreStarsUpdatedFormat
m15-anti-pattern (this skill)by actionbook871.5k3mo agoSKILL.md
taste-skillby Leonxlnx100116.8k8d agoCLAUDE.md
ai-job-searchby ai-job-search-dev10072.1ktodayCLAUDE.md
claude-howtoby luongnv8910047.3k2d agoCLAUDE.md
Claude-Code-Game-Studiosby Donchitos10039.7k7d agoCLAUDE.md

Frequently asked questions

How do I install m15-anti-pattern?
Run npx skills add actionbook/rust-skills --skill m15-anti-pattern. The install tabs above show the steps for each supported agent.
Which AI agents does m15-anti-pattern work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is m15-anti-pattern safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is m15-anti-pattern still maintained?
The repository was last updated about 3 months ago, so m15-anti-pattern is actively maintained.

name: m15-anti-pattern description: "Use when reviewing code for anti-patterns. Keywords: anti-pattern, common mistake, pitfall, code smell, bad practice, code review, is this an anti-pattern, better way to do this, common mistake to avoid, why is this bad, idiomatic way, beginner mistake, fighting borrow checker, clone everywhere, unwrap in production, should I refactor, 反模式, 常见错误, 代码异味, 最佳实践, 地道写法" user-invocable: false

Anti-Patterns

Layer 2: Design Choices

Core Question

Is this pattern hiding a design problem?

When reviewing code:

  • Is this solving the symptom or the cause?
  • Is there a more idiomatic approach?
  • Does this fight or flow with Rust?

Anti-Pattern → Better Pattern

| Anti-Pattern | Why Bad | Better | |--------------|---------|--------| | .clone() everywhere | Hides ownership issues | Proper references or ownership | | .unwrap() in production | Runtime panics | ?, expect, or handling | | Rc when single owner | Unnecessary overhead | Simple ownership | | unsafe for convenience | UB risk | Find safe pattern | | OOP via Deref | Misleading API | Composition, traits | | Giant match arms | Unmaintainable | Extract to methods | | String everywhere | Allocation waste | &str, Cow<str> | | Ignoring #[must_use] | Lost errors | Handle or let _ = |


Thinking Prompt

When seeing suspicious code:

  1. Is this symptom or cause?

    • Clone to avoid borrow? → Ownership design issue
    • Unwrap "because it won't fail"? → Unhandled case
  2. What would idiomatic code look like?

    • References instead of clones
    • Iterators instead of index loops
    • Pattern matching instead of flags
  3. Does this fight Rust?

    • Fighting borrow checker → restructure
    • Excessive unsafe → find safe pattern

Trace Up ↑

To design understanding:

"Why does my code have so many clones?"
    ↑ Ask: Is the ownership model correct?
    ↑ Check: m09-domain (data flow design)
    ↑ Check: m01-ownership (reference patterns)

| Anti-Pattern | Trace To | Question | |--------------|----------|----------| | Clone everywhere | m01-ownership | Who should own this data? | | Unwrap everywhere | m06-error-handling | What's the error strategy? | | Rc everywhere | m09-domain | Is ownership clear? | | Fighting lifetimes | m09-domain | Should data structure change? |


Trace Down ↓

To implementation (Layer 1):

"Replace clone with proper ownership"
    ↓ m01-ownership: Reference patterns
    ↓ m02-resource: Smart pointer if needed

"Replace unwrap with proper handling"
    ↓ m06-error-handling: ? operator
    ↓ m06-error-handling: expect with message

Top 5 Beginner Mistakes

| Rank | Mistake | Fix | |------|---------|-----| | 1 | Clone to escape borrow checker | Use references | | 2 | Unwrap in production | Propagate with ? | | 3 | String for everything | Use &str | | 4 | Index loops | Use iterators | | 5 | Fighting lifetimes | Restructure to own data |

Code Smell → Refactoring

| Smell | Indicates | Refactoring | |-------|-----------|-------------| | Many .clone() | Ownership unclear | Clarify data flow | | Many .unwrap() | Error handling missing | Add proper handling | | Many pub fields | Encapsulation broken | Private + accessors | | Deep nesting | Complex logic | Extract methods | | Long functions | Multiple responsibilities | Split | | Giant enums | Missing abstraction | Trait + types |


Common Error Patterns

| Error | Anti-Pattern Cause | Fix | |-------|-------------------|-----| | E0382 use after move | Cloning vs ownership | Proper references | | Panic in production | Unwrap everywhere | ?, matching | | Slow performance | String for all text | &str, Cow | | Borrow checker fights | Wrong structure | Restructure | | Memory bloat | Rc/Arc everywhere | Simple ownership |


Deprecated → Better

| Deprecated | Better | |------------|--------| | Index-based loops | .iter(), .enumerate() | | collect::<Vec<_>>() then iterate | Chain iterators | | Manual unsafe cell | Cell, RefCell | | mem::transmute for casts | as or TryFrom | | Custom linked list | Vec, VecDeque | | lazy_static! | std::sync::OnceLock |


Quick Review Checklist

  • [ ] No .clone() without justification
  • [ ] No .unwrap() in library code
  • [ ] No pub fields with invariants
  • [ ] No index loops when iterator works
  • [ ] No String where &str suffices
  • [ ] No ignored #[must_use] warnings
  • [ ] No unsafe without SAFETY comment
  • [ ] No giant functions (>50 lines)

Related Skills

| When | See | |------|-----| | Ownership patterns | m01-ownership | | Error handling | m06-error-handling | | Mental models | m14-mental-model | | Performance | m10-performance |

Related Skills

View on GitHub
GitHub Stars1.5k
CategoryDevelopment
Updated2mo ago
Forks114

Languages

Shell

Trust signals

88/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 medium