otp-advisor

otp-advisor is an agent for Claude Code from oliver-kriska/claude-elixir-phoenix. It costs 35 tokens per session (1,782 once invoked), scanned A, original, MIT.

An adviser for OTP, the Elixir system for building concurrent and fault-tolerant applications. It helps choose between processes, functions, Agents, GenServers, supervisors, and related tools.

In plain words
What is it for?
Use it when deciding how to manage state, asynchronous work, shared resources, timeouts, monitoring, or process supervision.
Why use it?
It prevents adding processes just to organize code and helps match each OTP tool to the runtime problem it solves.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; names the NotebookEdit tool.

Part of the phx plugin — 50 skills, 26 agents, 10 hooks shipped together

Good fit Use it when deciding how to manage state, asynchronous work, shared resources, timeouts, monitoring, or process supervision.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/oliver-kriska/claude-elixir-phoenix/otp-advisor
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/oliver-kriska/claude-elixir-phoenix

Made for: Claude Code.

Or install phx, the plugin that ships this one along with the rest of its 50 skills, 26 agents, 10 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for otp-advisor

README.md
[![agentmods](https://agentmods.dev/badge/agents/oliver-kriska/claude-elixir-phoenix/otp-advisor.svg)](https://agentmods.dev/agents/oliver-kriska/claude-elixir-phoenix/otp-advisor)
Your own site
<a href="https://agentmods.dev/agents/oliver-kriska/claude-elixir-phoenix/otp-advisor"><img src="https://agentmods.dev/badge/agents/oliver-kriska/claude-elixir-phoenix/otp-advisor.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,782 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.01782
Opus 5 $0.00017 $0.00891
Sonnet 5 $0.00007 $0.00356
Haiku 4.5 $0.00003 $0.00178

Measured 8d ago against content hash c38d0f9cf61f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

otp-advisor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/elixir-phoenix/agents/otp-advisor.md · 271 lines

How it starts

The opening of the file, as written. The whole thing — 271 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OTP Advisor

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
  2. Do you need state between operations?

    • NO → Use functions or Task for async work
    • YES → Continue
  3. Is it simple get/update only?

    • YES → Use Agent or ETS
    • NO → Continue
  4. Do you need timeouts, monitors, or handle_info?

    • YES → Use GenServer
    • NO → Use Agent
  5. 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

Need Solution Notes
Stateless computation Functions Default choice
Simple get/set state Agent No monitors/timers
Fast key-value lookups ETS Many readers, no serialization
Complex state/coordination GenServer Monitors, timers, handle_info
One-off async work Task Task.Supervisor for production
Dynamic worker pool DynamicSupervisor + Registry Per-user/session processes
Fault tolerance Supervisor Always supervise!

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

Read the full file on GitHub · 271 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 271 lines · 35 tokens per session scan A c38d0f9cf61f

Subscribe to this mod's changes

otp-advisor is an agent published in the GitHub repository oliver-kriska/claude-elixir-phoenix (541 stars, last pushed 3d ago), licensed MIT. It adds 35 tokens to every session and 1,782 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

craft-site-builder

Builds Craft CMS site templates, components, and content architecture.

michtio/craftcms-claude-skills · 16 tokens

software-architect

Selects the technology stack, designs the system architecture, and produces an Architecture Decision Record (ADR) with component designs, data flows, and explicit trade-off analysis. Applies fitness functions and One-Version Rule. Use when the user asks to design a system, choose a tech stack, evaluate architectural…

saitarrun/Sdlc-ai-workflow · 69 tokens

backend-engineer

Implements server-side logic, REST/GraphQL APIs, authentication, authorization, business logic, and database queries. Writes scalable, testable, and maintainable backend code. Use when the user asks to build APIs, implement business logic, or create server-side services.

saitarrun/Sdlc-ai-workflow · 58 tokens

fullstack-engineer

Implements complete features spanning frontend UI and backend APIs. Handles database schema, API endpoints, and component logic end-to-end. Use when the user asks to build a feature that requires both frontend and backend changes.

saitarrun/Sdlc-ai-workflow · 47 tokens

genpage-customapi-builder

Owns ALL GenPage Dataverse Custom API (plug-in) work: it is the single owner of the custom-api feature-flag gate, discovers the Custom APIs a page can bind to (Global and entity-bound Actions/Functions) plus their declared request-parameter kinds, and produces the ## Custom API Bindings contract. Invoked by the…

microsoft/power-platform-skills · 102 tokens

bug-investigator

Use when a bug, regression, or unexpected behaviour needs its root cause traced to specific code before any fix is designed. Investigates only — never edits files. Returns a structured report citing file:line evidence.

kardebadas/claude-plugin · 46 tokens