Skip to main content
ClaudeWave
Slash Command440 repo starsupdated today

techdebt

The techdebt command scans Elixir/Phoenix codebases to identify technical debt issues including unreachable code, missing typespecs, oversized modules, untested code, duplicated logic, and deprecated patterns. Use this command when reviewing code quality, planning refactoring work, or establishing baseline metrics for a project's maintainability.

Install in Claude Code
Copy
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/oliver-kriska/claude-elixir-phoenix/HEAD/.claude/commands/techdebt.md -o ~/.claude/commands/techdebt.md
Then start a new Claude Code session; the slash command loads automatically.

techdebt.md

# Tech Debt Scanner

Scan the codebase for common Elixir/Phoenix tech debt patterns.

## Check for

1. **Dead code**: Unused functions, modules, aliases
   - `mix xref unreachable`
   - Grep for `# TODO`, `# FIXME`, `# HACK`
2. **Duplicated code**: Similar function bodies across modules
3. **Missing typespecs**: Public functions without `@spec`
4. **Large modules**: Files > 300 lines
5. **Missing tests**: Modules in `lib/` without corresponding `test/` files
6. **Deprecated patterns**: Old Phoenix/Ecto patterns
7. **Credo issues**: `mix credo --strict --format json`

## Output format

Priority-sorted list with file:line references and suggested fixes.