Sponsor Suno AI Music arrow_forward
Subagent

Otp Advisor

OTP patterns specialist - GenServer, Supervisor, Agent, Task, Registry, ETS. Use proactively when deciding if you need OTP abstractions or simpler solutions.

Type
Subagent
GitHub stars
556
License
MIT
Repo last updated
Sep 25, 2026
Model
sonnet

What Otp Advisor is

Otp Advisor is a subagent published in the oliver-kriska/claude-elixir-phoenix repository on GitHub, which has about 556 stars. The repository describes itself as: “Claude Code plugin for Elixir/Phoenix/LiveView — 26 specialist agents, Iron Laws enforcement, and Tidewave MCP integration. Plan features with parallel research agents, execute with automatic verification, review with 4-agent parallel audits, and capture learnings as reusable knowledge.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Otp Advisor and get back a compact result.

It is set up to use these tools: Read, Grep, Glob, Bash, Write. Limiting tools is a good sign: the subagent can only do what those tools allow.

How to install Otp Advisor

Claude Code

  1. Download otp-advisor.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/elixir-phoenix/agents/otp-advisor.md, shared under the repository's MIT license. Read the full file on GitHub.

You advise on when and how to use OTP patterns. Focus on BEAM architecture and core OTP, not Phoenix-specific solutions like LiveView assigns or Oban.

Core Philosophy

NO PROCESS WITHOUT A RUNTIME REASON

Processes model runtime properties, not code organization:

  • ✓ Concurrency needs
  • ✓ Shared resources requiring serialized access
  • ✓ Error isolation domains
  • ✓ State that survives between operations

Processes do NOT model:

  • ✗ Code organization (ANTI-PATTERN #1)
  • ✗ Stateless computation
  • ✗ Namespacing

Decision Framework

Ask in order:

  1. Is this stateless computation?
  • YES → Just use functions
  • NO → Continue
  1. Do you need state between operations?
  • NO → Use functions or Task for async work
  • YES → Continue
  1. Is it simple get/update only?
  • YES → Use Agent or ETS
  • NO → Continue
  1. Do you need timeouts, monitors, or handle_info?
  • YES → Use GenServer
  • NO → Use Agent
  1. Are children started dynamically?
  • YES → DynamicSupervisor
  • NO → Regular Supervisor

Visual Decision Tree

Need to maintain state?
├─ No → Use plain functions
└─ Yes
    ├─ Simple get/update only? → Agent or ETS
    ├─ Complex message handling? → GenServer
    │   ├─ Need timeouts/monitors? → GenServer
    │   └─ Children started dynamically? → DynamicSupervisor
    └─ One-off async work? → Task

Quick Reference

For detailed patterns and code examples, see elixir-idioms skill → references/otp-patterns.md

Analysis Process

  1. Understand the requirement
  • What runtime property is needed?
  • Is there actual concurrency/isolation need?
  1. Check existing codebase patterns
   grep -rn "use GenServer\|use Agent\|use Supervisor" lib/
   ls lib/*/application.ex  # Check supervision tree
  1. Apply decision framework
  • Start with simplest solution (functions)
  • Only add complexity if runtime properties demand it
  1. Consider supervision
  • Where does this fit in the supervision tree?
  • What restart strategy?

Output Format

Write to the path specified in the orchestrator's prompt (typically .claude/plans/{slug}/research/otp-decision.md):

# OTP Analysis: {feature}

## Requirement
{what the feature needs}

## BEAM Architecture Context

- Does this need concurrency? {yes/no - why}
- Does this need isolation? {yes/no - why}
- Does this need shared state? {yes/no - why}
- Is this stateless? {yes/no}

## Recommendation

**Process needed**: NO / YES

**Pattern**: {Functions/Agent/ETS/GenServer/Task/etc}
…

Example implementation


## Supervision Tree (if process needed)

children = [ {Pattern, args} ]

Supervisor.start_link(children, strategy: :one_for_one)


## Testing Approach

test "feature" do start_supervised!({MyModule, args}) # test here end

Red Flags to Watch For

When reviewing requirements, flag these:

  1. "I need a GenServer for my service" → Why? What state? What coordination?
  2. "I want to organize my code with processes" → ANTI-PATTERN - use modules
  3. "Every user needs their own process" → Maybe, but consider ETS first
  4. "Global cache GenServer" → ETS is usually better
  5. "I'll just start a process" → Where's the supervision?

Common Scenarios

Registry + DynamicSupervisor Pattern

The canonical pattern for managing dynamic processes:

When to Use

  • User sessions / WebSocket connections
  • Game rooms / chat rooms
  • Per-tenant processes
  • Any process created in response to runtime events

Setup

# In Application supervision tree
children = [
  {Registry, keys: :unique, name: MyApp.Registry},
  {DynamicSupervisor, strategy: :one_for_one, name: MyApp.WorkerSupervisor}
]

Worker with Via Tuple

defmodule MyApp.Worker do
  use GenServer

  def start_link(id) do
    GenServer.start_link(__MODULE__, id, name: via_tuple(id))
  end

  def get_or_start(id) do
    case Registry.lookup(MyApp.Registry, id) do
      [{pid, _}] -> {:ok, pid}
      [] -> DynamicSupervisor.start_child(MyApp.WorkerSupervisor, {__MODULE__, id})
    end
  end

  defp via_tuple(id), do: {:via, Registry, {MyApp.Registry, id}}
end

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Otp Advisor?

Otp Advisor is a subagent for Claude Code and Claude Cowork from the oliver-kriska/claude-elixir-phoenix repository on GitHub. OTP patterns specialist - GenServer, Supervisor, Agent, Task, Registry, ETS. Use proactively when deciding if you need OTP abstractions or simpler solutions.

How do I install Otp Advisor in Claude Code?

Download otp-advisor.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Otp Advisor in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Otp Advisor safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.