generated/claude/skills/tech-debt/SKILL.md
Use when finding code smells, auditing TODOs, removing dead code, cleaning up unused imports, or assessing code quality. Triggers on: 'use tech-debt mode', 'tech debt', 'code smells', 'clean up', 'remove dead code', 'delete unused', 'simplify'. Full access mode - can modify files and run tests.
npx skillsauth add mcouthon/agents tech-debtInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Identify, catalog, and eliminate technical debt.
"Deletion is the most powerful refactoring."
The 40% Rule: In AI-assisted coding, expect to spend 30-40% of your time on code health—reviews, smell detection, and refactoring. Without this investment, vibe-coded bases accumulate invisible debt that slows agents and breeds bugs. Schedule regular code health passes, not just reactive fixes.
Every line of code:
Less code = less of all the above.
| Category | What to Look For |
| ---------------- | --------------------------------------------- |
| Comments | TODO, FIXME, HACK, XXX, "temporary" |
| Code Smells | Duplicated blocks, long functions (>50 lines) |
| Type Issues | Missing hints, Any types, type: ignore |
| Dead Code | Unused functions, unreachable branches |
| Dependencies | Outdated packages, unused imports |
| Complexity | Deep nesting, long parameter lists |
| Excuse | Reality | Required Action | | ----------------------------------- | --------------------------------------------------- | ------------------------------------------------- | | "Someone might need this code" | Dead code is maintenance burden | Check references — delete if unused | | "It's not hurting anything" | Unused code confuses future agents | Remove it; git preserves history | | "Refactoring is risky" | You haven't measured the impact | Count callers, assess blast radius first | | "We'll clean it up later" | Later never comes — debt compounds | Fix it now or create a tracked issue with details | | "Working code shouldn't be touched" | Untouched code rots — dependencies change around it | Assess: does it still work? Are patterns current? |
Search for debt indicators across the codebase:
For each finding, assess:
Focus on:
from typing import List, Dict, Optional when only Optional is used)except: pass with specific exception handling and logging## Tech Debt Analysis
### Summary
- **Total issues found**: X
- **Critical**: X (fix immediately)
- **Quick wins**: X (easy to fix)
- **Requires planning**: X (complex)
### Findings
#### Critical 🔴
| Location | Type | Issue | Effort |
| ------------ | -------- | ------------------------- | ------ |
| `file.py:42` | security | bare except hiding errors | Low |
#### Quick Wins 🎯
| Location | Type | Issue | Effort |
| ------------- | ------ | ----------------- | ------ |
| `utils.py:10` | unused | import never used | Low |
#### Requires Planning 📋
| Location | Type | Issue | Why Complex |
| -------- | ----------- | ------------------ | ------------------------ |
| `api.py` | duplication | 3 similar handlers | Needs abstraction design |
### Recommendations
[Suggested order of tackling debt]
### Fixed This Session
[List of debt items resolved]
Before removing code, verify it's unused:
# Check for usages
ag "function_name" --python
# Check imports
ag "from module import function_name"
Watch for code that might be used dynamically:
# ✅ Safe to delete: unused import
from typing import List # 'List' never used in file
# ✅ Safe to delete: unused variable
result = calculate() # 'result' never read
log(value) # This is the actual intent
# ✅ Safe to delete: dead branch
if False: # Will never execute
do_something()
# ⚠️ Verify first: might be used dynamically
def _helper(): # Underscore suggests private, but check usages
pass
# ❌ Don't delete without checking: exported function
def public_api(): # Might be called by external code
pass
Also watch for:
getattr, eval)- [ ] Unused imports removed
- [ ] Unused variables removed
- [ ] Dead functions removed
- [ ] Commented-out code removed
- [ ] Debug statements removed
- [ ] Duplicate code consolidated
- [ ] Tests still pass
- [ ] Types still check
Add TODOs with issue tracker links, use type hints from the start, and review for simplification opportunities.
"The best code is no code at all."
development
Systematic debugging with hypothesis-driven investigation. Use when something is broken, tests are failing, unexpected behavior occurs, or errors need investigation. Triggers on: 'this is broken', 'debug', 'why is this failing', 'unexpected error', 'not working', 'bug', 'fix this issue', 'investigate', 'tests failing', 'trace the error', 'use debug mode'. Full access mode - can run commands, add logging, and fix issues.
development
Systematic debugging with hypothesis-driven investigation. Use when something is broken, tests are failing, unexpected behavior occurs, or errors need investigation. Triggers on: 'this is broken', 'debug', 'why is this failing', 'unexpected error', 'not working', 'bug', 'fix this issue', 'investigate', 'tests failing', 'trace the error', 'use debug mode'. Full access mode - can run commands, add logging, and fix issues.
testing
Behavioral testing strategy — deciding what to test and how. Use when writing tests, reviewing test quality, or fixing tests that test mocks instead of behavior. Triggers on: 'use testing mode', 'write tests', 'test strategy', 'tests are brittle', 'tests test mocks', 'improve test quality', 'what should I test'. Full access mode - can write and run tests.
development
Use when finding code smells, auditing TODOs, removing dead code, cleaning up unused imports, or assessing code quality. Triggers on: 'use tech-debt mode', 'tech debt', 'code smells', 'clean up', 'remove dead code', 'delete unused', 'simplify'. Full access mode - can modify files and run tests.