ai-debt-detector — скилл для Claude Code: установка
Скилл проверяет код после генерации ИИ и ищет скрытые ошибки: пропущенную обработку сбоев, утечки ресурсов, лишние зависимости и архитектурный дрейф.
/plugin marketplace add wshobson/agents
/plugin install skill-forge-essentials@claude-code-workflowsЧто делает ai-debt-detector
ai-debt-detector запускают после генерации кода, принятия подсказок ИИ или ревью модуля. Он проверяет, что произойдёт при сетевом тайм-ауте, нехватке места на диске, отказе в доступе и пустом вводе. Отдельно ищет ошибки очистки: незакрытые потоки, соединения, временные файлы, слушатели событий и таймеры.
Скилл также сверяет импорты и пакеты с проектом, проверяет существование API и смотрит, совпадает ли код с принятой структурой. Среди явных сигналов риска есть пустой catch, отсутствие finally после открытия ресурса, комментарий TODO: handle error и тайм-аут без отмены. Он нужен для точечного аудита AI-кода перед слиянием; для небольших ручных правок без новых ресурсов проверка может оказаться лишней.
Какие задачи решает
- проверить пути отказа после генерации кода
- найти незакрытые соединения и временные файлы
- обнаружить выдуманные пакеты и методы API
- сверить код с архитектурными правилами проекта
- проверить очистку слушателей и таймеров
Примеры запросов агенту
- Проверь этот модуль после генерации и перечисли все возможные пути отказа.
- Найди ресурсы, которые создаются в этом коде, но не закрываются при ошибке.
- Проверь импорты, зависимости и соответствие кода структуре проекта.
Как установить ai-debt-detector
1Через маркетплейс плагинов
/plugin marketplace add wshobson/agents/plugin install skill-forge-essentials@claude-code-workflowsКоманда ставит плагин skill-forge-essentials целиком, со всеми его скиллами
2Через Skills CLI (Vercel)
npx skills add wshobson/agents --skill ai-debt-detector -a claude-code3Вручную: положить файлы
~/.claude/skills/ai-debt-detector/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/ai-debt-detector/
1Через Skills CLI (Vercel)
npx skills add wshobson/agents --skill ai-debt-detector -a codex2Вручную: положить файлы
.agents/skills/ai-debt-detector/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add wshobson/agents --skill ai-debt-detector -a cursor2Вручную: положить файлы
.cursor/skills/ai-debt-detector/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install wshobson/agents ai-debt-detector2Вручную: положить файлы
.github/skills/ai-debt-detector/SKILL.mdКомандой платформы
gemini skills install https://github.com/wshobson/agents --path plugins/skill-forge-essentials/skills/ai-debt-detectorВручную: положить файлы
.devin/skills/ai-debt-detector/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Из того же набора213
Весь набор →Похожие
Вопросы о ai-debt-detector
Как установить ai-debt-detector в Claude Code?
Выполните npx skills add wshobson/agents --skill ai-debt-detector -a claude-code. Файл скилла появится по пути ~/.claude/skills/ai-debt-detector/SKILL.md.
Что делает ai-debt-detector?
Скилл проводит целевой аудит AI-кода: ищет пропущенную обработку ошибок, незакрытые ресурсы, крайние случаи, выдуманные зависимости и отклонения от архитектуры проекта.
С какими платформами работает ai-debt-detector?
Скилл предназначен для Claude Code, Codex и Cursor. Для каждой платформы используется своя команда установки.
Исходный текст
SKILL.md · MIT
---
name: ai-debt-detector
description: >-
Use after generating code, after accepting AI suggestions, or when reviewing
AI-written modules. Also use when code works but feels brittle, when error
handling seems thin, when orphaned resources or missing cleanup are suspected,
or when the agent claims done but hidden debt may exist. Catches the specific
failure patterns AI agents produce that humans would not.
---
# AI Debt Detector
## Overview
AI agents generate code that passes the happy path but hides debt: missing error handling, orphaned resources, ignored failure modes, hallucinated packages, silent architectural drift. This skill forces a targeted audit for the exact patterns AI agents get wrong.
## When to Use
- After any AI code generation session (20+ lines produced)
- Before merging AI-generated PRs
- When code works but something feels off
- After vibe-coding sprints where debt accumulates fastest
- When the agent claims done without showing verification
## Process
After code generation, scan for these AI-specific debt patterns:
1. **FAILURE MODES** - What happens when this fails?
- Network timeout? Disk full? Permission denied? Null input?
- Is there a try/catch? Does it catch SPECIFIC errors or swallow everything?
- Are resources cleaned up on failure? (streams closed, connections returned, temp files deleted)
2. **ORPHANS** - What gets created but never cleaned up?
- Temp files, event listeners, intervals, subscriptions, connections
- Are there corresponding cleanup/dispose/close calls for every open/create?
- In React: does every addEventListener have a removeEventListener in cleanup?
3. **EDGE CASES** - What inputs break this?
- Empty array/string? null/undefined? Multi-MB input? Unicode? Concurrent calls?
- Does the code assume the happy path? (AI almost always does)
4. **HALLUCINATED DEPS** - Do all imports actually exist?
- Is every package in package.json/requirements.txt?
- Are API methods real? (AI invents plausible-sounding methods that don't exist)
- Does this library's latest version still export this function?
5. **ARCHITECTURAL DRIFT** - Does this match the project's patterns?
- Same error handling style as existing code?
- Uses the project's established utilities (not reinventing)?
- Follows the file structure convention?
## Red Flags (stop and fix immediately)
- `catch (e) {}` or `catch (e) { console.log(e) }` - swallowed error
- No `finally` block when resources were opened
- `// TODO: handle error` - AI's way of punting
- Import from a path that doesn't exist in the project
- Timeout set but no abort/cleanup on timeout
- Database connection opened but never released back to pool
## Common Mistakes
- Trusting that compilation means correctness (compilation checks syntax, not logic)
- Reviewing only the diff without checking what the AI did NOT generate (missing error paths)
- Assuming the AI used the right library version (it often uses deprecated APIs)
- Skipping the orphan check because garbage collection handles it (it doesn't for connections, listeners, timers)
## Why This Exists
AI agents systematically optimize for "looks correct" and "passes the happy path." They miss failure modes, orphan resources, and hallucinate dependencies at rates significantly higher than manual code. This skill forces an audit for those specific blind spots.
© Adit Jain · MIT · wshobson/agents