From gleam
Guides Claude through building concurrent, fault-tolerant applications with Gleam OTP. Use when creating actors, supervision trees, or building distributed BEAM applications.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gleam:gleam-otp-developmentThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill guides Claude Code through building concurrent, fault-tolerant applications with Gleam OTP.
This skill guides Claude Code through building concurrent, fault-tolerant applications with Gleam OTP.
gleam/otp/actor - Actor processes with type-safe messaginggleam/otp/supervisor - Supervision treesgleam/otp/static_supervisor - Static supervision configurationgleam/otp/task - One-off concurrent tasksgleam/erlang/process - Low-level process operationsSee: Gleam OTP Modules
gleam new my_otp_app
cd my_otp_app
gleam add gleam_otp gleam_erlang
Consult the actor documentation for:
For supervision patterns, see:
Example structure:
Application Supervisor
├── Database Pool Supervisor
│ ├── Connection 1
│ ├── Connection 2
│ └── Connection N
├── Web Server Supervisor
│ ├── HTTP Listener
│ └── Request Handlers
└── Background Job Supervisor
└── Worker Pool
See: Gleam OTP: Using Supervisors
For concurrent one-off operations: Task Module
Alternative with more features: Taskle Library
// State, Message types, start function, handle function
See complete examples: Actor Examples
For worker pool implementation patterns: Gleam OTP Design Principals
For pub/sub patterns, consult:
For process registration and discovery: Process - register
Choose the right restart strategy:
Restart only the failed child. Use for: Independent workers
Restart all children if one fails. Use for: Tightly coupled processes
Restart failed child and all started after it. Use for: Dependent process chains
import gleam/otp/actor
pub fn actor_test() {
let assert Ok(actor.Started(subject, _)) = start_my_actor()
let result = actor.call(subject, waiting: 100, sending: fn(s) { MyMessage(s) })
let assert expected = result
}
Test supervision behavior:
See: Testing Guide
Monitor your OTP application:
iex -S mix # For Elixir projects
erl # For Erlang projects
Then: :observer.start()
Use process monitoring functions: Process - monitor
Integrate logging: Palabres - OTP Logging
Refer to: OTP Anti-Patterns
Key anti-patterns to avoid:
Gleam supports Erlang's hot code reloading, but type safety isn't guaranteed during upgrades.
See: Gleam FAQ - Hot Code Reloading
Use Gleam's Erlang release functionality:
gleam export erlang-shipment
See: Deploying to Fly.io
Use environment variables: Envoy Library
For distributed Erlang clusters, consult:
Find complete OTP application examples:
✅ Use OTP when you need:
❌ Don't use OTP for:
See: OTP Patterns
Remember: OTP is powerful but has specific use cases. Consult official documentation for current patterns and best practices.
Guides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
npx claudepluginhub renatillas/gleam --plugin gleam