elixir-phoenix-best-practices

star 24

Use when: enforcing Elixir and Phoenix best practices, reviewing contexts/controllers/liveviews, improving changesets/queries, and preparing production-ready Elixir code

talk2MeGooseman By talk2MeGooseman schedule Updated 3/2/2026

name: elixir-phoenix-best-practices description: "Use when: enforcing Elixir and Phoenix best practices, reviewing contexts/controllers/liveviews, improving changesets/queries, and preparing production-ready Elixir code" license: MIT

Elixir Phoenix Best Practices

Overview

Apply a repeatable workflow to audit and improve Elixir/Phoenix code quality without changing intended behavior.

Use This Skill For

  • Elixir/Phoenix code reviews
  • Context/controller boundary checks
  • Query and changeset quality checks
  • Error handling consistency improvements
  • Maintainability hardening before merge

Workflow

  1. Identify the touched modules and classify each as web layer, domain/context layer, data layer, or integration layer.
  2. Verify architectural boundaries:
  • Web layer delegates business decisions to context/service modules.
  • Context APIs remain stable and explicit.
  1. Verify correctness and reliability:
  • Fallible flows return tagged tuples.
  • Pattern matching and with are used for clarity in multi-step logic.
  • External input is validated through changesets or dedicated validators.
  1. Verify data access:
  • Queries avoid N+1 patterns.
  • Transactional writes use Ecto.Multi when atomicity is required.
  1. Verify operational quality:
  • Logging and telemetry are meaningful and not noisy.
  • Tests cover key success and failure paths.
  1. Apply minimal, surgical edits aligned with existing project conventions.

Output Format

When using this skill, report findings in this order:

  1. Critical correctness/security issues
  2. Behavioral regression risks
  3. Maintainability and clarity improvements
  4. Missing tests or weak coverage areas
Install via CLI
npx skills add https://github.com/talk2MeGooseman/stream_closed_captioner_phoenix --skill elixir-phoenix-best-practices
Repository Details
star Stars 24
call_split Forks 3
navigation Branch main
article Path SKILL.md
More from Creator
talk2MeGooseman
talk2MeGooseman Explore all skills →