$npx skillfedfor your agent

elixir-idioms

A reference for writing idiomatic Elixir code aligned with BEAM architecture and OTP patterns. Covers GenServer, Supervisor, Task, Registry, pattern matching, and the core principles that make concurrent systems reliable—including eleven iron laws never to violate and decision trees for control flow, error handling, and process design.

Elixir Idioms teaches OTP patterns and BEAM architecture for writing concurrent, fault-tolerant systems.

AI-generated summary based on this skill's SKILL.md

507 35 MITupdated by oliver-kriska

Decision gist · record as of 2026-07-27

Elixir Idioms teaches OTP patterns and BEAM architecture for writing concurrent, fault-tolerant systems. A reference for writing idiomatic Elixir code aligned with BEAM architecture and OTP patterns. Covers GenServer, Supervisor, Task, Registry, pattern matching, and the core principles that make concurrent systems reliable—including eleven iron laws never to violate and decision trees for control flow, error handling, and process design.

manual: git clone https://github.com/oliver-kriska/claude-elixir-phoenix → cp -r claude-elixir-phoenix/plugins/elixir-phoenix/skills/elixir-idioms ~/.claude/skills/elixir-idioms
plugins/elixir-phoenix/skills/elixir-idioms/SKILL.md · version 0a7deb37

Use it when

  • elixir-idioms explains OTP patterns including GenServer for stateful processes, Supervisor for fault tolerance and process trees.
  • elixir-idioms covers BEAM architecture—the Erlang virtual machine underlying Elixir—which uses lightweight processes and message passing.

Verify before relying

Read SKILL.md below before installing (10 files). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

oliver-kriska/claude-elixir-phoenix/elixir-idioms · repository language: Python

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What are elixir idioms and best practices for concurrent systems?

elixir-idioms teaches idiomatic Elixir code aligned with BEAM architecture and OTP patterns. Core practices include leveraging pattern matching over conditionals, using tagged tuples for error handling, embracing the pipe operator, and designing with supervision trees. The skill covers GenServer, Supervisor, Task, and Registry—the foundational abstractions for reliable concurrent systems—plus eleven iron laws never to violate and decision trees for choosing between control flow approaches, error strategies, and process types.

How do OTP patterns and GenServer, Supervisor work in Elixir?

elixir-idioms explains OTP patterns including GenServer for stateful processes, Supervisor for fault tolerance and process trees, and Task for fire-and-forget work. GenServer provides call/cast semantics and state management; Supervisor restarts failed children according to strategies (one_for_one, one_for_all, rest_for_one). Together they implement the 'let it crash' philosophy—processes fail and restart cleanly rather than accumulating corruption. The skill includes decision trees for when to use GenServer versus Agent or plain functions.

What is BEAM concurrency design and how does it differ?

elixir-idioms covers BEAM architecture—the Erlang virtual machine underlying Elixir—which uses lightweight processes and message passing instead of threads. Each process has its own heap and garbage collection; processes communicate asynchronously via mailboxes. This model eliminates shared-memory races and makes systems naturally scalable. The skill explains process model fundamentals, memory isolation, and how BEAM-aware design—supervision, pattern matching, and OTP abstractions—leverages these properties for fault tolerance and concurrency.

How should I handle errors in Elixir with tagged tuples?

elixir-idioms teaches error handling strategies centered on tagged tuples: {:ok, result} and {:error, reason}. This pattern is idiomatic across Elixir libraries and integrates with with/1 clauses for clean error propagation. The skill covers when to raise exceptions versus returning error tuples, supervision best practices for letting processes crash and restart, and anti-patterns like swallowing errors or over-defensive coding. Tagged tuples make error flows explicit and composable with pipe operators and pattern matching.

What are common elixir mistakes and anti-patterns to avoid?

elixir-idioms identifies anti-patterns including pattern matching over conditionals, overusing Agent when GenServer is needed, ignoring supervision trees, and defensive coding that masks failures. The skill includes eleven iron laws never to violate—core principles that protect reliability. It also covers when not to use the pipe operator, misuse of guards, and process design mistakes like blocking the scheduler or creating unbounded process trees. Decision trees help you recognize pitfalls and choose idiomatic alternatives.

When should I use Agent versus GenServer in Elixir?

elixir-idioms provides a decision tree for choosing between Agent, GenServer, Task, and plain functions. Agent is a minimal wrapper for simple state; GenServer adds call/cast semantics and lifecycle hooks for complex logic. Use Agent for read-modify-write operations; use GenServer when you need request-response patterns, multiple message types, or init/terminate callbacks. The skill explains trade-offs: Agent is simpler but less flexible; GenServer is more powerful but requires more boilerplate. Task suits one-off async work.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Elixir Idioms

