🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

erlang-otp-behaviors

by @wu-uk

Use when oTP behaviors including gen_server for stateful processes, gen_statem for state machines, supervisors for fault tolerance, gen_event for event handl...

Versionv0.1.0
πŸ“‹ Tips & Best Practices

1. Use gen_server for stateful processes to leverage OTP infrastructure and error handling

2. Implement all callback functions even if they return default values for completeness

3. Keep state records simple to reduce complexity and improve maintainability

4. Use handle_cast for fire-and-forget operations without response requirements

5. Implement proper termination in terminate/2 for resource cleanup

6. Set appropriate timeout values to prevent indefinite blocking in calls

7. Use gen_statem for complex state machines with many states and transitions

8. Design supervisor hierarchies that match application component dependencies

9. Use appropriate restart strategies based on child process relationships

10. Test supervisor behavior by intentionally crashing children to verify recovery

View on ClawHub
TERMINAL
clawhub install fix-erlang-ssh-cve-erlang-otp-behaviors

πŸ§ͺ Use this skill with your agent

Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

πŸ” Can't find the right skill?

Search 60,000+ AI agent skills β€” free, no login needed.

Search Skills β†’