phx-techdebt

phx-techdebt is a skill for Claude Code, Codex from oliver-kriska/claude-elixir-phoenix. It costs 38 tokens per session (534 once invoked), scanned A, a copy of techdebt, MIT.

A code-quality checker for Elixir and Phoenix projects that looks for duplicated code, common mistakes, and places worth refactoring. It also uses Credo, an Elixir tool that flags style and design problems.

In plain words
What is it for?
Use it to inspect Ecto database queries, validation code, and other repeated patterns, then identify safe refactoring opportunities.
Why use it?
It helps you find cleanup work and repeated logic before the codebase becomes harder to change. It also encourages checking tests before reorganising shared code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect Ecto database queries, validation code, and other repeated patterns, then identify safe refactoring opportunities.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/oliver-kriska/claude-elixir-phoenix/phx-techdebt
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add oliver-kriska/claude-elixir-phoenix --skill phx-techdebt
Clone the repo
git clone --depth 1 https://github.com/oliver-kriska/claude-elixir-phoenix

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for phx-techdebt

README.md
[![agentmods](https://agentmods.dev/badge/skills/oliver-kriska/claude-elixir-phoenix/phx-techdebt/github.svg)](https://agentmods.dev/skills/oliver-kriska/claude-elixir-phoenix/phx-techdebt)
Your own site
<a href="https://agentmods.dev/skills/oliver-kriska/claude-elixir-phoenix/phx-techdebt"><img src="https://agentmods.dev/badge/skills/oliver-kriska/claude-elixir-phoenix/phx-techdebt/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for phx-techdebt

Your own site · 80×15
<a href="https://agentmods.dev/skills/oliver-kriska/claude-elixir-phoenix/phx-techdebt"><img src="https://agentmods.dev/badge/skills/oliver-kriska/claude-elixir-phoenix/phx-techdebt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 534 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 98% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.00534
Opus 5 $0.00019 $0.00267
Sonnet 5 $0.00008 $0.00107
Haiku 4.5 $0.00004 $0.00053

Measured 5d ago against content hash 1418fa15bf77, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

phx-techdebt scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

98% identical to techdebt — 8 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

targets/amp/skills/phx-techdebt/SKILL.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

Read the full file on GitHub · 65 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 65 lines · 38 tokens per session scan A 1418fa15bf77

Subscribe to this mod's changes

phx-techdebt is a skill published in the GitHub repository oliver-kriska/claude-elixir-phoenix (541 stars, last pushed 3d ago), licensed MIT. It adds 38 tokens to every session and 534 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 98% identical to techdebt, differing in 8 lines, and is treated as a copy.

Related

Other skills, from other repositories

elderly-ui-audit

A code review for making websites and mobile apps easier for older people to use, based on Chinese government accessibility guidelines.

XuYuting133/elderly-ui-audit · 59 tokens

fable-super-audit

Comprehensive, rubric-driven, whole-repository code audit that ends in a prioritized improvement plan with an executive health grade. Built to run in a premium, time-limited model session (Fable): it dispatches cheaper Opus/Sonnet subagents to explore the codebase and pre-build a project-tailored audit checklist, then…

madisonrickert/claude-skills · 317 tokens

cc-codex-review

A second-opinion workflow that sends uncertain questions and important technical decisions to Codex for review alongside Claude Code.

codingSamss/all-my-ai-needs · 100 tokens

improve-codebase-architecture

Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.

saitarrun/Sdlc-ai-workflow · 68 tokens

skill-pr-review

Comprehensive code review for pull requests using parallel multi-agent analysis. Audits CLAUDE.md compliance, checks for bugs, analyzes git history, reviews comments, and filters by confidence score. Use when reviewing a GitHub PR, mentions "code review", "review this PR", or "/code-review".

saitarrun/Sdlc-ai-workflow · 65 tokens

odoo-code-review

Use when reviewing Odoo code — yours before commit, Claude's after generation, or a teammate's PSDU PR. Catches shape-of-bad-code issues that lint won't, plus customer-readiness gaps. Invoke before claiming Odoo work is done.

omas-odoo/odoo-superpowers · 56 tokens