Reference for writing idiomatic Elixir code with BEAM-aware patterns.

Iron Laws — Never Violate These

  1. NO PROCESS WITHOUT A RUNTIME REASON — Processes model concurrency, state, isolation—NOT code structure
  2. MESSAGES ARE COPIED — Keep messages small (except binaries >64 bytes)
  3. GUARDS USE and/or/not — Never use short-circuit operators in guards (guards require boolean operands)
  4. CHANGESETS FOR EXTERNAL DATA — Use cast/4 for user input, change/2 for internal
  5. RESCUE ONLY FOR EXTERNAL CODE — Never use rescue for control flow
  6. NO DYNAMIC ATOM CREATIONString.to_atom(user_input) causes memory leak (atoms aren't GC'd)
  7. @external_resource FOR COMPILE-TIME FILES — Modules reading files at compile time MUST declare @external_resource
  8. SUPERVISE ALL LONG-LIVED PROCESSES — Never bare GenServer.start_link/Agent.start_link in production. Use supervision

(truncated - see the full file via the links below)

File tree — 10 files
plugins/elixir-phoenix/skills/elixir-idioms/SKILL.md
plugins/elixir-phoenix/skills/elixir-idioms/references/anti-patterns.md
plugins/elixir-phoenix/skills/elixir-idioms/references/elixir-118-features.md
plugins/elixir-phoenix/skills/elixir-idioms/references/elixir-120-type-system.md
plugins/elixir-phoenix/skills/elixir-idioms/references/error-handling.md
plugins/elixir-phoenix/skills/elixir-idioms/references/mix-tasks.md
plugins/elixir-phoenix/skills/elixir-idioms/references/otp-patterns.md
plugins/elixir-phoenix/skills/elixir-idioms/references/pattern-matching.md
plugins/elixir-phoenix/skills/elixir-idioms/references/troubleshooting.md
plugins/elixir-phoenix/skills/elixir-idioms/references/with-and-pipes.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Learn OTP patterns and BEAM-aware design for concurrent systems”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

Elixir Idioms
by irahardianto · irahardianto/awesome-agv

This skill covers the core patterns that make Elixir code functional and resilient. Learn pattern matching across function heads and case expressions, build stateful processes with GenServer, and embrace the supervision model's "let it crash" philosophy. The skill also covers pipe-friendly API design, naming conventions, and tools like Credo and Dialyzer for code quality.

MITupdated Jul 2026
★ 150repo stars
ruby
by el-feo · el-feo/ai-context

Master Ruby language conventions and modern features (3.x+) for writing clean, performant code. This skill covers error handling strategies, pattern matching, and Ruby idioms like guard clauses and safe navigation. Use it when writing pure Ruby, optimizing performance, or establishing team conventions—separate skills handle Rails, design patterns, testing, and style.

MITupdated Jul 2026
★ 12repo stars
Spring Boot Idioms
by irahardianto · irahardianto/awesome-agv

Learn idiomatic Spring Boot 3.x patterns grounded in auto-configuration, constructor injection, and actuator-driven observability. Covers dependency injection best practices, Spring Data JPA query methods and projections, REST controller design with DTOs, and structured logging for production readiness. Includes testing patterns for integration and controller slices.

MITupdated Jul 2026
★ 150repo stars
ruby-patterns
by geoffjay · geoffjay/claude-plugins

Ruby Patterns equips you with creational, structural, and behavioral design patterns alongside modern Ruby idioms and metaprogramming techniques. Reference common shortcuts for conditionals, enumerables, and strings, then dive into factory, builder, decorator, strategy, and observer patterns with working examples. Use it to refactor for clarity and apply proven architectural approaches.

MITupdated Nov 2025
★ 8repo stars
django-idioms
by irahardianto · irahardianto/awesome-agv

Learn Django conventions that emphasize model-centric design, clean separation of concerns, and test-driven development. This skill covers best practices for the ORM, views, migrations, and testing frameworks like pytest-django, helping you write maintainable, DRY code aligned with Django's philosophy.

MITupdated Jul 2026
★ 150repo stars
ruby
by miles990 · miles990/claude-software-skills

This skill teaches core Ruby patterns including classes, modules, inheritance, and mixins alongside functional programming with blocks, procs, and lambdas. It covers enumerable operations, lazy evaluation, and metaprogramming techniques like method_missing and dynamic method definition, plus error handling strategies and RSpec testing.

MITupdated Jan 2026
★ 19repo stars
Tags
concurrent-designfault-toleranceactor-modelproduction-patternsbeam-runtimestate-managementmessage-passingcode-structuredebugging-guide