·m15-anti-pattern
</>

m15-anti-pattern

zhanghandong/rust-skills

在检查反模式代码时使用。关键词:反模式、常见错误、陷阱、代码异味、不良实践、代码审查、这是一种反模式吗、更好的方法、要避免的常见错误、为什么不好、惯用方式、初学者错误、对抗借用检查器、到处克隆、在生产中展开、我应该重构、反模式、常见错误、代码异味、最佳实践、地道写法

1.0K安装·142热度·@zhanghandong

安装

$npx skills add https://github.com/zhanghandong/rust-skills --skill m15-anti-pattern

SKILL.md

| .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 | | Ignoring #[mustuse] | Lost errors | Handle or let = |

| 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? |

查看原文

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/zhanghandong/rust-skills --skill m15-anti-pattern
分类
</>开发工具
认证
收录时间
2026-02-01
更新时间
2026-02-18

快速解答

什么是 m15-anti-pattern?

在检查反模式代码时使用。关键词:反模式、常见错误、陷阱、代码异味、不良实践、代码审查、这是一种反模式吗、更好的方法、要避免的常见错误、为什么不好、惯用方式、初学者错误、对抗借用检查器、到处克隆、在生产中展开、我应该重构、反模式、常见错误、代码异味、最佳实践、地道写法 来源:zhanghandong/rust-skills。

如何安装 m15-anti-pattern?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/zhanghandong/rust-skills --skill m15-anti-pattern 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用

这个 Skill 的源码在哪?

https://github.com/zhanghandong/rust-skills