Skills · Data & AI

Ai Debt Detector

Unverified30/40

>- 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.

Originally by wshobson · MIT

Claude CodePartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
CursorPartialPlain prose you can paste in — but no Cursor rules file
CodexPartialPlain prose you can paste in — but no AGENTS.md
Gemini CLIPartialPlain prose you can paste in
CopilotPartialPlain prose you can paste in — but no Copilot instructions file
npx agentalley add ai-debt-detector

This command does not work yet — the CLI is still being built. Until then, use Raw in the reader below to take the file.

Who is stuck, and on what

>- 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.

The whole source

No sign-in, no blur, nothing truncated
ai-debt-detector/SKILL.md72 lines3.3 KBRawView on GitHub
Frontmatter — 2 properties
nameai-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.
1---
2name: ai-debt-detector
3description: >-
4 Use after generating code, after accepting AI suggestions, or when reviewing
5 AI-written modules. Also use when code works but feels brittle, when error
6 handling seems thin, when orphaned resources or missing cleanup are suspected,
7 or when the agent claims done but hidden debt may exist. Catches the specific
8 failure patterns AI agents produce that humans would not.
9---A5No allowed-tools declared — no way to tell what this skill may touch
10 
11# AI Debt Detector
12 
13## Overview
14 
15AI 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.
16 
17## When to Use
18 
19- After any AI code generation session (20+ lines produced)
20- Before merging AI-generated PRs
21- When code works but something feels off
22- After vibe-coding sprints where debt accumulates fastest
23- When the agent claims done without showing verification
24 
25## Process
26 
27After code generation, scan for these AI-specific debt patterns:
28 
291. **FAILURE MODES** - What happens when this fails?
30 - Network timeout? Disk full? Permission denied? Null input?
31 - Is there a try/catch? Does it catch SPECIFIC errors or swallow everything?
32 - Are resources cleaned up on failure? (streams closed, connections returned, temp files deleted)
33 
342. **ORPHANS** - What gets created but never cleaned up?
35 - Temp files, event listeners, intervals, subscriptions, connections
36 - Are there corresponding cleanup/dispose/close calls for every open/create?
37 - In React: does every addEventListener have a removeEventListener in cleanup?
38 
393. **EDGE CASES** - What inputs break this?
40 - Empty array/string? null/undefined? Multi-MB input? Unicode? Concurrent calls?
41 - Does the code assume the happy path? (AI almost always does)
42 
434. **HALLUCINATED DEPS** - Do all imports actually exist?
44 - Is every package in package.json/requirements.txt?
45 - Are API methods real? (AI invents plausible-sounding methods that don't exist)
46 - Does this library's latest version still export this function?
47 
485. **ARCHITECTURAL DRIFT** - Does this match the project's patterns?
49 - Same error handling style as existing code?
50 - Uses the project's established utilities (not reinventing)?
51 - Follows the file structure convention?
52 
53## Red Flags (stop and fix immediately)
54 
55- `catch (e) {}` or `catch (e) { console.log(e) }` - swallowed error
56- No `finally` block when resources were opened
57- `// TODO: handle error` - AI's way of punting
58- Import from a path that doesn't exist in the project
59- Timeout set but no abort/cleanup on timeout
60- Database connection opened but never released back to pool
61 
62## Common Mistakes
63 
64- Trusting that compilation means correctness (compilation checks syntax, not logic)
65- Reviewing only the diff without checking what the AI did NOT generate (missing error paths)
66- Assuming the AI used the right library version (it often uses deprecated APIs)
67- Skipping the orphan check because garbage collection handles it (it doesn't for connections, listeners, timers)
68 
69## Why This Exists
70 
71AI 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.
72 

Reviews

Installed this one?Write the first review and take the Trailblazer badge.

Reviews only open after a real install, so this is empty — and we leave it empty rather than invent one.

Alternatives

Also in Data & AI