tech-debt-audit
БесплатноБез исполняемых скриптовНе проверенThorough, file-cited technical debt audit across 9 dimensions using AST-grep (tree-sitter), grep, LSP, and language-native tooling. Produces…
от code-yeongyu★ 71 250 звёзд на GitHubОб этом скилле
Tech Debt Audit Protocol
Model-agnostic technical debt audit for oh-my-openagent (OMO). Uses OMO's built-in tools (grep, glob, bash with sg, read, lsp_diagnostics, task). Produces a grounded, citable TECH_DEBT_AUDIT.md artifact.
Output
Write results to TECH_DEBT_AUDIT.md in the repo root with:
- Executive Summary — 3-5 sentences: overall health, worst dimension, quick wins count
- Mental Model — the repo's architecture in 1 paragraph (what it does, stack, module boundaries)
- Findings Table — columns: ID, Category, File:Line, Severity (Critical/High/Medium/Low), Effort (Hours), Description, Recommendation
- Top 5 Priorities — ranked by impact/effort ratio
- Quick Wins Checklist — items under 30 minutes each
- "Looks Bad But Is Fine" — patterns that look like debt but are intentional
- Open Questions — things the maintainer should clarify
Phase 0: Orient
Standard (always run)
glob("**/*.ts")/glob("**/*.py")/ etc — map the language stackglob("**/package.json")+read()— dependencies and build toolingbash("git log --oneline -200")— churn: find highest-change filesglob("**/*")+ basic math — find largest files (>300 LOC are candidates)- Cross-reference high-churn + large = debt hot zones
- Write the mental model paragraph in your own working context
Phase 1: Audit Across 9 Dimensions
Use OMO tools for each dimension. Run parallel tool calls within each dimension. Every finding MUST cite file:line:col.
1. Architectural Decay
Standard (always run)
bash("sg -p \"import { $$$ } from '$SRC'\" -l ts .")— map module graph, look for circular patternsbash("sg -p \"class $NAME { $$$ }\" -l ts .")— check for god classesgrep("TODO|FIXME|HACK|XXX|WORKAROUND|TEMP")— tagged debt markersgrep("async|await")on sync-looking files — misplaced async boundariesbash("wc -l <file>")on each large file found in Phase 0
What to flag
- Files > 500 LOC (god files)
- Functions > 80 LOC or > 4 nesting levels
- Classes with > 15 methods or > 400 LOC
- Import cycles (A → B → A)
- Dead exports: function/class defined but never imported elsewhere (confirm with
lsp_find_references) - Commented-out code blocks (>3 consecutive consecutive lines)
2. Consistency Rot
Standard (always run)
bash("sg -p \"import $CLIENT from '$PKG'\" -l ts .")— multiple HTTP clientsgrep("console.log|console.error|console.warn")— direct console use vs loggerbash("sg -p \"try { $$$ } catch ($$$) { $$$ }\" -l ts .")— error handling patternsgrep("as any|@ts-ignore|@ts-expect-error|as unknown")— type escapesgrep("eslint-disable|prettier-ignore")— lint suppressions
What to flag
- 3+ ways of doing the same thing (HTTP, logging, validation, config)
- Mixed naming conventions (camelCase + snake_case + PascalCase)
- Multiple date/time handling libraries
- Mixed error response shapes across modules
3. Type & Contract Debt
Standard (always run)
bash("sg -p \"$VALUE as any\" -l ts .")— runtime type escapesgrep("@ts-expect-error")— suppressed errorsgrep("@ts-ignore")— suppressed errors (legacy)bash("sg -p \"$NAME: any\" -l ts .")— typed as anylsp_diagnostics(filePath="<src-dir>")— current type errors
What to flag
anytypes on public APIs and exported interfaces- Untyped function parameters
- Missing schema validation at API/IO boundaries
- LSP type errors grouped by file
4. Test Debt
Standard (always run)
glob("**/*.test.ts")— find all test filesbash("bun test 2>&1 | grep -E '(fail|skip|todo)'")— current test health- Cross-reference Phase 0 high-churn files with test existence
What to flag
- Critical-path files with zero tests
- Skipped tests (
test.skip,describe.skip) - Tests asserting implementation details vs behavior
- Slow tests (>1s each)
5. Dependency & Config Debt
Standard (always run)
bash("npm audit --omit=dev 2>&1 | head -40")— known CVEs (if node_modules present)read("package.json")— check dependency count and stale depsgrep(".env|process.env|Bun.env")— env var usagegrep("API_KEY|SECRET|PASSWORD|TOKEN")in non-config files — hardcoded config
What to flag
- Outdated major-version deps
- Dependencies that do the same thing (duplicate libraries)
- Referenced env vars not documented in README
- Hardcoded environment-specific values
6. Performance & Resource Hygiene
Standard (always run)
bash("sg -p \"for ($$$ of $$$) { $$$ await $$$ }\" -l ts .")— async-in-loopgrep("await.*map|await.*filter|await.*forEach")— sequential async iterationgrep("Promise\\.all|Promise\\.allSettled")— existing parallel patterns (good signal)grep("addEventListener|on\\(|subscribe")withoutremoveEventListener|off\\(|unsubscribenearby — listener hygiene
What to flag
awaitinsidefor/ofloops (sequential when parallel possible)- N+1
Установить tech-debt-audit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл tech-debt-audit?
Thorough, file-cited technical debt audit across 9 dimensions using AST-grep (tree-sitter), grep, LSP, and language-native tooling. Produces TECH_DEBT_AUDIT.md with severity, effort estimates, and prioritized fixes. Use when asked for codebase health check, tech debt audit, architecture review, code quality assessment, or cleanup planning. Triggers: 'tech debt', 'technical debt', 'debt audit', 'code health', 'technical debt audit', 'codebase health check', 'find tech debt', 'debt analysis', 'audit code quality'.
Как установить скилл tech-debt-audit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tech-debt-audit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic