1.6k hyhmrright
brooks-audit Skill
架构审计:梳理模块依赖、检查分层完整性、标记代码库中的结构性腐化,基于十二本经典工程书籍。触发时机:用户要求审计架构、审查目录/模块结构、检查循环引用、了解代码库的组织方式,或问"这符合整洁架构吗?"、"为什么所有东西都互相依赖?"。新成员入职类请求("给新人讲解这个代码库"或"带我逛一遍代码库")也会触发(使用 onboarding 模式)。不要触发:PR 级代码审查(用 brooks-)。
安装方式:把技能目录放入 ~/.claude/skills/(Claude Code)或在 claude.ai 设置中启用;也可复制右侧安装命令一键添加。
技能指令原文(SKILL.md)
Brooks-Lint — Architecture Audit
Setup
Read in order:
../_shared/common.md— Iron Law, Project Config, Report Template, Health Score../_shared/source-coverage.md— book coverage, exceptions, tradeoffs../_shared/decay-risks.md— symptom definitions and source attributionsarchitecture-guide.md(this directory) — the audit framework
Process
Onboarding mode: If the user asks for an onboarding report, codebase tour, or
"explain this codebase to a new developer", read onboarding-guide.md from this
directory and follow it instead of architecture-guide.md. This mode explains rather
than diagnoses — no Health Score, no Iron Law findings.
Scope: if the user did not specify files or a directory, apply Auto Scope Detection
(../_shared/common.md) first.
- Gather codebase context and draw the module dependency graph as Mermaid (Steps 0–1 of the guide)
- Scan for each decay risk in the order specified (Steps 2–4 of the guide)
- Run the Testability Seam Assessment (Step 5 of the guide)
- Run the Conway's Law check (Step 6 of the guide)
- Assign node colors after all findings, then output using the Report Template from common.md — Mermaid graph FIRST, then Findings
Mode line in report: Architecture Audit