1.6k hyhmrright

brooks-sweep Skill

全面扫描模式:对代码腐化、架构、技术债和测试质量等所有质量维度进行统一分析,并直接修复代码。安全的改动自动应用,有风险的改动先确认再执行。基于十二本经典工程书籍。触发时机:用户想"修复所有问题"、"扫描代码库"、"自动修复全部问题"、"清理整个项目",或希望用一条命令同时诊断并修复质量问题。不要触发:只想要结果不需要修复的只读审计或健康报告。

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

查看源码

技能指令原文(SKILL.md)

Brooks-Lint — Full Sweep & Auto-Fix

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 — production risk symptoms
  4. ../_shared/test-decay-risks.md — test risk symptoms
  5. sweep-guide.md (this directory) — the unified scan and fix process

Process

Scope: if the user did not specify a project or directory, apply Auto Scope Detection
(../_shared/common.md) first.

  1. Show the pre-flight consent notice and wait for one-time approval (Step 0 of the guide)
  2. Enumerate scope and initialize pipeline state (Step 1 of the guide)
  3. Run the four dimensions in sequence — review, test, debt, audit — each scanning, classifying, fixing, and verifying (Steps 2–5 of the guide)
  4. Iterate over modified files and their consumers until a clean round or the cap (Step 6 of the guide)
  5. Aggregate residual and unresolvable items and output the Full Sweep Report (Steps 7–8 of the guide)

Mode line in report: Full Sweep