websocket-realtime

Real-time communication patterns with WebSocket, Socket.io, Server-Sent Events, and scaling strategies

Content Preview
---
name: websocket-realtime
description: Real-time communication patterns with WebSocket, Socket.io, Server-Sent Events, and scaling strategies
---

# WebSocket & Real-Time

## WebSocket Server

```typescript
import { WebSocketServer, WebSocket } from "ws";

const wss = new WebSocketServer({ port: 8080 });

const rooms = new Map<string, Set<WebSocket>>();

wss.on("connection", (ws, req) => {
  const userId = authenticateFromUrl(req.url);
  if (!userId) {
    ws.close(4001, "Unauthorized");
    
How to Use

Recommended: Install to project (local)

mkdir -p .claude/skills
curl -o .claude/skills/websocket-realtime.md \
  https://raw.githubusercontent.com/rohitg00/awesome-claude-code-toolkit/main/skills/websocket-realtime/SKILL.md

Skill is scoped to this project only. Add .claude/skills/ to your .gitignoreif you don't want to commit it.

Alternative: Clone full repo

git clone https://github.com/rohitg00/awesome-claude-code-toolkit

Then reference at skills/websocket-realtime/SKILL.md

Related Skills