>- 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.
849 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
38452
stars on the repo
on the repository, not the skill itself
Install
one command, takes just this skill from the repository
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:
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)
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.
How to use it
Copy the folder
Take wshobson/ai-debt-detector from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
Check the name does not clash
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.