|
| 1 | +--- |
| 2 | +name: thermo-nuclear-code-quality-review |
| 3 | +description: "极严格的可维护性审查。用户要求 thermo-nuclear review、严厉代码质量审查、深度 maintainability audit、检查抽象/大文件/复杂度/意大利面式条件分支时使用。" |
| 4 | +--- |
| 5 | + |
| 6 | +# Thermo-Nuclear Code Quality Review |
| 7 | + |
| 8 | +Use this skill for a strict maintainability review of a diff or branch. Findings come first. |
| 9 | + |
| 10 | +## Review Standard |
| 11 | + |
| 12 | +Be ambitious about simplification. Do not accept "it works" if the change makes the system harder to reason about. |
| 13 | + |
| 14 | +Check for: |
| 15 | + |
| 16 | +- A simpler structure that removes whole branches, helpers, flags, or modes. |
| 17 | +- Files pushed toward or past 1,000 lines without a strong reason. |
| 18 | +- New one-off conditionals inserted into unrelated flows. |
| 19 | +- Business logic leaking into UI, hooks, or shared plumbing. |
| 20 | +- Service-layer code depending on React lifecycle or hooks. |
| 21 | +- Hook code containing business logic instead of event-to-state mapping. |
| 22 | +- Components importing service instances directly instead of consuming hooks. |
| 23 | +- `any`, `unknown`, broad casts, or optionality that hide unclear boundaries. |
| 24 | +- Sequential orchestration where independent work should be parallel or atomic. |
| 25 | +- Thin abstractions that add indirection without reducing complexity. |
| 26 | + |
| 27 | +## Workflow |
| 28 | + |
| 29 | +1. Collect `git status --short`, `git diff --stat`, and the relevant diff. |
| 30 | +2. Read changed files enough to understand boundaries and local style. |
| 31 | +3. Review by severity, not by file order. |
| 32 | +4. Report only actionable issues grounded in file/line references. |
| 33 | +5. If there are no issues, say so and name remaining test gaps. |
| 34 | + |
| 35 | +## Guardrails |
| 36 | + |
| 37 | +- Do not nitpick formatting while structural issues exist. |
| 38 | +- Do not request broad refactors unless the diff introduced or exposed the complexity. |
| 39 | +- Do not propose new dependencies. |
| 40 | +- Do not rewrite code during review unless the user asks for fixes. |
| 41 | + |
| 42 | +## Output |
| 43 | + |
| 44 | +```text |
| 45 | +Findings |
| 46 | +- [P0/P1/P2/P3] file:line - issue, impact, recommended fix |
| 47 | +
|
| 48 | +Open questions |
| 49 | +- <only if blocking> |
| 50 | +
|
| 51 | +Test gaps / residual risk |
| 52 | +- <only if relevant> |
| 53 | +``` |
0 commit comments