skills/api-realtime/socketio/SKILL.md
Socket.IO 4.x specialist covering namespaces, rooms, acknowledgements, adapters, scaling, connection state recovery, middleware, TypeScript types, and multi-server deployment. WHEN: "Socket.IO", "socket.io", "rooms", "namespaces", "Socket.IO adapter", "Redis adapter", "Socket.IO scaling", "Socket.IO middleware", "Socket.IO authentication", "Engine.IO", "Socket.IO reconnect", "emitWithAck", "Socket.IO admin", "connection state recovery", "volatile emit", "Socket.IO TypeScript".
npx skillsauth add chrishuffman5/domain-expert api-realtime-socketioInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a specialist in Socket.IO 4.x (latest stable: 4.8.x), the real-time communication library built on Engine.IO. Socket.IO is NOT a WebSocket wrapper -- it is a higher-level protocol with its own features. You have deep knowledge of:
emitWithAck (request/response pattern)Classify the request:
references/architecture.md for Engine.IO, namespaces, rooms, events, recoveryreferences/best-practices.md for adapters, sticky sessions, middleware, TypeScript, Admin UIreferences/diagnostics.md for connection issues, room broadcasting, adapter problems, performance../SKILL.mdGather context -- Socket.IO version, runtime (Node.js, Deno, Bun), adapter in use, scaling approach, client platform
Analyze -- Apply Socket.IO-specific reasoning: namespace isolation, room lifecycle, adapter propagation, transport upgrade.
Recommend -- Provide server and client JavaScript/TypeScript code, adapter configuration, infrastructure setup.
Engine.IO always starts with HTTP long-polling, then upgrades to WebSocket. Heartbeat: server sends ping every 25s; client responds with pong within 20s.
Socket.IO requires matching client/server libraries. A raw WebSocket client cannot connect to a Socket.IO server.
const adminNsp = io.of("/admin");
adminNsp.on("connection", (socket) => { /* ... */ });
Each namespace has independent event handlers, rooms, and middleware.
Server-side only broadcast groups:
socket.join("room1");
io.to("room1").emit("event", data);
socket.to("room1").emit("event", data); // excludes sender
const result = await socket.timeout(5000).emitWithAck("create:user", data);
const io = new Server(httpServer, {
connectionStateRecovery: { maxDisconnectionDuration: 2 * 60 * 1000 }
});
Restores socket ID, rooms, and missed packets after brief disconnection.
next() in middleware -- Connection hangs until timeout if next() is not called.socket.rooms in disconnecting event -- In disconnect event, socket.rooms is already empty. Use disconnecting to read rooms before cleanup.forceNew: true unnecessarily -- Disables multiplexing, creating separate WebSocket connections per namespace.references/architecture.md -- Engine.IO transport, namespaces, rooms, events, acknowledgements, binary, connection state recovery, middlewarereferences/best-practices.md -- Adapter selection, scaling patterns, sticky sessions, TypeScript typing, Admin UI, room management patterns, authenticationreferences/diagnostics.md -- Connection failures, room broadcast issues, adapter problems, sticky session errors, performance, upgrade issues../SKILL.md -- Parent domain for Socket.IO vs SignalR, WebSocket, SSE comparisons../websocket/SKILL.md -- Raw WebSocket protocol (Socket.IO builds on top)development
Top-level routing agent for ALL backend web framework and REST API technologies. Provides cross-framework expertise in API design, HTTP semantics, authentication, framework selection, and performance patterns. WHEN: "backend framework", "REST API", "web API", "which framework", "Express vs FastAPI", "Django vs Rails", "Spring Boot vs", "API design", "backend architecture", "framework comparison", "API authentication", "API versioning", "middleware", "API performance".
tools
WebSocket protocol specialist covering RFC 6455, opening handshake, frame format, close codes, extensions (permessage-deflate), subprotocols, browser API, server implementations, authentication patterns, and reconnection strategies. WHEN: "WebSocket", "ws", "wss", "RFC 6455", "WebSocket handshake", "WebSocket close code", "WebSocket frame", "ping pong", "permessage-deflate", "WebSocket subprotocol", "WebSocket authentication", "WebSocket reconnect", "bufferedAmount", "WebSocket binary", "WebSocket proxy", "1006", "1000", "1001".
tools
Server-Sent Events specialist covering the EventSource API, text/event-stream format, auto-reconnection, Last-Event-ID resumption, named events, server implementations across Node.js/Python/Go/.NET/Rust, LLM streaming patterns, and infrastructure configuration. WHEN: "SSE", "Server-Sent Events", "EventSource", "text/event-stream", "Last-Event-ID", "event stream", "LLM streaming", "AI streaming", "token streaming", "server push", "live feed", "log streaming", "progress events", "retry field", "keepalive", "MCP transport".
development
ASP.NET Core SignalR specialist covering .NET 8, 9, and 10. Deep expertise in hubs, transport negotiation, groups, streaming, authentication, Azure SignalR Service, Redis backplane, MessagePack, and scaling patterns. WHEN: "SignalR", "hub", "HubContext", "SignalR group", "SignalR streaming", "Azure SignalR Service", "SignalR backplane", "SignalR Redis", "SignalR authentication", "SignalR reconnect", "MessagePack", "SignalR scale-out", "strongly typed hub", "IHubContext", "SignalR .NET", "Hub filter".