tech-debt-detector
Detect and classify technical debt in AI-generated code — patterns specific to LLM outputs, shallow implementations, missing edge cases, and accumulation signals.
- License 许可
- MIT
- 最近更新
- 2026-11-09
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- tech-debt-detector
- source
- https://github.com/BuilderCed/agent-skills
- license
- MIT
- version
- 1.0.0
- category
- eval
- language
- en
- priority
- high
- platforms
- [ "claude-code", "codex", "gemini-cli", "cursor", "copilot", "windsurf", "cline" ]
- description
- Detect and classify technical debt in AI-generated code — patterns specific to LLM outputs, shallow implementations, missing edge cases, and accumulation signals.
- imported_at
- 2026-09-20
- source_path
- skills/eval/tech-debt-detector/SKILL.md
- dependencies
- { "mcp": [], "apis": [], "data": [], "skills": [] }
- last-updated
- 2026-04-22
- model_tested
- claude-sonnet-4-6
- geo_relevance
- [ "global" ]
- update_sources
- [ { "url": "https://newsletter.pragmaticengineer.com/p/the-impact-of-ai-on-software-engineers-2026", "last_checked": "2026-04-22", "check_frequency": "quarterly" } ]
- source_repository
- BuilderCed/agent-skills
03 SKILL.md 正文
Technical Debt Detector (AI-Generated Code)
Research shows a 2500% increase in code defects linked to AI-generated code (BCG 2026). This skill identifies debt patterns specific to LLM outputs.
When to Use
- After generating code with AI (review before merging)
- During code review of AI-assisted PRs
- When refactoring AI-generated modules
- When investigating production issues in AI-written code
- Periodic tech debt audits
AI-Specific Debt Patterns
Pattern 1: Shallow Implementation
LLMs produce code that works for the happy path but fails on edges.
Signals:
- No error handling beyond generic try/catch
- No input validation at system boundaries
- No null/undefined checks on external data
- No timeout on network calls
- Functions that work for sample data but fail at scale
Check: For each function, ask: "What happens with empty input? Null? Very large input? Concurrent access? Network failure?"
Pattern 2: Over-Abstraction
LLMs love creating abstractions even when unnecessary.
Signals:
- Wrapper classes with no added logic
- Factory patterns for single implementations
- Interface with exactly one implementation
- Helper functions called only once
- Generic framework for a specific problem
Check: "Can I delete this abstraction and use the concrete implementation directly?"
Pattern 3: Stale Patterns
LLMs use patterns from training data that may be outdated.
Signals:
- Class components in React (should be hooks)
- Callbacks instead of async/await
- var instead of const/let
- jQuery patterns in modern codebase
- Deprecated API usage
Check: "Is this the current recommended pattern for this framework version?"
Pattern 4: Copy-Paste Drift
LLMs generate similar code for similar tasks without deduplication.
Signals:
- 3+ functions with >70% similar logic
- Same validation logic repeated in multiple places
- Similar error messages with slight variations
- Duplicate type definitions
Check: "Are there 3+ places doing essentially the same thing?"
Pattern 5: Missing Observability
LLMs rarely add logging, metrics, or monitoring.
Signals:
- No logging in error paths
- No metrics on key operations
- No health check endpoints
- No structured error codes
- No request tracing
Check: "If this fails in production at 3 AM, can I diagnose the problem from logs alone?"
Pattern 6: Hardcoded Configuration
LLMs often hardcode values that should be configurable.
Signals:
- URLs, ports, timeouts in code (not config)
- Magic numbers without named constants
- Environment-specific values in source
- Feature flags as if/else in code
Check: "Can I deploy this to a different environment without changing code?"
Debt Classification
| Severity | Impact | Fix Timeline |
|---|---|---|
| Critical | Security vulnerability, data loss risk | Immediately |
| High | Production failures under load or edge cases | This sprint |
| Medium | Maintainability issues, duplication | Next sprint |
| Low | Style, naming, minor abstractions | Backlog |
Output Format
TECH DEBT SCAN: {file/module}
Generated by: {AI tool if known}
Patterns found: {count}
[HIGH] Pattern 1 (Shallow): No error handling in fetchUserData() (line 42)
[MED] Pattern 4 (Copy-Paste): validateInput() duplicated in 3 controllers
[LOW] Pattern 3 (Stale): Using deprecated fetch API options (line 78)
Estimated debt: {hours to fix}
Priority: Fix HIGH items before merging.
What This Skill Does NOT Do
- Does not fix the debt (identifies and classifies)
- Does not replace SonarQube or ESLint (complements with AI-specific patterns)
- Does not measure test coverage (use coverage tools)
- Does not block PRs (advisory only)
04 同仓库更多 Skills
dei-assessment
Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.
dei-action-plan
Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.
culture-fit-assessment
Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.
cowork-to-code-bridge
Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.
counter-offer-response
Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.
continuous-feedback-system
Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.