Skip to content
aj-geddes avatar

Websocket Implementation

Practical WebSocket implementation guide for real-time chat, notifications, and collaborative apps with Redis-backed scaling.

CCM score
39 of 100
skills.sh installs
670
GitHub stars
396
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers Node.js (Socket.IO), browser clients, and Python (aiohttp) servers, plus message types and protocols
  • Includes a Quick Start with reconnection settings and a Redis adapter for horizontal scaling across server instances
  • Lists do and don't guidance on authentication, rate limiting, message acknowledgment, and cleaning up disconnected connections
  • Designed for teams building real-time chat, live notifications, dashboards, or multiplayer features

Install

$ npx -y skills add aj-geddes/useful-ai-prompts --skill websocket-implementation -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

WebSocket Implementation

Table of Contents

Overview

Build scalable WebSocket systems for real-time communication with proper connection management, message routing, error handling, and horizontal scaling support.

When to Use

  • Building real-time chat and messaging
  • Implementing live notifications
  • Creating collaborative editing tools
  • Broadcasting live data updates
  • Building real-time dashboards
  • Streaming events to clients
  • Live multiplayer games

Quick Start

Minimal working example:

const express = require("express");
const http = require("http");
const socketIo = require("socket.io");
const redis = require("redis");

const app = express();
const server = http.createServer(app);
const io = socketIo(server, {
  cors: { origin: "*" },
  transports: ["websocket", "polling"],
  reconnection: true,
  reconnectionDelay: 1000,
  reconnectionDelayMax: 5000,
  reconnectionAttempts: 5,
});

Details

Repository
github.com/aj-geddes/useful-ai-prompts
Categories
Backend & APIs, Frontend & UI Code
First seen
Jun 3, 2026

More from aj-geddes/useful-ai-prompts

All 258

Similar to Websocket Implementation

More Backend & APIs