agentleFS
BuilderCedBuilderCed/agent-skills/skills/eval/tech-debt-detector/SKILL.md

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.

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
  1. Distinctive:

    After generating code with AI (review before merging)

    line 30
  2. Distinctive:

    When refactoring AI-generated modules

    line 32
  3. Distinctive:

    When investigating production issues in AI-written code

    line 33
  4. Distinctive:

    No error handling beyond generic try/catch

    line 42
  5. Distinctive:

    No input validation at system boundaries

    line 43
  6. Distinctive:

    No null/undefined checks on external data

    line 44
  7. Distinctive:

    No timeout on network calls

    line 45
  8. Distinctive:

    No logging in error paths

    line 89
  9. Distinctive:

    No metrics on key operations

    line 90
  10. Distinctive:

    No health check endpoints

    line 91
  11. Distinctive:

    No structured error codes

    line 92
  12. Distinctive:

    Does not fix the debt (identifies and classifies)

    line 134
  13. Distinctive:

    Does not replace SonarQube or ESLint (complements with AI-specific patterns)

    line 135
  14. Distinctive:

    Does not measure test coverage (use coverage tools)

    line 136
  15. Distinctive:

    Does not block PRs (advisory only)

    line 137

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
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

SeverityImpactFix Timeline
CriticalSecurity vulnerability, data loss riskImmediately
HighProduction failures under load or edge casesThis sprint
MediumMaintainability issues, duplicationNext sprint
LowStyle, naming, minor abstractionsBacklog

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)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.