websocket_engineer

Implements WebSocket servers and real-time bidirectional messaging with Socket.IO and Redis scaling.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/jvsandhu/agentic-skills --skill websocket-engineer-jvsandhu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: websocket_engineer
Source: https://github.com/jvsandhu/agentic-skills/tree/main/skills/websocket_engineer
Command: npx skills add https://github.com/jvsandhu/agentic-skills --skill websocket-engineer-jvsandhu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building real-time features like chat, live notifications, and presence tracking requires handling connection lifecycle, authentication, horizontal scaling, and message ordering—details that are easy to get wrong and hard to debug in production. ## Core Features & Use Cases - Server & Client Implementation: Provides Socket.IO, ws, and uWebSockets server setup with event handlers, reconnection logic, and heartbeat configuration. - Horizontal Scaling Guidance: Covers Redis adapter integration, sticky sessions, and load balancer configuration for multi-server deployments. - Security & Reliability Patterns: Enforces JWT/session authentication, CORS restrictions, room/namespace scoping, and connection cleanup to prevent memory leaks. - Use Case: You need to add a live chat feature to your app that must survive server restarts and scale across multiple Node.js instances behind Nginx. ## Quick Start Ask the agent to implement a Socket.IO server with JWT authentication, rooms, and Redis adapter scaling for a live chat feature.

Frequently Asked Questions about websocket_engineer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a WebSocket server with Socket.IO?

Set up a Socket.IO server with event handlers for connection, message, and disconnect events, then configure CORS and authentication before accepting connections. Add heartbeat ping/pong settings to detect dead connections and implement automatic reconnection with exponential backoff on the client.

How to scale WebSockets across multiple servers with Redis?

Use the Socket.IO Redis adapter to broadcast events across server instances via pub/sub. Configure sticky sessions on your load balancer (Nginx or cloud LB) so each client's connection stays pinned to one server during its lifetime.

Socket.IO vs native WebSocket vs SSE: which should I use?

Socket.IO adds rooms, acknowledgments, and automatic reconnection on top of WebSockets, while native ws is lighter for simple use cases. SSE works for one-way server push only; choose WebSockets when you need bidirectional messaging.

How do I authenticate WebSocket connections with JWT?

Validate the JWT during the handshake phase before allowing the connection to emit or join events. Reject unauthenticated handshakes and scope message broadcasting using rooms and namespaces so sensitive data never reaches unauthorized clients.

Why do WebSocket connections drop behind a load balancer?

Dropped connections usually come from missing sticky sessions, idle timeouts on proxies, or absent heartbeat configuration. Enable ping/pong heartbeats, tune proxy timeout values, and verify the load balancer routes reconnecting clients to the same backend.

When should I not use WebSockets for real-time updates?

Avoid WebSockets for simple one-way notifications where SSE or long polling is simpler, and for low-frequency updates where polling suffices. WebSockets add operational complexity in scaling, authentication, and connection state management.