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 gen.config first — never hand-craft .credo.exs from scratch--strict in CI — enables additional checks that are disabled by defaultlib/credo/checks/ — never inline them in application codeFollow this sequence when setting up or customizing Credo:
# mix.exs
defp deps do
[
{:credo, "~> 1.7", only: [:dev, :test], runtime: false}
]
endmix deps.getmix credo gen.config.credo.exsSee Basic Configuration below.
mix credoSuccess: Credo exits 0 and prints a summary with issue counts per category. If issues are found, review them — fix violations, adjust check configuration, or add inline disable comments for intentional exceptions.
mix credo --strictCI must use --strict.
See CI Integration below.
Add custom check modules to lib/credo/checks/. See Custom Checks below.
Use
mix credo gen.configfor the complete check list rather than writing it by hand.
# .credo.exs
%{
configs: [
%{
name: "default",
strict: false,
color: true,
files: %{
included: ["lib/", "src/", "test/", "web/", "apps/"],
excluded: [~r"/_build/", ~r"/deps/", ~r"/node_modules/"]
},
checks: %{
enabled: [
{Credo.Check.Readability.MaxLineLength, [priority: :low, max_length: 120]},
{Credo.Check.Design.AliasUsage, [if_nested_deeper_than: 2, if_called_more_often_than: 0]},
# ... add or override checks as needed
],
disabled: [
{Credo.Check.Consistency.MultiAliasImportRequireUse, []},
{Credo.Check.Design.DuplicatedCode, []},
]
}
},
%{
name: "strict",
strict: true,
files: %{
included: ["lib/", "src/", "test/", "web/", "apps/"],
excluded: [~r"/_build/", ~r"/deps/", ~r"/node_modules/"]
},
checks: %{
enabled: [
{Credo.Check.Design.TagTODO, [priority: :high]},
{Credo.Check.Readability.Specs, []},
]
}
}
]
}# credo:disable-for-next-line
def my_function_with_long_name, do: :ok
def my_function, do: :ok # credo:disable-for-this-line# At the top of the file
# credo:disable-for-this-file Credo.Check.Readability.ModuleDoc
defmodule MyApp.LegacyModule do
# No module doc needed
end# .credo.exs
checks: %{
disabled: [
{Credo.Check.Readability.ModuleDoc, []}
]
}# .github/workflows/ci.yml
name: CI
on: [push, pull_request]
jobs:
credo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: '1.15'
otp-version: '26.0'
- run: mix deps.get
- run: mix credo --strictWhen Credo fails in CI, run mix credo locally to reproduce the failure. Only disable a check if it's a confirmed false positive — document the reason inline.
# mix.exs
defp aliases do
[
"lint": ["credo --strict"],
"quality": ["format --check-formatted", "credo --strict", "sobelow --config"]
]
endCreate custom checks for project-specific patterns in three steps:
use Credo.Check in lib/credo/checks/.run/2 with Credo.Code.prewalk/2 to traverse the AST and collect issues.checks.enabled in .credo.exs.The example below detects direct Repo. calls inside LiveView modules — adapt find_issues/3 to match your own patterns:
# lib/credo/checks/no_direct_repo_in_live_view.ex
defmodule Credo.Check.NoDirectRepoInLiveView do
use Credo.Check, category: :design, base_priority: :high
@explanation """
LiveViews should not call Repo directly. Use context functions instead.
"""
def run(%Credo.SourceFile{} = source_file, params) do
issue_meta = IssueMeta.for(source_file, params)
source_file
|> Credo.Code.prewalk(&find_issues(&1, &2, issue_meta))
end
# Detect calls of the form MyApp.Repo.<any function>
defp find_issues(
{{:., _, [{:__aliases__, meta, [_, "Repo"]}, _fn]}, _, _} = ast,
issues,
issue_meta
) do
issue = format_issue(issue_meta, message: "Avoid direct Repo calls in LiveViews.", line_no: meta[:line])
{ast, [issue | issues]}
end
defp find_issues(ast, issues, _issue_meta), do: {ast, issues}
endRegister the custom check in .credo.exs:
checks: %{
enabled: [
{Credo.Check.NoDirectRepoInLiveView, []}
]
}| ❌ Don't | ✅ Do |
|---|---|
Hand-write .credo.exs from scratch | Generate the baseline with mix credo gen.config |
Run plain mix credo in CI | Run mix credo --strict in CI |
| Add Credo as a runtime dependency | Scope it: only: [:dev, :test], runtime: false |
| Scatter inline disables without explanation | Document why each credo:disable-* exception exists |
| Inline custom checks in application code | Put custom checks in lib/credo/checks/ |
Pin CI actions to @latest or @main | Pin to a specific version tag (e.g. @v4) |
| Predecessor | This Skill | Successor |
|---|---|---|
| None (standalone) | credo-config | code-quality |
| code-quality | credo-config | code-review |
Companion skills:
code-quality — runs mix credo --strict against this configurationcode-review — enforces the same conventions during PR review.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