Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/igmarin-otp-essentials
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, writing, productivity, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/otp-essentials
What's inside
- Skill name
otp-essentials- Description
- MANDATORY for ALL OTP work. Invoke before writing GenServer, Supervisor, Task, or Agent modules. Processes are for concurrency, state, and isolation — not code organization. Keep callbacks thin; pure modules do the work (FCIS). Covers GenServer API, handle_continue, call vs cast, supervision, Task, Agent, Registry, ETS. Trigger words: GenServer, Supervisor, OTP, Task, Agent, Registry, ETS, process, supervision, thin callbacks.
- License
- MIT
- Metadata
- version: 1.0.0 · user-invocable: true
- Instructions
- 264 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# OTP Essentials
Use before any GenServer, Supervisor, Task, Agent, Registry, or ETS work.
Processes **isolate and schedule work**. Modules organize code. Put business logic in pure modules; call them from thin callbacks.
## Quick Reference
| Concern | Do this |
|---------|---------|
| Process purpose | Concurrency / state / isolation — not module layout |
| Callbacks | Thin; pure modules compute |
| Startup I/O | `handle_continue`, not blocking `init/1` |
| Naming | Registry, not dynamic atoms |
| Batch tasks | Handle `async_stream` `{:exit, _}` |
| ETS | `:protected`; writes via owner |
## RULES — Follow these with no exceptions
**1.** **Processes are not modules** — never invent a GenServer just to “group functions”
**2.** **Thin callbacks** — `handle_call` / `handle_cast` / `handle_info` / `perform` only coordinate; pure code computes
**3.** **Fast `init/1`** — defer heavy work with `{:ok, state, {:continue, term}}`
**4.** **Public API module** — callers use `MyApp.Foo.do_thing/1`, never raw `GenServer.call/2`
**5.** **`@impl true`** on every callback
**6.** **Supervise everything long-lived** — no orphan processes
**7.** **Registry over dynamic atoms** for process names
**8.** **ETS**: owner process + `:protected` (or deliberate design); reads can bypass GenServer; writes serialized
**9.** **Handle `async_stream` exits** — match `{:ok, _}` and `{:exit, reason}`
**10.** **Let it crash** under a supervisor — avoid blanket `try/rescue` in callbacks
## Thin GenServer (FCIS)
❌ **Bad:** business logic inside the callback
```elixir
@impl true
def handle_call({:quote, items}, _from, state) do
total =
Enum.reduce(items, 0, fn item, acc ->
if item.active, do: acc + item.price, else: acc
end)
{:reply, total, state}
end
```
✅ **Good:** pure module + thin callback
```elixir
defmodule MyApp.Pricing do
def quote(items), do: Enum.reduce(items, 0, &(&1.price + &2))
end
defmodule MyApp.QuoteServer do
use GenServer
def start_link(opts), do: GenServer.start_link(__MODULE__, opts, name: __MODULE__)
def quote(items), do: GenServer.call(__MODULE__, {:quote, items})
@impl true
def init(_opts), do: {:ok, %{}}
@impl true
def handle_call({:quote, items}, _from, state) do
{:reply, MyApp.Pricing.quote(items), state}
end
end
```
## GenServer skeleton
```elixir
defmodule MyApp.Counter do
use GenServer
# --- Client API ---
def start_link(opts \\ []), do: GenServer.start_link(__MODULE__, 0, Keyword.put_new(opts, :name, __MODULE__))
def value, do: GenServer.call(__MODULE__, :value)
def increment, do: GenServer.cast(__MODULE__, :increment)
# --- Server ---
@impl true
def init(count), do: {:ok, count}
@impl true
def handle_call(:value, _from, count), do: {:reply, count, count}
@impl true
def handle_cast(:increment, count), do: {:noreply, count + 1}
end
```
| Call style | When |
|------------|------|
| `call` | Need a reply or ordering with backpressure |
| `cast` | Fire-and-forget; client must not depend on completion |
| `handle_info` | Messages from monitors, timers, other processes |
## `handle_continue` for heavy startup
❌ **Bad:** block `init/1` with I/O
```elixir
@impl true
def init(opts) do
{:ok, %{data: Loader.load!(opts)}} # delays process start / supervision
end
```
✅ **Good:** continue after the process is up
```elixir
@impl true
def init(opts) do
{:ok, %{opts: opts}, {:continue, :load}}
endFrom igmarin/elixir-phoenix-skills, MIT.
More from igmarin/elixir-phoenix-skills
- 0.585score
phoenix-authorization-patterns
igmarin
Handles all authorization and access control work in Phoenix and LiveView applications.
SkillAFreshness: A★ 5Claude Code +9 - 0.585score
ash-framework
igmarin
MANDATORY when considering, adopting, or working with Ash Framework for Elixir applications.
SkillAFreshness: A★ 5Claude Code +9 - 0.585score
benchee-profiling
igmarin
MANDATORY when profiling and benchmarking Elixir code, or before optimizing performance-critical code.
SkillAFreshness: A★ 5Claude Code +9 - 0.585score
broadway-data-pipelines
igmarin
MANDATORY when building data processing pipelines or consuming message queues.
SkillAFreshness: A★ 5Claude Code +9 - 0.585score
mix-tasks-generators
igmarin
MANDATORY when creating custom Mix tasks or using Phoenix generators.
SkillAFreshness: A★ 5Claude Code +9 - 0.585score
oban-essentials
igmarin
MANDATORY for ALL Oban work.
SkillAFreshness: A★ 5Claude Code +9 - 0.585score
cachex-caching
igmarin
MANDATORY for implementing caching in Elixir applications.
SkillAFreshness: A★ 5Claude Code +9 - 0.585score
phoenix-authentication
igmarin
Use when adding or changing Phoenix authentication, phx.gen.auth integration, LiveView session identity, or migration between current_user and Phoenix 1.8…
SkillAFreshness: A★ 5Claude Code +9 - 0.585score
apply-phoenix-controller-conventions
igmarin
Use when writing new controller code in Phoenix applications.
SkillAFreshness: A★ 5Claude Code +9 - 0.585score
deployment-gotchas
igmarin
MANDATORY for deployment and release configuration.
SkillAFreshness: A★ 5Claude Code +9 - 0.585score
ecto-changeset-patterns
igmarin
MANDATORY for ALL changeset work beyond basic CRUD.
SkillAFreshness: A★ 5Claude Code +9 - 0.585score
ecto-nested-associations
igmarin
MANDATORY for ALL nested association and multi-table work.
SkillAFreshness: A★ 5Claude Code +9
Signals
- Stars
- 5
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 28, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.0.0
- License
- MIT
- Repository
- github.com/igmarin/elixir-phoenix-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from igmarin
- 0.619score
implement-hotwire
igmarin
Use when adding Turbo Frames, Turbo Streams, or Stimulus controllers.
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
optimize-performance
igmarin
Use when investigating N+1s, slow queries, caching, or query plans in Rails.
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
extract-engine
igmarin
Use when extracting a host-app feature into a Rails engine.
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
implement-authorization
igmarin
Use when adding or reviewing Rails authorization with Pundit, CanCanCan, or policy objects.
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
create-engine
igmarin
Use when scaffolding a new Rails engine.
SkillAFreshness: A★ 28Claude Code +9 - 0.619score
seed-database
igmarin
Use when choosing seeds, fixtures, or factories for Rails dev/test data.
SkillAFreshness: A★ 28Claude Code +9
Cite this page
otp-essentials skill. Agent Mart. https://agentmart.dev/skills/igmarin-otp-essentials (last updated 2026-10-24)