ai-debt-detector
하는 일
이 AI '부채' 탐지기는 AI가 만든 코드에서 사람이 보통 피하는 흔한 문제를 검사합니다. 실패 처리, 정리되지 않은 자원, 존재하지 않는 의존성, 프로젝트 기준에서 벗어난 부분을 찾습니다.
사용하는 경우
- ✓AI가 코드를 생성한 후.
- ✓AI의 제안을 받아들이거나 AI 코드를 병합하기 전에.
- ✓코드는 작동하지만 불안정하거나 불완전하게 느껴질 때.
스킬 링크
https://github.com/wshobson/agents/blob/main/plugins/skill-forge-essentials/skills/ai-debt-detector/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“AI가 만든 이 코드에서 실패 처리, 남은 자원, 존재하지 않는 의존성을 검사해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI가 자주 잘못하는 특정 패턴을 분석합니다. 예를 들어 오류 처리 누락, 해제되지 않는 자원, 존재하지 않는 패키지 등입니다. 목표는 코드가 견고하고 안전하도록 하는 것입니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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 error- No
finallyblock 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.
자주 묻는 질문
왜 AI 코드를 검사해야 하나요?
AI는 이상적인 조건에서 작동하는 코드를 잘 만들지만, 오류 처리, 자원 해제, 올바른 패키지 사용을 잊어서 나중에 문제가 될 '부채'를 만들 수 있습니다.
'고아 자원'이란 무엇인가요?
코드가 만들었지만 사용 후에 닫거나 삭제하지 않은 것입니다. 예를 들어 네트워크 연결이나 임시 파일이 있으며, 시스템 자원을 계속 차지할 수 있습니다.
'실패 모드'란 무엇인가요?
코드가 실패할 수 있는 상황(네트워크 오류, 잘못된 입력 등)과 그에 대한 반응 방식입니다. 좋은 코드는 이런 상황을 처리할 계획을 가지고 있습니다.
상세 정보
작성자의 원본 설명
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.
repo: wshobson/agents
인기도
- GitHub 스타
- 41k
- 순위
- #6788
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
screen-reader-testing
41k에이전트가 스크린 리더로 웹사이트를 테스트해 접근성을 확인하도록 돕습니다.
wcag-audit-patterns
41k에이전트가 WCAG 지침에 따라 웹사이트의 접근성을 감사하고 문제를 고치도록 돕습니다.
multi-reviewer-patterns
41k에이전트가 병렬 코드 리뷰를 조율하고, 중복된 발견 사항을 정리하며, 보고서를 통합하도록 돕습니다.
parallel-debugging
41k에이전트가 병렬 조사와 근본 원인 분석으로 복잡한 문제를 디버그하도록 돕습니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.