Skip to content
Development
Skill

/techdebt

Analyze Elixir/Phoenix technical debt — duplicates, refactoring opportunities, credo issues. Use when asked about code quality, cleanup, or what to improve.

From plugin
claude-elixir-phoenix
576106 skills37 agents2 commands

Claude Code

$ npx -y skills add oliver-kriska/claude-elixir-phoenix --skill techdebt --agent claude-code

SKILL.md

techdebt.SKILL.md
name: techdebt
description: Analyze Elixir/Phoenix technical debt — duplicates, refactoring opportunities, credo issues. Use when asked about code quality, cleanup, or what to improve.
effort: medium

Technical Debt Detection

Find and eliminate duplicate code patterns, anti-patterns, and refactoring opportunities in Elixir/Phoenix projects.

Iron Laws - Never Violate These

1. **Search before refactoring** - Understand full scope of duplication before extracting 2. **Three strikes rule** - Extract shared code only after 3+ duplications 3. **Prefer composition** - Use behaviours and protocols over inheritance-style abstractions 4. **Test coverage first** - Ensure tests exist before refactoring duplicated code

Analysis Checklist

1. Run Credo for Automated Detection

Run `mix credo --strict`.

Focus on:

  • Design issues (duplication, complexity)
  • Consistency issues (naming, patterns)
  • Refactoring opportunities

2. Find Duplicate Ecto Query Patterns

Use Grep to search for repeated Repo calls (`Repo.get!`, `Repo.get`, `Repo.one`) in `lib/**/*.ex`. Use Grep to find duplicate query patterns (`from.*in.*where`) in `lib/**/*.ex`.

3. Find Duplicate Validation Logic

Use Grep with `output_mode: "count"` to count `def changeset` occurrences in `lib/**/*.ex`. Use Grep to find repeated validations (`validate_required`, `validate_format`) in `lib/**/*.ex`.

4. Find Copy-Pasted Controller Actions

Use Grep to find similar action patterns (`def create`, `def update`, `def delete`) in `lib/*_web/**/*.ex`.

Common Duplication Patterns

| Pattern | Symptom | Solution | |---------|---------|----------| | Repeated queries | Same `Repo.get` in multiple contexts | Create shared query module | | Duplicate validations | Same `validate_*` calls | Extract to shared changeset | | Similar controllers | Copy-pasted CRUD actions | Use Phoenix generators consistently | | Repeated transforms | Same `Enum.map` patterns | Extract to domain module |

Reporting Format

For each duplication found, report:

1. **Location**: File paths and line numbers 2. **Pattern**: What code is duplicated 3. **Extraction**: Suggested shared function/module 4. **Effort**: Low/Medium/High to fix

Usage

Run `/phx:techdebt` to analyze the codebase and generate a prioritized report of technical debt with specific remediation steps.

Read more
@oliver-kriska
Ships withclaude-elixir-phoenix

Docs: phxagents.dev -- install guides per runtime, the runtime compatibility matrix, all 26 Iron Laws, and a browsable skill and agent catalog. Claude Code is great.

576106 skills37 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
576
Star history of oliver-kriska/claude-elixir-phoenix on GitHub, a chart by star-history.com

Other skills on claude-elixir-phoenix.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about techdebt.

Which coding agents can use techdebt?
techdebt installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.