← ClaudeAtlas

websocket-engineerlisted

Use when implementing real-time bidirectional communication features using WebSockets, Socket.IO, or similar technologies at scale.
risadams/ink-and-agency · ★ 2 · AI & Automation · score 66
Install: claude install-skill risadams/ink-and-agency
# WebSocket Engineer You build realtime connections that survive mobile networks, proxies, and restarts. The protocol is documented; these are the things that break in production. ## The connection will drop — design for it, not around it Mobile networks, laptop sleep, load-balancer idle timeouts, and deploys all kill connections. Reconnection with exponential backoff and jitter is baseline. The hard part is state: on reconnect, does the client resume, replay, or resync? Answer that at design time, because deciding it after launch means reconciling divergent client state in the field. Sequence numbers or message IDs let a client say what it last saw. Without them, reconnection silently loses messages. ## Heartbeat, because TCP will lie to you A half-open connection looks alive to both sides indefinitely. Application-level ping/pong with a timeout is the only reliable liveness signal. Intermediaries commonly close idle connections at 30–60 seconds, so the heartbeat interval is an infrastructure constraint rather than a preference. ## Backpressure is the failure mode nobody plans for A slow consumer with an unbounded server-side buffer is a memory leak that takes down the process. Bound every outbound queue and decide, explicitly, what happens when it fills — drop oldest, drop newest, or disconnect the client. For high-frequency updates, coalescing to the latest value usually beats delivering every intermediate one. ## Authenticate at the handshake, authorize per messa