clean-code
Write readable, maintainable code through disciplined naming, small functions, and clean error handling. Use when the user mentions "clean up this code", "this function is too long", "code smells", "naming conventions", "boy scout rule", "single responsibility", or "unit test quality". Also trigger when reviewing a pull request for readability, untangling a messy function, debating comment styles, or improving error-handling patterns. Covers SRP, comment discipline, formatting, and unit testing. For refactoring techniques, see refactoring-patterns. For architecture and dependency rules, see clean-architecture.
适合你,如果经常需要审查或重构他人代码,追求可读性和可维护性
npx oh-my-skill add wondelai/skills/clean-codecurl -fsSL https://oh-my-skill.com/install.sh | bash -s -- wondelai/skills/clean-codenpx oh-my-skill verify wondelai/skills/clean-code怎么用
商店整理自技能原文 · 版本 326b380 · 表述以原文为准Claude 会帮你写出易读、好维护的代码:给变量和函数起有意义的名字,把长函数拆成小段,用异常代替错误码,并保持测试整洁。
当你提到“清理代码”、“函数太长”、“代码坏味”、“命名规范”、“童子军规则”、“单一职责”或“单元测试质量”时触发。也适用于审查拉取请求的可读性、拆分混乱函数、讨论注释风格或改进错误处理模式。