m15-anti-pattern Skill for Claude Code: Rust Anti-Pattern Review
Makes Claude review Rust code for common anti-patterns and suggest the idiomatic fix. One skill in the 38-skill rust-skills set.
- Installs
- 9.2K
- on skills.sh
- Stars
- 1.6K
- on GitHub
- Files
- 1
- besides SKILL.md
- Updated
- Aug 2026
- last repo commit
m15-anti-pattern makes Claude ask whether a pattern in your Rust code is hiding a design problem. It gives a table of anti-patterns with better versions, beginner mistakes, code smells with refactorings, and a quick review checklist. It sends bigger questions up to the ownership, error-handling and domain skills.
It is set to not be invoked by hand (user-invocable: false), so Claude loads it when your question matches, for example "is this an anti-pattern" or "clone everywhere". It points to sibling skills in the same repo, so install the whole set.
Good for
- Rust developers who want a code review for clone, unwrap and unsafe habits
- Rust learners who keep fighting the borrow checker
- Reviewers who want a checklist of Rust smells and their fixes
Install m15-anti-pattern
Claude Code
- 1
Copy this prompt.
Install the m15-anti-pattern skill in Claude Code. Run this command: /plugin marketplace add actionbook/rust-skills /plugin install rust-skills@rust-skills Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
The README says the plugin gives the full experience with hooks and agents, while the skills-only routes give all skills with no hook, so you call /rust-router yourself. Pick one route only. The skills CLI installs the whole repo, not only m15.
From the project README. Source.
What's in the skill
When it loads
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, 反模式, 常见错误, 代码异味, 最佳实践, 地道写法
Sections in SKILL.md
- Core Question
- Anti-Pattern → Better Pattern
- Thinking Prompt
- Trace Up ↑
- Trace Down ↓
- Top 5 Beginner Mistakes
- Code Smell → Refactoring
- Common Error Patterns
- Deprecated → Better
- Quick Review Checklist
- Related Skills
Key facts
- Installs on skills.sh
- 9,209 (Nov 2, 2026)
- Last repo commit
- Aug 23, 2026
- Files in the folder
- 2 files: SKILL.md and patterns/common-mistakes.md
What it includes
Asks whether a pattern hides a design problem, and whether it fights or flows with Rust
Symptom or cause, and is there a more idiomatic way.
Core questionA table of 8 anti-patterns, why each is bad and the better choice
Covers clone everywhere, unwrap in production, Rc with one owner, unsafe for convenience, Deref for OOP, giant match arms, String everywhere and ignored #[must_use].
Read ·
Anti-pattern to better patternThree questions for suspect code: symptom or cause, what is idiomatic, does it fight Rust
Examples: clone to dodge a borrow, unwrap "because it won't fail".
Thinking promptSends deeper questions to ownership, error-handling, domain and resource skills
Names m01-ownership, m02-resource, m06-error-handling and m09-domain in the repo.
Trace up and downTop 5 beginner mistakes, 6 code smells with refactorings, 5 common error patterns
Also 6 "deprecated to better" swaps, such as lazy_static! to OnceLock.
Beginner mistakes and smells8 checkbox items, from no unjustified clone to no function over 50 lines
Includes unsafe needing a SAFETY comment.
Quick review checklistThe folder also holds 23 numbered before-and-after Rust examples
patterns/common-mistakes.md: ownership, errors, strings, collections, concurrency, types, API design and macros.
Common mistakes file
From the official docs
Permissions
Medium risk
The skill is only advice, but the plugin that carries it adds a prompt hook, background agents and an MCP server fetched with npx. Use the skills CLI route if you want just the skills.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
The plugin hook runs on many ordinary prompts
hooks.json runs a script on every prompt that matches a long keyword list, including words like how to, why, error, API and model. The script only prints instructions that force a Rust meta-cognition routing format and a banner. It reads and writes nothing else. github.com
The MCP file starts an unpinned npx package
.mcp.json runs npx -y @actionbookdev/mcp@latest, which fetches the newest version each time. Pin it or skip the plugin if you do not want that. github.com
The README asks you to allow a Bash command
Background agents need permission to run agent-browser. The README suggests adding Bash(agent-browser *) to your allow list. That lets any agent-browser command run without a prompt. github.com
It adds agents, commands and cache files
The plugin folder has 11 agent files, 21 command files and shell scripts under scripts/. Open the ones you plan to use before you install. github.com
Counts and versions in the repo disagree
plugin.json lists 38 skills at version 2.1.0, while the README says 31 skills and shows version 2.0.9. Trust the manifest for what installs. github.com
Technical details
| Talks to | npm registry (npx @actionbookdev/mcp@latest). Websites the agents fetch through actionbook or agent-browser |
|---|---|
| Sign-in and keys | None for the skill. |
| Scopes |
|
Questions
What does m15-anti-pattern do?
It helps Claude review Rust code for habits that hide design problems, such as cloning to escape the borrow checker or unwrapping in production. It names the better pattern and where to look next.
How do I use it?
You do not call it. It is set user-invocable: false, so Claude loads it from its description when you ask things like "is this an anti-pattern" or "why is this bad". Ask a Rust review question.
How do I install it?
Use the install box above. It points to siblings such as m01-ownership and m06-error-handling, so install the whole rust-skills set with the plugin or the skills CLI.
What does the plugin add besides skills?
The Claude Code plugin also installs a prompt hook, 11 agents, 21 commands and a .mcp.json that starts an actionbook MCP server with npx. See the safety box before you take it.
Is it for Rust only?
Yes. Everything in the skill is about Rust: ownership, Rc, unsafe, Deref, iterators and must_use.
Does it work in Codex or the Claude app?
The repo has a Codex guide that copies an AGENTS.md file, not this skill. No Claude app route is documented, and the plugin and hook need Claude Code.
Is it safe?
The skill bundles one reference file and no scripts. The plugin around it adds a hook on many prompts, background agents and an npx MCP server, and the README suggests allowing a Bash command. Read the safety box.
Information
updated Nov 2, 2026
- Repository
- actionbook/rust-skills
- Folder
skills/m15-anti-pattern
Sources
Docs, issue trackers and discussions this page is built from.
Show all 8Hide
- rust-skills README · github.com
- rust-skills plugin.json · github.com
- rust-skills Codex install · github.com
- m15-anti-pattern SKILL.md · github.com
- common-mistakes.md · github.com
- rust-skills hooks.json · github.com
- rust-skill-eval-hook.sh · github.com
- rust-skills .mcp.json · github.com