elixir
NewThinking skills for Elixir, Phoenix, Ecto, OTP, and Oban patterns
Summary
This skill enhances Claude Code with deep expertise in Elixir, Phoenix, Ecto, OTP, and Oban patterns.
- It provides language server support, auto-formatting, compilation checks, and code quality analysis to streamline Elixir development workflows.
Overview
Claude Code plugins for Elixir development.
Installation
claude plugin marketplace add georgeguimaraes/claude-code-elixirInstall all plugins:
claude plugin install elixir-lsp@claude-code-elixir && \
claude plugin install mix-format@claude-code-elixir && \
claude plugin install mix-compile@claude-code-elixir && \
claude plugin install mix-credo@claude-code-elixir && \
claude plugin install elixir@claude-code-elixirPrerequisites
Install the expert binary and make sure it's on your PATH. See installation instructions.
Note:
mix-format,mix-compile, andmix-credorequire bash (Git Bash or WSL on Windows).
Plugins
Overview
| Plugin | Type | Description |
|---|---|---|
| elixir-lsp | LSP | Language Server with completions, go-to-definition, diagnostics |
| mix-format | Hook | Auto-format .ex/.exs files on save |
| mix-compile | Hook | Compile with --warnings-as-errors on save |
| mix-credo | Hook | Run Credo code quality checks on save |
| elixir | Skills | BEAM architecture, Phoenix, Ecto, OTP patterns |
Tools
Elixir Language Server integration powered by Expert.
| Feature | Description |
|---|---|
| Navigation | Go to definition, find references |
| Completions | With signature help and docs |
| Diagnostics | Compiler warnings and errors |
| File types | .ex, .exs, .heex, .leex |
Auto-runs mix format after editing .ex and .exs files.
Auto-runs mix compile --warnings-as-errors after editing .ex files.
- •Only
.exfiles (not.exsscripts/tests) - •Finds
mix.exsby walking up directories - •Fails on warnings or errors
Auto-runs mix credo after editing .ex and .exs files to check code quality.
- •Runs on both
.exand.exsfiles - •Uses project's default Credo configuration
- •Gracefully skips if Credo is not installed
- •Fails on code quality issues
Skills
Paradigm-shifting skills for Elixir, Phoenix, and OTP development. Includes a SessionStart hook that auto-suggests skills when working on Elixir code.
Included skills:
| Skill | Use When |
|---|---|
elixir-thinking | Designing modules, processes, data structures |
phoenix-thinking | Working with Phoenix, LiveView, PubSub |
ecto-thinking | Working with Ecto, contexts, schemas |
otp-thinking | Implementing GenServers, supervisors, Tasks |
Mental models for writing Elixir — how it differs from OOP.
| Concept | Insight |
|---|---|
| Iron Law | NO PROCESS WITHOUT A RUNTIME REASON |
| Three dimensions | Behavior, state, mutability are decoupled |
| Processes | For runtime (state/concurrency/faults), not code organization |
| "Let it crash" | Means "let it heal" — supervisors restart |
| Polymorphism | Behaviors → Protocols → Message passing (least to most dynamic) |
<details> <summary>Sources</summary>
- •José Valim - Gang of None
- •Saša Jurić - The Soul of Erlang and Elixir
- •Saša Jurić - Clarity
- •Designing Elixir Systems with OTP
- •Official Elixir Guides
</details>
Architectural patterns for Phoenix and LiveView.
| Concept | Insight |
|---|---|
| Where to load data | mount/3 by default; handle_params/3 for live navigation (push_patch) |
| Initial double-load | mount and handle_params both run twice; use connected?/1, assign_async/3, or assign_new/3 |
| Scopes (1.8+) | Security-first authorization threading |
| PubSub | Scoped topics, broadcast_from to avoid self-broadcast |
| Channel fastlane | Socket state can be stale — re-fetch or include in broadcast |
<details> <summary>Sources</summary>
</details>
Architectural patterns for Ecto and contexts.
| Concept | Insight |
|---|---|
| Contexts | Bounded domains with their own "dialect" |
| Cross-context refs | Use IDs, not belongs_to associations |
| Schemas | Multiple changesets per schema, embedded_schema for forms |
| Preloads | Separate vs join — pick based on data shape |
| pool_count vs pool_size | pool_count = DBConnection pools, pool_size = connections per pool |
<details> <summary>Sources</summary>
- •Phoenix Contexts Guide
- •German Velasco - DDD for Phoenix Contexts (ElixirConf 2024)
- •Ecto Multi-Tenancy Guide
</details>
OTP design patterns and when to use each abstraction.
| Concept | Insight |
|---|---|
| Iron Law | GENSERVER IS A BOTTLENECK BY DESIGN |
| ETS | Bypasses bottleneck — concurrent reads with :read_concurrency |
| Task.Supervisor | THE pattern for async work (not raw Task.async) |
| Registry + DynamicSupervisor | Named dynamic processes without atom leaks |
| Broadway vs Oban | External queues vs background jobs — different problems |
<details> <summary>Sources</summary>
- •Erlang OTP Design Principles
- •Elixir GenServer Docs
- •Elixir School - OTP Concurrency
- •Saša Jurić - Elixir in Action
- •Stephen Bussey - Real-Time Phoenix
</details>
Known Issues
elixir-lsp: `client/registerCapability` workaround. Claude Code's LSP client doesn't respond to client/registerCapability requests that Expert sends during initialization (anthropics/claude-code#32595). The plugin includes a Python wrapper (expert-wrapper) that intercepts these requests and auto-responds so Expert can initialize properly. The wrapper will be removed once the upstream fix lands. Requires Python 3 on PATH.
Troubleshooting
expert not found: Ensure the expert binary is on your PATH. See installation instructions.
License
Copyright (c) 2025 George Guimarães
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Install & Usage
mkdir -p .claude/skillsmkdir -p .claude/skills && curl -o .claude/skills/elixir.md https://raw.githubusercontent.com/georgeguimaraes/claude-code-elixir/main/SKILL.md/elixirUse Cases
Usage Examples
/elixir Explain how to implement a GenServer for managing a pool of workers.
/elixir Show me how to set up a Phoenix LiveView with a form that updates in real-time.
/elixir Write an Ecto query that joins posts and comments, filtering by recent date.
Security Audits
Frequently Asked Questions
What is elixir?
This skill enhances Claude Code with deep expertise in Elixir, Phoenix, Ecto, OTP, and Oban patterns. It provides language server support, auto-formatting, compilation checks, and code quality analysis to streamline Elixir development workflows.
How to install elixir?
To install elixir: create the skills directory (mkdir -p .claude/skills), then run: mkdir -p .claude/skills && curl -o .claude/skills/elixir.md https://raw.githubusercontent.com/georgeguimaraes/claude-code-elixir/main/SKILL.md. Finally, /elixir in Claude Code.
What is elixir best for?
elixir is a skill categorized under Development. It is designed for: elixir, phoenix, ecto, otp, oban, liveview, genserver. Created by George Guimaraes.
What can I use elixir for?
elixir is useful for: Navigate Elixir codebases with go-to-definition and find references using the LSP plugin.; Automatically format .ex and .exs files on save with mix-format to maintain consistent style.; Compile Elixir projects with warnings-as-errors to catch issues early during development.; Run Credo code quality checks on save to enforce best practices and detect code smells.; Design fault-tolerant systems using OTP patterns like GenServer, Supervisor, and Task.; Build real-time features with Phoenix LiveView and manage database interactions with Ecto..