Claude 代码技能,能够对整个代码库进行详尽且有文件引用的技术债务审计
概览
这是一项Claude Code技能,能生成对整个代码库进行全面且可引用的技术债务审计——而不是一份通用的最佳实践清单。 这就是整个界面。在任何仓库里运行,拿回TECH_DEBT_AUDIT.md,里面有文件引用的发现、严重程度、工作量估计,以及实际需要修复的排序列表。 LLM生成的代码审查以可预测的方式失败:它们与通用启发式方法进行模式匹配,表面上出现明显发现却没有基于实际代码,结果却让人感觉全面,却没人采取行动。结果是一个没人会重复打开的标签页。 这项技能有主见,旨在避免这种失败模式。三种设计选择承担了大部分工作: 该协议要求模型先读取清单、映射目录结构、分析 git 流转,并写出架构的心理模型,才能形成任何判断。第一阶段不是可选的。没有上下文的发现是氛围。
概述(AI 翻译)
这是一项Claude Code技能,能生成对整个代码库进行全面且可引用的技术债务审计——而不是一份通用的最佳实践清单。
这就是整个界面。在任何仓库里运行,返回TECH_DEBT_AUDIT.md,并附带文件引用的发现、严重程度、工作量估计,以及实际需要修正的排序列表。
为什么会有这样的存在
LLM生成的代码审查以可预测的方式失败:它们与通用启发式方法进行模式匹配,表面上出现明显发现却没有基于实际代码,结果却让人感觉全面,却没人采取行动。结果是一个没人会重复打开的标签页。
这项技能有主见,旨在避免这种失败模式。三种设计选择承担了大部分工作:
在判断前强制定向。 该协议要求模型在形成任何意见之前,先读取清单、映射目录结构、分析git churn,并在形成任何意见之前写出架构的心理模型。第一阶段不是可选的。没有上下文的发现是氛围。
文件:每项发现的行引用。 没有引用的发现是不可证伪的,且不可证伪的发现不会被修正。该技能会拒绝诸如“代码总体上…
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
tech-debt-audit
A Claude Code skill that produces a thorough, citable tech debt audit of your entire codebase — not a generic best-practices checklist.
/tech-debt-audit
That’s the whole interface. Run it in any repo, get back TECH_DEBT_AUDIT.md with file-cited findings, severity, effort estimates, and a ranked list of what to actually fix.
Why this exists
LLM-generated code reviews fail in a predictable way: they pattern-match against generic heuristics, surface obvious findings without grounding them in the actual code, and produce comprehensive-feeling output that nobody acts on. The result is a tab nobody opens twice.
This skill is opinionated about avoiding that failure mode. Three design choices do most of the work:
Forced orientation before judgment. The protocol requires the model to read the manifest, map the directory structure, analyze git churn, and write a mental model of the architecture before it forms any opinions. Phase 1 isn’t optional. Findings without context are vibes.
File:line citations on every finding. A finding without a citation is unfalsifiable, and unfalsifiable findings don’t get fixed. The skill rejects vague claims like “the code generally…” and requires path/to/file.ext:LINE on every concrete finding.
A required “looks bad but is actually fine” section. This is the single biggest separator between a real audit and a checklist regurgitation. Forcing the model to surface calls it considered making and chose not to is what catches shallow analysis. If that section comes back empty, the audit didn’t look hard enough.
The skill also explicitly forbids recommending rewrites, forbids padding categories with filler, and produces a persistent artifact (TECH_DEBT_AUDIT.md) you can commit and track over time.
Why not the built-in Claude Code skills?
Claude Code ships several skills that touch this space. None of them do what a debt audit needs to do.
| Built-in | What it does | Why it’s not a debt audit |
|---|---|---|
/review |
PR-style code review of changes | Diff-scoped. Useful before merging a branch, not useful when you’ve inherited 80k LOC and want to know what’s rotten. |
/simplify |
Reduces over-engineered code in a specific area | Tactical, not architectural. Doesn’t survey, doesn’t cite, doesn’t produce an artifact. |
/debug |
Targets a specific failure or unexpected behavior | Reactive. You point it at a known problem; an audit’s job is to find the problems. |
/loop, /batch |
Workflow primitives for repeated or grouped tasks | Orchestration, not analysis. |
What this skill adds:
- Whole-repo scope across the nine dimensions that actually matter for debt: architectural decay, consistency rot, type & contract debt, test debt, dep & config debt, performance & resource hygiene, error handling & observability, security hygiene, and documentation drift.
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add ksimback/tech-debt-skill