‹ 首页

clean-code

@wondelai · 收录于 1 周前 · 上游提交 1 周前

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 安装 校验哈希
npx oh-my-skill add wondelai/skills/clean-code
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- wondelai/skills/clean-code
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify wondelai/skills/clean-code
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
1589GitHub stars
~3.1K最小装载
~19.2K含声明引用
~19.2K文本包总量
镜像托管

怎么用

商店整理自技能原文 · 版本 326b380 · 表述以原文为准
它做什么

Claude 会帮你写出易读、好维护的代码:给变量和函数起有意义的名字,把长函数拆成小段,用异常代替错误码,并保持测试整洁。

什么时候触发

当你提到“清理代码”、“函数太长”、“代码坏味”、“命名规范”、“童子军规则”、“单一职责”或“单元测试质量”时触发。也适用于审查拉取请求的可读性、拆分混乱函数、讨论注释风格或改进错误处理模式。

装好后可以这样说
Claude 会应用命名、函数拆分等原则。
Claude 会提取子步骤并命名。
Claude 会给出评分和改进建议。

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。