Elixir Phoenix Guide for Claude Code and Codex
· Changelog
A Claude Code plugin (with Codex support for the skills) that keeps Claude's Elixir and Phoenix code idiomatic and current. It ships 24 skills checked against Phoenix 1.8's generators, plugin-native hooks that catch dangerous commands and risky code as Claude writes it, and on-demand analysis scripts.
v2.6.0 — five new skills, each verified against the library source and a generated Phoenix 1.8 app: Phoenix 1.8 scopes and generators, Tailwind v4 + daisyUI, zero-downtime Ecto migrations, Ecto query performance, and HTTP clients with Req. Codex installs the plugin directly with codex plugin add. See CHANGELOG.md.
What's Included
Skills (24)
Each skill opens with a RULES section and a "Verified against" line naming the library versions it was checked against. Skills load on demand when Claude's task matches their description.
- elixir-essentials - Pattern matching,
with, error contracts, modern Elixir (1.18+): type checker, JSON, dbg; Phoenix project layout reference
- phoenix-liveview-essentials - Lifecycle, forms (
to_form, phx-change), streams, assign_async/start_async, JS commands, colocated hooks; LiveView checklist and JS interop references
- ecto-essentials - Scoped context functions, schemas, queries, migrations, upserts,
Repo.transact; Ecto reference
- phoenix-uploads -
allow_upload, content-type allowlists, magic-byte checks, external uploads, authorized downloads
- testing-essentials - DataCase/ConnCase, generated fixtures and scopes, LiveView helpers, Mox,
Req.Test; testing reference
- otp-essentials - GenServer, Supervisor, Task, Registry, ETS, PartitionSupervisor, timeouts
- oban-essentials - Workers, uniqueness, transactional enqueue, Oban 2.24 plugin config, Lifeline, Oban.Testing
- code-quality - Compiler and Credo first, then on-demand duplication and branch-complexity scans
- phoenix-liveview-auth - The generated
UserAuth: on_mount, live_session, mount_current_scope, sudo mode, logout disconnects
- ecto-changeset-patterns - Separate changesets per operation, password/email rules, never casting privileged fields
- phoenix-auth-customization - Adding fields to the phx.gen.auth user, registration changeset, fixtures
- phoenix-pubsub-patterns - Scoped topics, broadcasting from contexts, streams in
handle_info, Presence in LiveView
- phoenix-authorization-patterns -
%Scope{}-first contexts, ownership checks, policies, mass-assignment safety
- ecto-nested-associations -
cast_assoc/cast_embed, inputs_for sort/drop params, on_replace, cascades, Multi
- security-essentials - Injection, XSS, SSRF, open redirects (
external:), CSP, safe deserialization, Sobelow
- deployment-gotchas -
mix phx.gen.release --docker, runtime.exs, release migrations, SSL, rolling deploys, health checks
- phoenix-channels-essentials - Socket auth and tokens, join authorization,
intercept/handle_out, Presence
- telemetry-essentials - Logger metadata, telemetry handlers, metric tag cardinality, OpenTelemetry, LiveDashboard
- phoenix-json-api - phx.gen.json-style JSON views, FallbackController, keyset pagination, hashed API tokens, rate limits
New in 2.6.0:
- phoenix-scopes-and-generators - Phoenix 1.8 scopes: the generated %Scope{} and config :scopes keys, phx.gen.* with --scope/--no-scope, adding an org scope (config entry, plug + on_mount, test helpers), adopting scopes in pre-1.8 apps
- phoenix-tailwind-daisyui - Tailwind v4 in app.css (@source, @plugin, no tailwind.config.js), dynamic class names, daisyUI themes and dark mode, extending core_components (<.input>, <.button>, <.icon>, <.table>), Layouts.app/flash, accessibility
- ecto-migrations-safety - Zero-downtime PostgreSQL migrations: concurrent indexes, migration locks, lock_timeout, NOT NULL/foreign keys via NOT VALID, batched backfills, expand-and-contract renames
- ecto-queries-performance - N+1 and preload strategy, dynamic/subquery/exists composition, counting, Repo.stream, locking and optimistic locking, insert_all bulk upserts, EXPLAIN, query-driven indexes, prepare_query tenancy guards
- http-clients-req - Calling external APIs with Req 0.7: client modules, retries/Retry-After, timeouts, idempotency keys, JSON bodies, SSRF-safe redirects, Finch pools, Req.Test/Mox, telemetry and circuit breaking
Longer reference material lives next to the skill that uses it (skills/<skill>/*.md) and Claude reads it only when needed.
Hooks (ship inside the plugin)
Hooks live in hooks/hooks.json and activate when the plugin is installed. They need jq.