Skip to main content
skill CX Codex

m15-anti-pattern — Claude Code skill for Rust review

Reviews Rust code for anti-patterns and points to idiomatic replacements. Use it during code review or when ownership and error handling become hard to reason about.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add actionbook/rust-skills --skill m15-anti-pattern -a claude-code
Open on GitHub

What m15-anti-pattern does

m15-anti-pattern flags common Rust issues such as unnecessary .clone() calls, .unwrap() in production code, unnecessary Rc, convenience-driven unsafe, and String where &str fits. It also checks for index loops, ignored #[must_use] results, long functions, and overly public fields.

The skill connects a visible smell to its likely cause. Repeated cloning can signal an unclear ownership model, while lifetime struggles can call for a different data structure. It points to related skills including m01-ownership, m06-error-handling, and m09-domain. You cannot run it as a slash command because user-invocable is disabled.

What it helps with

  • find unnecessary .clone() calls in Rust code
  • replace .unwrap() with error handling
  • trace borrow checker friction to a design issue
  • turn index loops into iterator-based code
  • review unsafe for a safe alternative

Example prompts for the agent

  • Review this Rust module for anti-patterns and explain each issue.
  • Why does this code use so many .clone() calls? Check the ownership model.
  • Is this .unwrap() appropriate for production code?

How to install m15-anti-pattern

1Skills CLI (Vercel)

npx skills add actionbook/rust-skills --skill m15-anti-pattern -a claude-code

2Manually: put the files in place

~/.claude/skills/m15-anti-pattern/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/m15-anti-pattern/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about m15-anti-pattern

How do I install m15-anti-pattern in Claude Code?

Run npx skills add actionbook/rust-skills --skill m15-anti-pattern -a claude-code, then run npx skills add actionbook/rust-skills --skill m15-anti-pattern -a claude-code again. The skill file is at ~/.claude/skills/m15-anti-pattern/SKILL.md.

What does m15-anti-pattern do?

It reviews Rust code for recurring anti-patterns including excess cloning, .unwrap() usage, unclear ownership, and questionable unsafe. It suggests directions for more idiomatic code.

Can I invoke m15-anti-pattern with a slash command?

No. Manual invocation is disabled, so it is intended to be used when reviewing code through relevant requests about Rust mistakes and code smells.

Similar skills

All skills for Code review and refactoring →

From the same set35

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor