elixir-antipatterns

Codify Elixir/Phoenix anti-patterns for code reviews and refactors.

618|89|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/Gentleman-Programming/Gentleman-Skills --skill elixir-antipatterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: elixir-antipatterns
Source: https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/community/elixir-antipatterns
Command: npx skills add https://github.com/Gentleman-Programming/Gentleman-Skills --skill elixir-antipatterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

Elixir/Phoenix projects often fall into common anti-patterns that erode maintainability and scalability; this skill consolidates core pitfalls and actionable fixes.

Core Features & Use Cases

  • Error handling discipline: Encourages explicit success/failure patterns instead of nils or exceptions.
  • Architectural discipline: Promotes proper separation of concerns with contexts and thin views.
  • Ecto performance guidance: Emphasizes preload strategies, indexing, and efficient queries.
  • Testing best practices: Advocates assertions, isolated tests, and predictable APIs.
  • Reference material: Includes extended patterns for deeper exploration.

Quick Start

Use the elixir-antipatterns skill as a reference during Elixir/Phoenix development work to enforce robust patterns and reduce common mistakes.

Frequently Asked Questions about elixir-antipatterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are common anti-patterns in Elixir and Phoenix development?

Anti-patterns in Elixir/Phoenix include improper error handling with nils or uncaught exceptions, poor separation of concerns in contexts and views, inefficient Ecto queries without preloading, and weak testing practices. This skill codifies these pitfalls with actionable fixes to improve maintainability and scalability.

How do I structure error handling properly in Elixir applications?

Elixir error handling should use explicit success/failure patterns instead of returning nils or raising exceptions. This discipline clarifies control flow, makes failures predictable, and simplifies downstream logic in Phoenix contexts and Ecto operations.

What's the best way to organize Phoenix contexts and avoid architectural mistakes?

Phoenix contexts enforce separation of concerns by isolating business logic from views and routes. Proper context design keeps views thin, centralizes domain logic, and prevents tight coupling—key anti-patterns this skill addresses during refactoring and code review.

How can I optimize Ecto query performance in my Phoenix app?

Optimize Ecto queries by using preload strategies to avoid N+1 queries, adding database indexes on frequently queried columns, and structuring queries for efficiency. This skill guides these practices to prevent performance degradation as your application scales.

What testing practices should I follow in Elixir projects?

Effective Elixir testing emphasizes isolated assertions, predictable APIs, and focused test cases. This skill promotes testing discipline to catch bugs early and maintain confidence during refactoring of Phoenix, Ecto, and LiveView code.