tech-debt-detector
Skill2 starsChanged 7 months agoMITView on GitHub
Detect and classify technical debt in AI-generated code — patterns specific to LLM outputs, shallow implementations, missing edge cases, and accumulation signals.
In this repository33 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- africa-mobile-moneySkill
- africa-ussd-developmentSkill
- eu-ai-act-complianceSkill
- eu-ai-act-content-disclosureSkill
- eu-dora-complianceSkill
- eu-nis2-complianceSkill
- eu-regulatory-routerSkill
- gdpr-data-protectionSkill
- fr-open-data-explorerSkill
- devsecops-supply-chainSkill
- contract-analysisSkill
- invoice-processingSkill
- agent-eval-frameworkSkill
- skill-lifecycle-managementSkill
- context-engineeringSkill
- find-skillsSkill
- fr-comptabiliteSkill
- fr-droit-immobilierSkill
- fr-facturation-electroniqueSkill
- fr-fec-generatorSkill
- fr-fiscalite-investissementSkill
- fr-fiscalite-particulierSkill
- fr-notariatSkill
- fr-recherche-emploiSkill
- offline-first-developmentSkill
- pii-detectionSkill
- api-resilience-patternsSkill
- skill-quality-linterSkill
- skill-security-auditSkill
- data-sovereignty-patternsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 15 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
After generating code with AI (review before merging)
- Distinctive: line 32
When refactoring AI-generated modules
- Distinctive: line 33
When investigating production issues in AI-written code
- Distinctive: line 42
No error handling beyond generic try/catch
- Distinctive: line 43
No input validation at system boundaries
- Distinctive: line 44
No null/undefined checks on external data
- Distinctive: line 45
No timeout on network calls
- Distinctive: line 89
No logging in error paths
- Distinctive: line 90
No metrics on key operations
- Distinctive: line 91
No health check endpoints
- Distinctive: line 92
No structured error codes
- Distinctive: line 134
Does not fix the debt (identifies and classifies)
- Distinctive: line 135
Does not replace SonarQube or ESLint (complements with AI-specific patterns)
- Distinctive: line 136
Does not measure test coverage (use coverage tools)
- Distinctive: line 137
Does not block PRs (advisory only)
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

