elixir-antipatterns

Identify and fix Elixir/Phoenix anti-patterns during code reviews and refactoring.

Updated May 29, 2025
One-click install
npx skills add https://github.com/crozzbite/DnDApp --skill elixir-antipatterns-crozzbite
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: elixir-antipatterns
Source: https://github.com/crozzbite/DnDApp/tree/main/.agent/skills/elixir-antipatterns
Command: npx skills add https://github.com/crozzbite/DnDApp --skill elixir-antipatterns-crozzbite

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

Reduces the risk of brittle Elixir/Phoenix applications by cataloging and codifying the most impactful anti-patterns, helping teams recognize and remediate common design and implementation flaws.

Core Features & Use Cases

  • Core patterns: covers critical issues such as error handling with tagged tuples, context separation, Ecto query optimization, and testing best practices.
  • Practical guidance: paired with concrete code examples and architecture visuals to facilitate quick improvements during code reviews and refactoring.
  • Extended references: links to the extended.md in assets for a deeper dive into 40+ patterns and advanced techniques.

Quick Start

Load the elixir-antipatterns skill during Elixir/Phoenix code reviews or Phoenix project refactoring to surface and address common anti-patterns immediately.

Frequently Asked Questions about elixir-antipatterns

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

FAQPage Schema
What are common Elixir anti-patterns I should look for during code reviews?

Common Elixir anti-patterns include improper error handling with tagged tuples, poor context separation, unoptimized Ecto queries, and weak testing practices. Identifying these flaws during code reviews reduces the risk of brittle Elixir/Phoenix applications and improves overall code quality.

How do I fix Ecto query anti-patterns when refactoring a Phoenix project?

Fix Ecto query anti-patterns during Phoenix project refactoring by applying codified patterns that optimize database interactions. The skill provides concrete code examples and architecture visuals to guide query remediation and enforce best practices for robust application design.

When do I need to use tagged tuples for error handling in Elixir?

You need tagged tuples for error handling in Elixir when returning operation results to ensure robust pattern matching and prevent silent failures. Codifying this core anti-pattern enforces consistent error handling, reducing brittle application behavior during complex processing.

Does this skill cover advanced Elixir and Phoenix architecture patterns?

Yes, it covers advanced Elixir and Phoenix architecture patterns through extended reference materials. The skill enforces eight core anti-patterns and links to extended documentation covering over 40 patterns and advanced techniques for deeper architectural guidance.

What is the best way to improve context separation in a Phoenix application?

The best way to improve Phoenix context separation is by identifying and remediating boundary anti-patterns using provided architecture visuals and concrete code examples. This enforces proper module boundaries and reduces coupling during refactoring sessions.

Can I use this skill to enforce testing best practices for Elixir code?

Yes, you can use this skill to enforce testing best practices for Elixir code. It explicitly catalogs testing anti-patterns as one of its eight core patterns, providing guidance to recognize and remediate common testing flaws during code reviews.