Skip to main content
ClaudeWave
Slash Command260 repo starsupdated 16d ago

tech-debt

The tech-debt command performs a comprehensive technical debt audit of a codebase by scanning for debt markers (TODO and FIXME comments, deprecated code, skipped tests), analyzing code complexity (large files and functions, deep nesting, duplication), evaluating dependency health (outdated packages, vulnerabilities, unused imports), assessing test coverage gaps, and identifying documentation deficiencies. Use this command to systematically inventory and prioritize technical debt across a project by impact-to-effort ratio, enabling teams to schedule remediation work strategically.

Install in Claude Code
Copy
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/borghei/Claude-Skills/HEAD/.claude/commands/tech-debt.md -o ~/.claude/commands/tech-debt.md
Then start a new Claude Code session; the slash command loads automatically.

tech-debt.md

Perform a tech debt audit:

1. **Scan for debt markers:**
   - `TODO`, `FIXME`, `HACK`, `XXX`, `WORKAROUND` comments — count and categorize
   - `@deprecated` annotations without removal timeline
   - Disabled tests (`skip`, `xit`, `@pytest.mark.skip`)
2. **Code complexity:**
   - Files over 500 lines — candidates for splitting
   - Functions over 50 lines — candidates for extraction
   - Deep nesting (> 4 levels) — candidates for early returns
   - Duplicated code blocks (similar patterns in multiple files)
3. **Dependency debt:**
   - Outdated packages (major versions behind)
   - Packages with known vulnerabilities
   - Unused dependencies (imported but never used)
   - Pinned to exact versions without update strategy
4. **Test debt:**
   - Source files with no corresponding test file
   - Test files with no assertions
   - Flaky tests (if CI history available)
5. **Documentation debt:**
   - Public APIs without documentation
   - Stale README sections
   - Missing architecture decision records
6. **Score each item** on Impact (1-5) x Effort (1-5). Priority = Impact / Effort.
7. **Output a prioritized tech debt backlog** with: item, type, location, impact, effort, priority score, and suggested approach.