WebSocket Engineer
Real-time systems: WebSocket implementation, Socket.io patterns, server-sent events, connection management, reconnection strategies, and scaling with Redis pub/sub.
A real-time systems expert who implements WebSocket servers from raw ws to Socket.io rooms, designs reconnection logic with exponential backoff and session resumption, and scales WebSocket connections horizontally using Redis pub/sub as a message broker. Chooses between WebSockets and Server-Sent Events based on use case and browser support requirements.
Added Mar 20, 2026
$npx skills add johnefemer/skillfish --skill websocket-engineer What This Skill Can Do
Concrete capabilities you get when you install this skill.
Build WebSocket servers with ws or Socket.io with room-based pub/sub
Design reconnection logic with exponential backoff and connection state recovery
Scale WebSocket connections across multiple nodes with Redis pub/sub adapter
Implement Server-Sent Events for unidirectional server push with automatic reconnect
Add authentication to WebSocket handshakes with JWT validation
Monitor connection health with heartbeat pings and connection metrics
Real Conversations
See how the WebSocket Engineer skill responds to actual requests. These are representative examples of what your AI agent will produce.
My Socket.io chat app works fine on one server but when I deploy 3 instances behind a load balancer, messages sent by users on instance A don't reach users on instance B. How do I fix this?
You need the Socket.io Redis adapter — it broadcasts events across all instances via Redis pub/sub:
npm install @socket.io/redis-adapter ioredis
import { createServer } from 'http';
import { Server } from 'socket.io';
import { createAdapter } from '@socket.io/redis-adapter';
import { createClient } from 'ioredis';
const httpServer = createServer(app);
const io = new Server(httpServer);
const pubClient = createClient({ url: process.env.REDIS_URL });
const subClient = pubClient.duplicate();
await Promise.all([pubClient.connect(), subClient.connect()]);
io.adapter(createAdapter(pubClient, subClient));
// Now io.to(roomId).emit() broadcasts to all users in the room across ALL instances
io.on('connection', (socket) => {
socket.on('join-room', (roomId) => {
socket.join(roomId);
});
socket.on('message', ({ roomId, text }) => {
io.to(roomId).emit('message', { text, socketId: socket.id });
// ↑ Redis adapter routes this to the correct instance
});
});
Load balancer config — sticky sessions optional but recommended:
upstream socket_servers {
ip_hash; # sticky sessions by client IP (simplifies reconnect)
server app1:3000;
server app2:3000;
server app3:3000;
}
Sticky sessions ensure a client reconnects to the same instance, reducing Redis traffic. Without sticky sessions, you must enable Socket.io's perMessageDeflate: false and ensure the adapter handles transport upgrade correctly.
Get Started
How to install and use this skill in your preferred environment.
Skills are designed for AI coding agents (Claude Code, Cursor, Windsurf) and IDE-based workflows where the agent can read files, run scripts, and act on your codebase.
Models & Context
Which AI models and context windows work best with this skill.
Recommended Models
Claude Sonnet 4 or GPT-4o for WebSocket and Redis pub/sub patterns. Test reconnection logic under real network conditions — simulators often hide timing issues.
Context Window
SKILL.md ~4KB. Fits in 32K context; multi-service real-time system design benefits from 64K+.
Pro tips for best results
Be specific
Include numbers — users, budget, RPS — so the skill can size the architecture.
Share constraints
Compliance needs, team size, and existing stack all improve the output.
Iterate
Start with a high-level design, then ask follow-ups for IaC, cost analysis, or security review.
Combine skills
Pair with companion skills below for end-to-end coverage.
Works Great With
These skills complement WebSocket Engineer for end-to-end coverage. Install them together for better results.
Ready to try WebSocket Engineer?
Install the skill and start getting expert-level guidance in your workflow — any agent, any IDE.
$npx skills add johnefemer/skillfish --skill websocket-engineer