Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Elixir Phoenix Apps?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/adityaaatiwari-elixir-phoenix-apps)
---
description: Build fault-tolerant Elixir and Phoenix web apps with Ecto changesets, LiveView sockets, and OTP supervision
profile: standard
tags: elixir, phoenix, backend, realtime
---
# Elixir Phoenix apps
Use when building contexts, Ecto queries, controllers, or LiveView modules in Phoenix.
## Contexts and Ecto
- Organize domain boundaries through Phoenix context modules; keep Repo queries inside contexts rather than scattered in controllers or LiveViews.
- Separate Ecto changeset pipelines by use case (`create_changeset`, `update_changeset`) and restrict `cast/3` fields explicitly.
- Preload associations intentionally and prefer `Ecto.Multi` for multi-step writes that must commit or roll back atomically.
## LiveView and OTP
- Keep `mount/3` lightweight: check `connected?(socket)` before subscribing to PubSub topics or loading heavy real-time streams.
- Use `stream/3` instead of plain `assign/3` for large or append-only lists so server memory stays bounded.
- Model long-lived state or background workers under explicit `Supervisor` / `DynamicSupervisor` trees with clear restart strategies.
## Verify
Run `mix format --check-formatted`, `mix compile --warnings-as-errors`, and `mix test` (with `Ecto.Adapters.SQL.Sandbox`).