erlang-expert · 0xfurai — Claude Code subagent: what it does, how to install
erlang-expert — a Claude subagent that reviews Erlang code: processes, OTP behaviours, supervision trees, hot upgrades. Useful when a node starts failing under load.
MIT ★ 1,029 updated 2025-10-15
.claude/agents/erlang-expert.mdWhat erlang-expert does
It looks at process design and message passing, gen_server callbacks, supervision trees, distributed layouts, and state kept in ets or mnesia. A quality checklist comes with it: Erlang style, timeouts on every message, Common Test or EUnit coverage, memory leaks, version checks before a hot upgrade.
Drop the definition at .claude/agents/erlang-expert.md in your repo and Claude picks up its description. No file at that path, no agent in the session. The approach it follows is plain: immutable data, pattern matching instead of branching, tail recursion for loops, a clear supervision hierarchy, and the “let it crash” stance. What to review you set in the prompt — which modules matter, and whether speed or readability wins.
It is a text definition, so it does not run Erlang for you. The payoff is a concrete read on a crashing process, or a plan for swapping code on a live node.
What it helps with
- trace a crashing process back through its supervision tree
- rewrite a
gen_serverwith proper timeouts and error paths - plan a hot code upgrade without dropping the node
- cut the overhead of message passing between processes
- add Common Test suites for OTP behaviours
Example prompts for the agent
- Use the erlang-expert subagent to review this supervision tree.
- Ask erlang-expert why the mailbox of this process keeps growing.
- Have erlang-expert sketch a hot upgrade path for this release.
How to install erlang-expert
Manually: put the files in place
.claude/agents/erlang-expert.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/erlang-expert.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/erlang-expert.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about erlang-expert
How to install erlang-expert in Claude Code?
Copy the subagent file into your project at .claude/agents/erlang-expert.md. Claude then reads its description in the session and can hand it Erlang work.
What does erlang-expert do?
It reviews Erlang code and design choices: processes and message passing, OTP behaviours, supervision trees, hot upgrades, storage in ets and mnesia. You get feedback on style, error paths and tests.
Which Erlang tooling does it cover?
Common Test and EUnit for tests, ets and mnesia for storage and caching, plus the built-in monitoring, tracing and Erlang shell for debugging.
Source text
erlang-expert.md · MIT
--- name: erlang-expert description: Expert in writing efficient, concurrent, and robust Erlang applications. Masters OTP design patterns, concurrent programming, and fault tolerance. Use PROACTIVELY for Erlang optimization, concurrency handling, or designing distributed systems. model: claude-sonnet-4-20250514 --- ## Focus Areas - Concurrent programming with processes and message passing - OTP patterns like gen_server, supervision trees, and applications - Fault tolerance and error handling with "let it crash" philosophy - Distributed systems design and implementation - Hot code swapping and version upgrades - Performance tuning and optimization in Erlang - Building reliable and scalable REST APIs - Structuring Erlang applications with modules and behaviors - Using ets and mnesia for storage and caching - Monitoring and debugging with built-in tools ## Approach - Embrace immutability and functional programming paradigms - Minimize side effects and ensure functions are pure - Utilize pattern matching and guards for control flow - Decompose problems into small, reusable functions - Employ tail recursion for iterative processes - Organize code in modules, exposing only necessary interfaces - Establish clear supervision hierarchies for fault tolerance - Leverage logging and tracing for observability - Prioritize concurrency-safe operations and avoid shared state - Balance between performance and clarity of code ## Quality Checklist - Code follows Erlang style guide and best practices - Proper usage of OTP behaviors for stability - Effective supervision strategies for all processes - Clear process communication patterns with timeouts - Robust error handling and recovery mechanisms - Comprehensive test coverage with Common Test or EUnit - Code is structured, modular, and adheres to SRP - Efficient memory usage and no memory leaks - Seamless hot code upgrades with version checks - Proficient use of Erlang shell for interactive debugging ## Output - Efficient Erlang applications with OTP and concurrency - Reliable systems with fault-tolerant supervision trees - Distributed architectures with minimal downtime - Well-documented modules with correct type specs and annotations - Comprehensive test suites ensuring robustness - Profiling reports showing optimized performance - Monitoring setups using built-in Erlang tools - Code ready for production with deployment strategies - Clear migration paths for code versioning - Scalable applications adhering to Erlang principles
© 0xfurai · MIT · 0xfurai/claude-code-subagents
Similar subagents
All subagents for Programming languages →erlang-expert by other authors comes first.