otp-thinking

Guide Elixir developers in applying OTP patterns for supervision and GenServer designs.

167|14|Updated Dec 26, 2025
One-click install
npx skills add https://github.com/georgeguimaraes/claude-code-elixir --skill otp-thinking
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: otp-thinking
Source: https://github.com/georgeguimaraes/claude-code-elixir/tree/main/plugins/elixir/skills/otp-thinking
Command: npx skills add https://github.com/georgeguimaraes/claude-code-elixir --skill otp-thinking

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps Elixir developers optimize OTP architecture by rethinking GenServer usage, supervision strategies, and fault-tolerant patterns.

Core Features & Use Cases

  • Patterns for GenServer, Task, DynamicSupervisor, Registry, and Supervisors, with guidance on when to apply each.
  • OTP Architecture Guidance: Antipatterns and patterns for designing modular processes, supervision trees, and fault-tolerant systems.
  • Use Case Scenarios: Designing workers for background processing, rate-limited tasks, and resilient concurrency across requests.

Quick Start

Use the otp-thinking skill to outline an OTP design for a queue with retry and backoff.

Frequently Asked Questions about otp-thinking

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

FAQPage Schema
How do I design Elixir OTP supervision trees for fault tolerance?

Designing Elixir OTP supervision trees for fault tolerance involves structuring modular processes using Supervisor and DynamicSupervisor. You should apply specific OTP patterns to isolate failures, manage process lifecycles, and ensure resilient concurrency across requests.

When should I use GenServer handle_call vs handle_cast in Elixir?

Use GenServer handle_call for synchronous requests when you need a reply, and handle_cast for asynchronous fire-and-forget tasks. Choosing correctly prevents OTP bottlenecks and ensures your Elixir processes handle state without blocking.

What is the best way to handle background processing in Elixir: Broadway or Oban?

Choosing between Broadway and Oban for Elixir background processing depends on your specific use case. Broadway excels at data ingestion pipelines, while Oban is better for reliable job scheduling with database persistence and retry capabilities.

How do I avoid GenServer bottlenecks in high concurrency Elixir applications?

To avoid GenServer bottlenecks in high concurrency Elixir applications, evaluate using ETS for concurrent state access instead of a single GenServer. You should also distribute tasks using Task and DynamicSupervisor to parallelize workload processing.

When do I need DynamicSupervisor and Registry in Elixir OTP design?

You need DynamicSupervisor and Registry in Elixir OTP design when dynamically spawning and managing processes at runtime. This combination allows you to start child processes on demand and look them up by name for distributed process tracking.

How do I implement an Elixir queue with retry and backoff using OTP patterns?

Implementing an Elixir queue with retry and backoff requires combining Task and Supervisor patterns to manage failed job restarts. You should structure your OTP supervision tree to handle rate-limited tasks and resilient background workers.