Websocket Implementation
Real-time WebSocket server and client patterns built on Socket.IO, with Redis scaling for multi-server deployments.
- CCM score
- 50 of 100
- skills.sh installs
- 452
- GitHub stars
- 257
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers Socket.IO server setup, client connection handling, a React hook, and a typed message protocol with delivery acknowledgments
- Includes a Redis adapter for horizontal scaling, room-based and per-user message routing, and
/api/ws/statsand/api/ws/healthmonitoring endpoints - Requires token authentication on handshake and authorization on room joins, with client-side message queuing while disconnected
- Designed for chat systems, live notifications, collaborative tools, and real-time dashboards, with a connection-count scaling guide
Install
$ npx -y skills add secondsky/claude-skills --skill websocket-implementation -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
WebSocket Implementation
Build scalable real-time communication systems with proper connection management.
Server Implementation (Socket.IO)
const { Server } = require('socket.io');
const { createAdapter } = require('@socket.io/redis-adapter');
const { createClient } = require('redis');
const io = new Server(server, {
cors: { origin: process.env.CLIENT_URL, credentials: true }
});
// Redis adapter for horizontal scaling
const pubClient = createClient({ url: process.env.REDIS_URL });
const subClient = pubClient.duplicate();
Promise.all([pubClient.connect(), subClient.connect()]).then(() => {
io.adapter(createAdapter(pubClient, subClient));
});
// Connection management
const users = new Map();
io.use((socket, next) => {
const token = socket.handshake.auth.token;
try {
socket.user = verifyToken(token);
next();
} catch (err) {
next(new Error('Authentication failed'));
}
});
io.on('connection', (socket) => {
users.set(socket.user.id, socket.id);
console.log(`User ${socket.user.id} connected`);
socket.on('join-room', (roomId) => {
socket.join(roomId);
socket.to(roomId).emit('user-joined', socket.user);
});
Details
- Repository
- github.com/secondsky/claude-skills
- Categories
- Backend & APIs, Frontend & UI Code
- First seen
- Jun 3, 2026
Questions
What does the websocket-implementation skill do?
The websocket-implementation skill builds real-time WebSocket communication with connection management, room-based messaging, and horizontal scaling. It gives Claude Code working Socket.IO server and client code, a React hook, and a message protocol with delivery acknowledgments.
Who should use the websocket-implementation skill?
The websocket-implementation skill suits developers building chat systems, live notifications, collaborative tools, or real-time dashboards. Its scaling table moves from a single server under 10K connections to Redis pub/sub and then sharded Redis behind a load balancer.
What does websocket-implementation need to run?
The websocket-implementation skill's examples use Socket.IO, the Redis adapter, and a Redis server reached through a REDIS_URL environment variable, plus a CLIENT_URL setting for CORS. Its server code expects a verifyToken helper that you supply for authentication.
How do I install the websocket-implementation skill?
Run npx -y skills add secondsky/claude-skills --skill websocket-implementation -y in your project to install the websocket-implementation skill. Once installed, Claude Code can write its Socket.IO server, client, and room-based messaging code for you.
More from secondsky/claude-skills
All 116- Root Cause Tracing450
- Seo Keyword Cluster Builder450
- Mobile App Debugging449
- Recommendation Engine449
- App Store Deployment448
- Push Notification Setup447
- Api Response Optimization445
- Drizzle Orm D1445
- Api Pagination444
- Api Filtering Sorting442
- Bun Drizzle Integration441
- Session Management441
- Defense In Depth Validation440
- Bun Runtime438
- Nuxt Production435
- Ultracite435
- Bun Docker434
- Bun Tanstack Start434
- Nuxt Ui V4432
- Oauth Implementation432
- Api Gateway Configuration431
- Health Check Endpoints431
- Bun Test Mocking430
- Mobile Offline Support428
Similar to Websocket Implementation
More Backend & APIswebsocket-engineerjeffallan/claude-skills7.5K installsBuild real-time WebSocket and Socket.IO systems with auth, Redis scaling, presence, and rooms.
websocket-realtime-builderpatricio0312rev/skills552 installsReal-time features built on Socket.io, covering auth, rooms, and reconnection handling for live chat and push.
bun-websocket-serversecondsky/claude-skills414 installsBun-native WebSocket server built on Bun.serve, with pub/sub topics, typed connection data, and tuning options.
websocket-developmentmindrally/skills888 installsGuidelines for building real-time WebSocket applications with secure connections, scalable patterns, and tested reliability.
real-time-featuresaj-geddes/useful-ai-prompts550 installsReal-time WebSocket, SSE, and long-polling implementation guidance for chat, dashboards, and live notifications.