ai-debt-detector – skill Agent & Tự động hóa cho agent AI
Dùng sau khi tạo mã, sau khi chấp nhận gợi ý AI, hoặc khi xem xét module do AI viết. Cũng dùng khi mã chạy được nhưng dễ vỡ, khi xử lý lỗi có vẻ sơ sài, khi nghi ngờ tài nguyên mồ côi hoặc thiếu dọn dẹp, hoặc khi agent báo đã xong nhưng có thể còn nợ kỹ thuật ẩn. Phát hiện các mẫu lỗi cụ thể
Cài skill ai-debt-detector bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/ai-debt-detector-a9b8f.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /ai-debt-detector – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/ai-debt-detector-a9b8f.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $ai-debt-detector – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/ai-debt-detector-a9b8f.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /ai-debt-detector – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/ai-debt-detector-a9b8f.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /ai-debt-detector – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
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) {}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.
Skill liên quan
- browser-testing-with-devtools – Kiểm thử trên trình duyệt thật qua Chrome DevTools MCP. Dùng khi xây dựng hoặc gỡ lỗi…
- a4a – Kết nối AI agent của bạn với mạng nhắn tin agent-to-agent mã hóa đầu cuối A4A qua công…
- aas-compose-stack – Lưu giữ việc chọn kỹ năng AAS rõ ràng của coding agent dưới dạng stack đã được xác thực…
- acceptance-orchestrator – Dùng khi một tác vụ lập trình cần được điều phối xuyên suốt từ tiếp nhận issue qua triển…
- agent-merge-conflict-arbiter – Bên phân xử trung lập cho xung đột merge giữa hai agent.
- ci-cd-and-automation – Tự động hóa thiết lập pipeline CI/CD. Dùng khi thiết lập hoặc chỉnh sửa pipeline build…
- accint-solve – Định tuyến một mục tiêu qua vòng lặp bộ nhớ có chấm điểm của acc qua…
- agent-decision-receipts – Tạo biên nhận chống giả mạo, có chữ ký hậu lượng tử cho một hành động agent quan trọng…