Agent skill · software engineering · secondsky

websocket-implementation

Implements real-time WebSocket communication with connection management, room-based messaging, and horizontal scaling. Use when building chat systems, live notifications, collaborative tools, or real-time dashboards.

Why this skill is useful

Adds a complete WebSocket implementation with connection management, room-based messaging, and horizontal scaling scripts that aren't commonly found in public documentation.

What it needs

Requires redis, socket.io, socket.io-client installed locally. About 3k tokens when loaded. Last updated 2026-08-06. 204 stars on the source repository.

What this skill does

WebSocket Implementation Build scalable real-time communication systems with proper connection management. Server Implementation (Socket.IO) Client Implementation React Hook Message Protocol Additional Implementations See references/python-websocket.md for: Python aiohttp WebSocket server FastAPI WebSocket endpoints Async connection handling Scaling Considerations Connections Architecture ------------- -------------- <10K Single server 10K-100K Redis pub/sub >100K Sharded Redis + load balancer Monitoring Endpoints Best Practices Authenticate before allowing operations Implement reconnection with exponential backoff Use rooms and channels for targeted broadcasting Add heartbeat/ping for connection health Persist important messages to database Monitor active connection counts Display user presence/availability status Implement rate limiting on incoming messages Use acknowledgments to confirm message delivery Leverage Redis for distributed deployments Implement comprehensive error handling Never Do Send sensitive data unencrypted Store unlimited messages in memory Skip authorization on room joins Ignore connection error handling Allow unbounded room subscriptions Neglect cleanup of disconnected user data Send frequent oversized message payloads Include authentication credentials in message bodies Deploy without security validation Allow uncontrolled connection accumulation Build without scalability consideration

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills secondsky/websocket-implementation

View the source on GitHub

Browse the @skills marketplace