AI Debt Detector
Seth HobsonCommunityCreated by Adit JainDistributed by Seth Hobson
- Skill
- Review and audit
- Software development
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
AI agents often prioritize happy-path functionality, frequently overlooking critical failure modes, resource management, and architectural consistency. The AI Debt Detector provides a systematic audit process to uncover hidden technical debt, such as swallowed errors, orphaned resources, hallucinated dependencies, and edge-case vulnerabilities that are common in AI-generated codebases.
What it does
- Identifies missing error handling and improper exception management
- Detects orphaned resources like unclosed connections or event listeners
- Verifies the existence and validity of imported dependencies
- Checks for architectural drift against established project patterns
- Highlights common AI-specific red flags like empty catch blocks or TODOs
- Evaluates code robustness against edge-case inputs
When to use it
- After generating code or accepting AI suggestions
- Before merging pull requests containing AI-generated code
- When code functions correctly but feels brittle or unstable
- Following rapid prototyping or vibe-coding sessions
- When an agent claims a task is complete without providing verification
Advantages
- Targets specific failure patterns unique to AI-generated code
- Prevents the accumulation of silent technical debt
- Ensures robust error handling and resource cleanup
- Reduces the risk of runtime failures caused by hallucinated APIs
- Promotes consistency with existing project architecture
Usage examples
- “Perform an AI debt audit on the recently generated file service module.”
- The agent will scan the module for unclosed file streams, missing error handling for disk-full scenarios, and verify that all imported library methods exist in the current project dependencies.
- “Review this AI-written React component for potential memory leaks and orphaned resources.”
- The agent will check for event listeners that lack corresponding cleanup functions and ensure that any timers or subscriptions are properly disposed of in the component lifecycle.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/wshobson/ai-debt-detector/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip ai-debt-detector.zip -d .agents/skills
Documentation by Adit Jain
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:
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)
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?
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)
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?
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) {}orcatch (e) { console.log(e) }- swallowed errorNo
finallyblock when resources were opened// TODO: handle error- AI's way of puntingImport 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.
Files
- ATTRIBUTION.mdAdded by AutoGineer990 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md3.3 KiB
SKILL.md
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:
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)
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?
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)
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?
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) {}orcatch (e) { console.log(e) }- swallowed errorNo
finallyblock when resources were opened// TODO: handle error- AI's way of puntingImport 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.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Adit Jain
- Publisher
- Seth Hobson (Community)
- Distributed by
- Seth Hobson
- Source
- wshobson/agents · plugins/skill-forge-essentials/skills/ai-debt-detector · commit 4bde316
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Adit Jain or Seth Hobson.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download ai-debt-detector.zip