Install any skill in seconds. Free to start, no credit card required.
Get Started Free →doccker/code-quality-principles
当编写新模块、设计接口、重构代码或代码审查时触发。提供经典模块化六原则检查清单(大小适中/调用深度/扇入扇出/边界清晰/作用域内聚/可预测性),适用于 PR/Review/新模块设计场景。
Passed 24 of 25 test cases with the skill, and 10 of 25 without it.
and 15 more in the full report
14 fixed10 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 14 test cases the skill fixed. Same model, same prompt, with and without the skill.
A Go microservice package contains a single handler.go file with 550 lines of HTTP handling code. Evaluate whether this file complies with standard Go file size boundaries.
| Checked | Without skill | With skill |
|---|---|---|
| Identifies that the Go file exceeds the maximum limit of 400 lines for Go files | Missed | Passed |
| Recommends modularizing the Go handler logic into separate files or components | Passed | Passed |
The instructions your model reads when the skill loads.
经典软件工程设计原则在 AI 协作场景下的现代化清单。 用作新模块设计、重构、代码审查时的对照表,不替代具体执行 skill。
/review、/new-feature、/optimize、/design 命令在设计阶段| # | 原则 | 一句话 | 衡量指标 | 详细案例 |
|---|---|---|---|---|
| 1 | 模块大小适中 | 单文件控制在职责边界内 | 行数/职责数 | 引用 size-check |
| 2 | 减少调用深度 | 调用链尽量 ≤ 3 层 | 栈深度 | modularity.md#调用深度 |
| 3 | 多扇入,少扇出 | 被复用 > 主动依赖 | 依赖数/被依赖数 | modularity.md#扇入扇出 |
| 4 | 接口边界清晰 | 入参/出参/异常统一 | 统一响应包装 | modularity.md#边界清晰 |
| 5 | 作用域内聚 | 改 A 不波及 B | 跨模块副作用 | 引用 refactor-safety |
| 6 | 功能可预测 | 同输入→同输出 | 幂等/无副作用/可测 | predictability.md |
主要执行交给
size-checkskill;本 skill 仅作总纲提示。
核心:单文件超限是设计信号,不是格式问题。提示职责过载,应拆分。
默认阈值:Java ≤ 300 / Go ≤ 400 / Vue ≤ 200 / TS ≤ 300 / Python ≤ 300(项目可覆盖)。
test cases passed, vs 10 / 25 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.