websocket-management
Installation
SKILL.md
WebSocket Connection Management
Production-grade WebSocket connection manager with health verification and capacity management.
When to Use This Skill
- Building real-time features with WebSockets
- Need connection limits (global and per-room)
- Want to detect and clean up stale connections
- Require reliable user-to-connection mapping
Core Concepts
WebSocket connections can appear connected but be stale (client crashed, network dropped). The solution:
- Track connections by lobby/room AND by user ID
- Enforce connection limits (global + per-lobby)
- Ping/pong health verification
- Automatic stale connection cleanup