1.6k hyhmrright
brooks-test Skill
借鉴十二本经典工程书籍的测试质量评审——主要参考 xUnit Test Patterns、The Art of Unit Testing、How Google Tests Software 和 Working Effectively with Legacy Code——诊断现有测试套件的结构性问题:脆弱、滥用 mock、覆盖假象、执行缓慢、可读性差。触发时机:用户询问测试质量、分享测试文件求评审,或表达沮丧,如“我一改东西测试就挂”“我们的测试跑得太慢”“测试全过但线上仍有 bug”“我们的 mock 太多了”。
安装方式:把技能目录放入 ~/.claude/skills/(Claude Code)或在 claude.ai 设置中启用;也可复制右侧安装命令一键添加。
技能指令原文(SKILL.md)
Brooks-Lint — Test Quality Review
Setup
Read in order:
../_shared/common.md— Iron Law, Project Config, Report Template, Health Score../_shared/source-coverage.md— book coverage, exceptions, tradeoffs../_shared/test-decay-risks.md— test-space symptom definitions and sourcestest-guide.md(this directory) — the test quality review framework
Process
Scope: if the user did not share test files or point to a test directory, apply Auto
Scope Detection (../_shared/common.md) first.
- Build the test suite map (guide's "Before You Start" section)
- Scan for each test decay risk in the order specified (Steps 1–4 of the guide)
- Apply the Iron Law and output using the Report Template (Step 5 of the guide)
Mode line in report: Test Quality Review