Staff Level Elixir
pproenca/dot-skills
A skill your agent uses when writing, reviewing, or refactoring Elixir, OTP, Ecto, or Phoenix/LiveView code.
Core catalog of 8 critical Elixir/Phoenix anti-patterns covering error handling, separation of concerns, Ecto queries, and testing.
$ npx skills add Gentleman-Programming/Gentleman-Skills --skill elixir-antipatterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Gentleman-Programming/Gentleman-Skills elixir-antipatterns --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/community/elixir-antipatterns .claude/skills/elixir-antipatterns && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "elixir-antipatterns" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/community/elixir-antipatterns into .claude/skills/elixir-antipatterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "elixir-antipatterns", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/community/elixir-antipatternsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Gentleman-Programming/Gentleman-Skills --skill elixir-antipatterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Gentleman-Programming/Gentleman-Skills elixir-antipatterns --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/community/elixir-antipatterns .agents/skills/elixir-antipatterns && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "elixir-antipatterns" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/community/elixir-antipatterns into .agents/skills/elixir-antipatterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "elixir-antipatterns", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Gentleman-Programming/Gentleman-Skills --skill elixir-antipatterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Gentleman-Programming/Gentleman-Skills elixir-antipatterns --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/community/elixir-antipatterns .cursor/skills/elixir-antipatterns && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "elixir-antipatterns" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/community/elixir-antipatterns into .cursor/skills/elixir-antipatterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "elixir-antipatterns", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Gentleman-Programming/Gentleman-Skills.git --path community/elixir-antipatterns--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Gentleman-Programming/Gentleman-Skills --skill elixir-antipatterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Gentleman-Programming/Gentleman-Skills elixir-antipatterns --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/community/elixir-antipatterns .gemini/skills/elixir-antipatterns && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "elixir-antipatterns" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/community/elixir-antipatterns into .gemini/skills/elixir-antipatterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "elixir-antipatterns", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Gentleman-Programming/Gentleman-Skills elixir-antipatternsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Gentleman-Programming/Gentleman-Skills --skill elixir-antipatterns -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/community/elixir-antipatterns .github/skills/elixir-antipatterns && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "elixir-antipatterns" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/community/elixir-antipatterns into .github/skills/elixir-antipatterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "elixir-antipatterns", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Gentleman-Programming/Gentleman-Skills --skill elixir-antipatterns -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Gentleman-Programming/Gentleman-Skills elixir-antipatterns --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/community/elixir-antipatterns .opencode/skills/elixir-antipatterns && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "elixir-antipatterns" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/community/elixir-antipatterns into .opencode/skills/elixir-antipatterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "elixir-antipatterns", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
elixir-antipatternsCore catalog of 8 critical Elixir/Phoenix anti-patterns covering error handling, separation of concerns, Ecto queries, and testing.
Elixir Antipatterns is an agent skill from Gentleman-Programming/Gentleman-Skills. Core catalog of 8 critical Elixir/Phoenix anti-patterns covering error handling, separation of concerns, Ecto queries, and testing. Trigger: During Elixir code review, refactoring sessions, or when writing Phoenix/Ecto code.
Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including assets (for example `README.md` and `assets/extended.md`).
It sits in Development, covering LLM observability, Error handling and Refactoring. It works with Elixir. The repository describes itself as: Community-driven AI agent skills for Claude Code, OpenCode, and other AI assistants. Curated patterns and community contributions. The licence is MIT.
8 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit c8036a3. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are elixir).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
hexdocs.pmFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Elixir Antipatterns loads about 2.1k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 374 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from Gentleman-Programming/Gentleman-Skills at commit c8036a3, republished under its MIT licence (© Gentleman-Programming). 374 words, ~2,112 tokens.
.claude/skills/elixir-antipatterns/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Critical anti-patterns that compromise robustness and maintainability in Elixir/Phoenix applications.
Complement with:
mix formatandCredofor style enforcement
Extended reference: SeeEXTENDED.mdfor 40+ patterns and deep-dive examples
Topics: Error handling (3 patterns) • Architecture (2 patterns) • Performance (2 patterns) • Testing (1 pattern)
Load this skill when:
Quick reference to the 8 core patterns this skill enforces:
{:ok, value} | {:error, reason} instead of nil or exceptionsRepo.preload/2 to avoid N+1 queries<- for all failable operations in withwith chains >4 steps into functionsSee
## Anti-Patternssection below for detailed ❌ BAD / ✅ CORRECT code examples.
# ✅ CORRECT - Errors as values, explicit in @spec
defmodule UserService do
@spec fetch_user(String.t()) :: {:ok, User.t()} | {:error, :not_found}
def fetch_user(id) do
case Repo.get(User, id) do
nil -> {:error, :not_found}
user -> {:ok, user}
end
end
end
# ❌ BAD - Exceptions for business errors
def fetch_user(id) do
Repo.get(User, id) || raise "User not found"
endArchitecture Layers:
User Request → LiveView (UI only) → Context (business logic) → Schema/Repo (data)
↓ ↓ ↓
handle_event() Accounts.create_user() Repo.insert()# ✅ CORRECT - Thin LiveView, logic in context
defmodule MyAppWeb.UserLive.Index do
use MyAppWeb, :live_view
def handle_event("create", params, socket) do
case Accounts.create_user(params) do
{:ok, user} -> {:noreply, redirect(socket, to: ~p"/users/#{user}")}
{:error, changeset} -> {:noreply, assign(socket, changeset: changeset)}
end
end
end
# ❌ BAD - Business logic in LiveView
def handle_event("create", %{"user" => params}, socket) do
if String.length(params["name"]) < 3 do
{:noreply, put_flash(socket, :error, "Too short")}
else
case Repo.insert(User.changeset(%User{}, params)) do
{:ok, user} -> send_email(user); redirect(socket)
end
end
end# ✅ CORRECT - Preload associations (2 queries total)
users = User |> Repo.all() |> Repo.preload(:posts)
Enum.map(users, fn user -> process(user, user.posts) end)
# Note: For complex filtering (e.g., WHERE posts.status = 'published'),
# use join + preload in the query itself. See EXTENDED.md for advanced patterns.
# ❌ BAD - Query in loop (101 queries for 100 users)
users = Repo.all(User)
Enum.map(users, fn user ->
posts = Repo.all(from p in Post, where: p.user_id == ^user.id)
{user, posts}
end)raise for Business Errors# ❌ BAD
def fetch_user(id) do
Repo.get(User, id) || raise "User not found"
end
# ✅ CORRECT
@spec fetch_user(String.t()) :: {:ok, User.t()} | {:error, :not_found}
def fetch_user(id) do
case Repo.get(User, id) do
nil -> {:error, :not_found}
user -> {:ok, user}
end
endWhy: @spec documents errors, pattern matching forces explicit handling.
nil for Errors# ❌ BAD - No context on failure
def find_user(email), do: Repo.get_by(User, email: email)
# ✅ CORRECT - Explicit error reason
@spec find_user(String.t()) :: {:ok, User.t()} | {:error, :not_found}
def find_user(email) do
case Repo.get_by(User, email: email) do
nil -> {:error, :not_found}
user -> {:ok, user}
end
end= Inside with for Failable Operations# ❌ BAD - Validate errors silenced
with {:ok, user} <- fetch_user(id),
validated = validate(user), # ← Doesn't check for {:error, _}
{:ok, saved} <- save(validated) do
{:ok, saved}
end
# ✅ CORRECT - All operations use <-
with {:ok, user} <- fetch_user(id),
{:ok, validated} <- validate(user),
{:ok, saved} <- save(validated) do
{:ok, saved}
end# ❌ BAD - Validation in view
def handle_event("create", %{"user" => params}, socket) do
if String.length(params["name"]) < 3 do
{:noreply, put_flash(socket, :error, "Too short")}
else
case Repo.insert(User.changeset(%User{}, params)) do
{:ok, user} -> redirect(socket)
end
end
end
# ✅ CORRECT - Delegate to context
def handle_event("create", params, socket) do
case Accounts.create_user(params) do
{:ok, user} -> {:noreply, redirect(socket, to: ~p"/users/#{user}")}
{:error, changeset} -> {:noreply, assign(socket, changeset: changeset)}
end
endWhy: Contexts testable without Phoenix, logic reusable.
with# ❌ BAD - Too many responsibilities
with {:ok, a} <- step1(),
{:ok, b} <- step2(a),
{:ok, c} <- step3(b),
{:ok, d} <- step4(c),
{:ok, e} <- step5(d) do
{:ok, e}
end
# ✅ CORRECT - Group into cohesive functions
with {:ok, validated} <- validate_and_fetch(id),
{:ok, processed} <- process_business_rules(validated),
{:ok, result} <- persist_and_notify(processed) do
{:ok, result}
end# ❌ BAD - 101 queries for 100 users
users = Repo.all(User)
Enum.map(users, fn user ->
posts = Repo.all(from p in Post, where: p.user_id == ^user.id)
end)
# ✅ CORRECT - 2 queries total
User |> Repo.all() |> Repo.preload(:posts)Impact: 100 users with N+1 = 10 seconds vs 5ms with preload.
# ❌ BAD - No index on frequently queried column
# Migration:
create table(:users) do
add :email, :string
end
# ✅ CORRECT - Add index
create table(:users) do
add :email, :string
end
create unique_index(:users, [:email])Why: Full table scan on 1M+ rows vs instant index lookup.
# ❌ BAD - What's being tested?
test "creates user" do
UserService.create_user(%{name: "Juan"})
end
# ✅ CORRECT - Assert expected behavior
test "creates user successfully" do
assert {:ok, user} = UserService.create_user(%{name: "Juan"})
assert user.name == "Juan"
end| Situation | Anti-Pattern | Correct Pattern |
|---|---|---|
| Error handling | raise "Not found" | {:error, :not_found} |
| Missing data | Return nil | {:error, :not_found} |
| Business logic | In LiveView | In context modules |
| Associations | Enum.map + Repo.get | Repo.preload |
| with chains | validated = fn() | {:ok, validated} <- fn() |
| Frequent queries | No index | create index(:table, [:column]) |
| Testing | No assertions | assert expected behavior |
| Complex logic | 6+ step with | Group into 3 functions |
EXTENDED.md for 40+ anti-patterns© Gentleman-Programming, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (assets) in community/elixir-antipatterns of Gentleman-Programming/Gentleman-Skills.
Open the folder on GitHubat commit c8036a3
Elixir Antipatterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Elixir Antipatterns this skillGentleman-Programming/Gentleman-Skills | 657 | — | ~2.1k | Automated safety check: Pass | MIT | |
| Staff Level Elixirpproenca/dot-skills | 214 | — | ~1.6k | Automated safety check: Pass | MIT | |
| Elixirstreamband/hydra-srt | 146 | — | ~804 | Automated safety check: Pass | Apache-2.0 | |
| Idiomatic Elixirgeorgeguimaraes/elixir-agent-tools | 184 | — | ~2.1k | Automated safety check: Pass | Apache-2.0 | |
| Change CleanupSimon-Initiative/oli-torus | 119 | — | ~3.7k | Automated safety check: Pass | MIT | |
| Elixirericrisco/rsc-harness | 156 | — | ~2.9k | Automated safety check: Pass | MIT |
pproenca/dot-skills
A skill your agent uses when writing, reviewing, or refactoring Elixir, OTP, Ecto, or Phoenix/LiveView code.
streamband/hydra-srt
A skill your agent uses for Elixir/Phoenix development in this repo: implementing features, refactors, debugging, tests, Ecto changes, and production-safe fixes.
georgeguimaraes/elixir-agent-tools
Writes and refactors idiomatic Elixir modules and functions, with rules for pattern matching, error handling, protocols and when a process is really needed.
Simon-Initiative/oli-torus
Clean up and harden code introduced by the current branch without drifting into broad refactors.
ericrisco/rsc-harness
A skill your agent uses when writing or refactoring Elixir/OTP on the BEAM — GenServers, supervision trees and restart strategies, pattern matching, mix projects and releases — or when processes…
irahardianto/awesome-agv
Elixir and OTP idioms: pattern matching, with pipelines, GenServer and supervision tree architecture, fault-tolerant concurrency, and ExUnit testing.
Gentleman-Programming/Gentleman-Skills
Creates new AI agent skills following the Agent Skills spec.
Gentleman-Programming/Gentleman-Skills
Angular architecture: Scope Rule, project structure, file naming, style guide.
Gentleman-Programming/Gentleman-Skills
Angular core patterns: standalone components, signals, inject, control flow, zoneless.
Gentleman-Programming/Gentleman-Skills
Angular forms: Signal Forms (experimental) and Reactive Forms.
Gentleman-Programming/Gentleman-Skills
Angular performance: NgOptimizedImage, @defer, lazy loading, SSR.
Gentleman-Programming/Gentleman-Skills
Django REST Framework patterns. An agent skill from Gentleman-Programming/Gentleman-Skills.
Works with
Categories
Core catalog of 8 critical Elixir/Phoenix anti-patterns covering error handling, separation of concerns, Ecto queries, and testing. Elixir Antipatterns is an agent skill from Gentleman-Programming/Gentleman-Skills. Core catalog of 8 critical Elixir/Phoenix anti-patterns covering error handling, separation of concerns, Ecto queries, and testing.
Elixir Antipatterns fits situations like: tasks that involve LLM observability; tasks that involve Error handling; tasks that involve Refactoring.
Run `npx skills add Gentleman-Programming/Gentleman-Skills --skill elixir-antipatterns -a claude-code`. Or copy the skill folder (community/elixir-antipatterns in Gentleman-Programming/Gentleman-Skills) into .claude/skills/elixir-antipatterns in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Gentleman-Programming/Gentleman-Skills --skill elixir-antipatterns -a codex`. Or copy the skill folder (community/elixir-antipatterns in Gentleman-Programming/Gentleman-Skills) into .agents/skills/elixir-antipatterns in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Gentleman-Programming/Gentleman-Skills --skill elixir-antipatterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/elixir-antipatterns, .gemini/skills/elixir-antipatterns, .github/skills/elixir-antipatterns and .opencode/skills/elixir-antipatterns in your project.
SKILL.md names no scripts, command-line tools or credentials: Elixir Antipatterns is instructions for the agent only.
SKILL.md names 1 domain. As links in the text: hexdocs.pm. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Elixir Antipatterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Elixir Antipatterns: Staff Level Elixir (pproenca/dot-skills, 214 stars), Elixir (streamband/hydra-srt, 146 stars), Idiomatic Elixir (georgeguimaraes/elixir-agent-tools, 184 stars) and Change Cleanup (Simon-Initiative/oli-torus, 119 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Gentleman-Programming (a GitHub organization) maintains it in Gentleman-Programming/Gentleman-Skills, which has 657 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on March 28, 2026.
Source: Gentleman-Programming/Gentleman-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.