Curated library of 38 atomic skills, 7 personas, and 1 orchestrator for Elixir and Phoenix development. Organized by category: fundamentals, phoenix, database, testing, auth, infrastructure, quality, security, integrations, tooling, frameworks, personas, and orchestration. Covers core Elixir patterns, Phoenix LiveView, Ecto, OTP, Oban, testing, security, deployment, real-time, and modern tooling (Req, Swoosh, Cachex, Broadway, Ash).
91
91%
Does it follow best practices?
Impact
91%
1.37xAverage score across 56 eval scenarios
Advisory
Suggest reviewing before use
mix credo --strict before any PRmix sobelow for security — check after quality checksmix credo --strict to identify all issuesmix credo --strict to confirm all issues are resolvedmix sobelow before committingSee assets/refactoring_checklist.md for copy-paste complexity thresholds and a before/during/after refactoring checklist.
How to fix:
# Create: lib/app_web/live/helpers.ex
defmodule AppWeb.Live.Helpers do
def format_time(%Decimal{} = seconds) do
seconds |> Decimal.to_float() |> format_time()
end
def format_time(seconds) when is_number(seconds) do
# shared formatting logic
end
end
# In each LiveView:
import AppWeb.Live.Helpers, only: [format_time: 1]How to fix:
# Before: one large function (complexity 41)
def calculate_trend_line(data) do
# 50 lines of assignments, branches, conditions
end
# After: composed smaller functions (complexity <20 each)
def calculate_trend_line(data) do
sums = calculate_regression_sums(data)
slope = calculate_slope(sums)
intercept = calculate_intercept(sums, slope)
build_trend_points(data, slope, intercept)
endRemove any private functions no longer referenced after refactoring.
How to fix:
# Create a function component for the shared markup
defmodule AppWeb.Live.Components do
use Phoenix.Component
def metric_filters(assigns) do
~H"""
<div class="filters">
<!-- shared filter markup -->
</div>
"""
end
end# Run with strict mode (recommended)
mix credo --strict
# Focus on a specific file
mix credo lib/my_app/accounts.ex# Run security analysis
mix sobelow
# With configuration
mix sobelow --config# All three in sequence
mix deps.audit && mix hex.audit && mix sobelow| ❌ Don't | ✅ Do |
|---|---|
| Copy-paste similar logic across modules | Extract a shared module when 2+ share >70% implementation |
| Let a function grow past ABC complexity 30 | Break it into named private helper functions |
| Leave unused private functions after refactoring | Remove dead private functions |
| Duplicate HEEx markup across templates | Extract a function component when 2+ files share >40% markup |
| Reduce complexity before removing duplication | Extract shared code first, then reduce complexity |
| Open a PR without a security pass | Run mix credo --strict and mix sobelow before committing |
| Predecessor | This Skill | Successor |
|---|---|---|
| code-review | code-quality | refactor-code |
| refactor-code | code-quality | testing-essentials |
Companion skills:
credo-config — configure Credo checks and CI integrationrefactor-code — safe structural changes backed by characterization testscode-review — PR review that surfaces the quality issues fixed here.tessl-plugin
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
scenario-17
scenario-18
scenario-19
scenario-20
scenario-21
scenario-22
scenario-23
scenario-24
scenario-25
scenario-26
scenario-27
scenario-28
scenario-29
scenario-30
scenario-31
scenario-32
scenario-33
scenario-34
scenario-35
scenario-36
scenario-37
scenario-38
scenario-39
scenario-40
scenario-41
scenario-42
scenario-43
scenario-44
scenario-45
scenario-46
scenario-47
scenario-48
scenario-49
scenario-50
scenario-51
scenario-52
scenario-53
scenario-54
scenario-55
scenario-56
skills
frameworks
ash-framework
infrastructure
orchestration
elixir-skill-router
personas
phoenix
quality
security
security-essentials
tooling
mix-tasks-generators