code-quality
Installation
SKILL.md
Code Quality Automation
Automated detection of code quality issues in Elixir projects. These checks run automatically via hooks when files are written, and can be run on-demand for full project analysis.
RULES — Follow these with no exceptions
- Duplicated functions must be extracted — when 2+ modules share >70% identical function implementations, create a shared module
- Functions must stay below ABC complexity 30 — break complex functions into smaller helpers with single responsibilities
- Unused private functions must be removed — dead code increases maintenance burden and confusion
- Duplicated templates must become components — when 2+ HEEx files share >40% identical markup, extract to a function component
- Run full analysis before major refactors — use
run_analysis.shto establish a baseline before and after - Address duplication before complexity — extracting shared code often reduces complexity as a side effect
- Prefer composition over inheritance — extract shared functions into modules imported/used where needed, not into base modules