1.6k hyhmrright

brooks-review Skill

PR 代码审查,揭示腐化风险、设计坏味道和可维护性问题,给出具体的"症状 → 根源 → 后果 → 修复"结论,基于十二本经典工程书籍。触发时机:用户要求审查代码、检查 PR、分享 diff 或贴出代码问"这样写对吗?"、"有什么问题吗?"、"可以合并吗?",或希望对某个函数、类或文件获得反馈。用户提到代码坏味道、重构、整洁架构、DDD、SOLID 原则、Hyrum 定律、深层模块、战术编程、概念完整性、Brooks 定律等时也会触发。

安装方式:把技能目录放入 ~/.claude/skills/(Claude Code)或在 claude.ai 设置中启用;也可复制右侧安装命令一键添加。

查看源码

技能指令原文(SKILL.md)

Brooks-Lint — PR Review

Setup

Read in order:

  1. ../_shared/common.md — Iron Law, Project Config, Report Template, Health Score
  2. ../_shared/source-coverage.md — book coverage, exceptions, tradeoffs
  3. ../_shared/decay-risks.md — symptom definitions and source attributions
  4. ../_shared/test-decay-risks.md — test risk definitions for the Quick Test Check
  5. pr-review-guide.md (this directory) — the analysis process

Process

Scope: if the user did not specify files or paste code, apply Auto Scope Detection
(../_shared/common.md) first.

  1. Understand the review scope, then scan for each decay risk in the order specified (Steps 1–6 of the guide)
  2. Run the Quick Test Check (Step 7 of the guide) — skip for docs-only or non-production changes
  3. Apply the Iron Law to every finding
  4. Output using the Report Template from common.md

Mode line in report: PR Review