WebSocket Engineer guides the agent through building bidirectional messaging systems. It analyzes connection scale and latency needs, designs clustering and pub/sub, implements a server with auth, rooms and events, and validates locally before scaling out.
It includes a Socket.IO server with JWT authentication and a Redis adapter, and a client with exponential backoff reconnection and message queueing.
What You Get
- A six-step workflow from requirements to monitoring
- A Socket.IO server example with JWT auth middleware, rooms, presence and a Redis adapter
- A client example with reconnection, jitter and an offline message queue
- Five reference files: protocol, scaling, patterns, security and alternatives such as SSE
Common Use Cases
- Building a chat system with rooms and presence
- Scaling a Socket.IO service across instances with Redis
- Adding token authentication to socket connections
- Choosing between WebSockets, SSE and long polling
What Makes It Unique
It treats scaling as part of the build: the workflow has the agent verify the Redis round trip before enabling the adapter, test sticky sessions across instances, and add alerts for connection spikes. Its rules require heartbeat checks, message queueing during disconnects and cleanup of presence and room state.
Under The Hood
The skill loads SKILL.md and opens a reference file when the task matches its topic. It tells the agent to write server and client code in your project and to test with local commands such as npx wscat against a localhost socket. The examples read secrets such as the JWT secret and the Redis URL from environment variables and connect to Redis. The skill ships no scripts and does not fetch web pages.