Skip to content
Skills Library
Programming · Review & audit

techdebt

/techdebt

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

Licence
MIT
Last repository change
22.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 22.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

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

Original author description

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

How it works

  1. Iron Laws - Never Violate These
  2. Analysis Checklist
  3. Common Duplication Patterns
  4. Reporting Format
  5. Usage
Original SKILL.md headings · 60 lines, 296 words
SKILL.md preview
---
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.

Versions

RepositoryScoreLicence
This page · oliver-kriska/claude-elixir-phoenix100MIT
cardene777/agent-shuriken100MIT
ramonclaudio/skills100MIT
matteocervelli/llms100MIT

Database snapshot: 13.11.2026 · package version d4e534c19446 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100phx-techdebt
    Analyze Elixir/Phoenix technical debt — duplicates, refactoring opportunities, credo issues. Use when asked about code quality, cleanup, or what to improve.
  • 100phx-techdebt
    Analyze Elixir/Phoenix technical debt — duplicates, refactoring opportunities, credo issues. Use when asked about code quality, cleanup, or what to improve.
  • 100credo-configuration
    Use when configuring Credo static analysis for Elixir projects requiring customized code quality rules and settings.
  • 100code-quality
    Use when refactoring or reviewing Elixir code quality — compiler warnings and Credo first, then the plugin's on-demand duplication and branch-complexity scans. Not for style rules while writing code (use elixir-essentials).
  • 95credo-checks
    Use when understanding and fixing common Credo check issues for Elixir code quality and consistency.
  • 100estack-quality
    Configure and run an Elixir/Phoenix quality gate with honest failure handling. Use for mix verify/precommit, Credo, coverage, Dialyzer, Sobelow, dependency audits, or CI configuration.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.