
M15 anti pattern
Reviews Rust code for common anti-patterns and suggests more idiomatic alternatives
M15 anti pattern is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 21
- Last commit
- License
- MIT
- Listing updated
Similar skills
About M15 anti pattern
This skill guides an agent through reviewing Rust code for design-level anti-patterns, such as cloning to escape the borrow checker, unwrapping in production paths, reaching for Rc or Arc when ownership is single, and using String where a borrowed string would do. For each suspicious pattern it asks whether the code treats a symptom or a root cause, and whether a restructured ownership or error-handling approach would fit better.
The skill is built around reference tables that map each anti-pattern to its underlying cause, a better pattern, and related skills in the same collection for deeper study. It includes a short checklist for quick reviews, a list of smells with refactoring suggestions, and common compiler error patterns linked to their likely causes.
It is written for Rust code and assumes the agent can read the source under review. It contains no scripts; the agent works from the instructions and its own reading of the code.
When your agent uses it
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, 反模式, 常见错误, 代码异味, 最佳实践, 地道写法
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (13 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
Copy the skill folder to ~/.claude/skills/m15-anti-pattern to use it in all your projects:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/m15-anti-pattern &&
cp -R "$tmp/.claude/skills/m15-anti-pattern" ~/.claude/skills/m15-anti-pattern &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/m15-anti-pattern inside it instead.
Copy the skill folder to ~/.agents/skills/m15-anti-pattern to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/m15-anti-pattern &&
cp -R "$tmp/.claude/skills/m15-anti-pattern" ~/.agents/skills/m15-anti-pattern &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/m15-anti-pattern inside it instead.
Copy the skill folder to ~/.cursor/skills/m15-anti-pattern to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/m15-anti-pattern &&
cp -R "$tmp/.claude/skills/m15-anti-pattern" ~/.cursor/skills/m15-anti-pattern &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/m15-anti-pattern inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/k1-c/linear-tui.git --path .claude/skills/m15-anti-patternOr copy the folder to ~/.gemini/skills/m15-anti-pattern yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/m15-anti-pattern:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/m15-anti-pattern &&
cp -R "$tmp/.claude/skills/m15-anti-pattern" ~/.copilot/skills/m15-anti-pattern &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/m15-anti-pattern inside it instead.
Get the folder:
git clone --depth 1 https://github.com/k1-c/linear-tui.gitThen copy linear-tui/.claude/skills/m15-anti-pattern into your agent's skills folder as m15-anti-pattern. Agents that support SKILL.md read one folder per skill.
What it does
- Anti-pattern lookup table
- Maps common Rust mistakes such as excessive cloning or unwrap use to their reasons and better alternatives.
- Symptom versus cause prompts
- Guides the agent to ask whether a suspicious pattern hides an ownership or design problem.
- Code smell refactoring map
- Links smells like many pub fields or giant enums to specific refactoring steps.
- Beginner mistake ranking
- Lists the five most frequent Rust beginner errors with direct fixes.
- Review checklist
- Provides a short checklist covering clones, unwraps, unsafe blocks and oversized functions.
- Deprecated pattern replacements
- Suggests modern std alternatives such as OnceLock in place of lazy_static.
Good for
- Review my Rust pull request for common anti-patterns
- Why is cloning everywhere in this code considered a problem?
- Suggest a more idiomatic way to handle this unwrap in production code
- Check whether this struct exposes too many pub fields
- Help me stop fighting the borrow checker in this function
M15 anti pattern FAQ
What does M15 anti pattern need to run?
It is a plain instruction file with no scripts. It is meant for reviewing Rust code, so the agent needs access to the source it is reviewing.
When does M15 anti pattern trigger?
It triggers when the agent is asked to review code for anti-patterns, common mistakes, code smells, or whether a refactor is worthwhile, including related keywords in English and Chinese.
Does M15 anti pattern change any files?
The skill only gives the agent review guidance. It does not declare any tools or file changes.
How do I install M15 anti pattern in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/m15-anti-pattern to use it in all your projects, or to .claude/skills/m15-anti-pattern in one project.
Does M15 anti pattern run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use M15 anti pattern?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to M15 anti pattern?
The closest alternatives to M15 anti pattern are M01 ownership, Patterns, Coding guidelines, M14 mental model and M11 ecosystem.
Where this comes from
- Description: from the skill's own SKILL.md.
More from k1-c/linear-tui

Gives the agent a quick reference of Rust-specific naming, error handling and async rules
- Open source
- 21 GitHub stars
- Developer tools

Guides the agent to write Conventional Commits, splitting mixed changes into several
- Open source
- 21 GitHub stars
- Developer tools

Guides an agent through building Rust command-line tools with clap, config layers
- Open source
- 21 GitHub stars
- Developer tools

Guides the agent through Rust ownership, borrow and lifetime compiler errors
- Open source
- 21 GitHub stars
- Developer tools

Guides an agent in choosing Rust smart pointers like Box, Rc, Arc, Weak and RefCell
- Open source
- 21 GitHub stars
- Developer tools

Guides a Rust agent through E0596/E0499/E0502 borrow errors and interior mutability
- Open source
- 21 GitHub stars
- Developer tools


