Agent skill · Design & Presentation

websocket-patterns

Connection management, room patterns, reconnection strategies, message buffering, and binary protocol design.

vibeevalgithub.com/vibeevalGitHub ↗
claude-codeMIT
Install
npx skills add vibeeval/vibecosystem --skill websocket-patterns --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 7 KB
Bundled scripts: none
Path: skills/websocket-patterns/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 521
Language: C#

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# WebSocket Patterns Production WebSocket patterns for real-time applications. ## Connection Management ```typescript import { WebSocketServer, WebSocket } from 'ws' interface Client { id: string ws: WebSocket rooms: Set<string> lastPing: number metadata: Record<string, unknown> } class ConnectionManager { private clients = new Map<string, Client>() private heartbeatInterval: NodeJS.Timeout constructor(private wss: WebSocketServer) { this.heartbeatInterval = setInterval(() => this.checkHeartbeats(), 30_000) wss.on('connection', (ws, req) => { const clientId = crypto.randomUUID() const client: Client = { id: clientId, ws, rooms: new Set(), lastPing: Date.now(), metadata: { ip: req.socket.remoteAddress } } this.clients.set(clientId, client) ws.on('pong', () => { client.lastPing = Date.now() }) ws.on('close', () => this.removeClient(clientId)) ws.on('error', () => this.removeClient(clientId)) this.send(client, { type: 'connected', clientId }) }) } private checkHeartbeats(): void { const staleThreshold = Date.now() - 45_000 for (const [id, client] of this.clients) { if (client.lastPing < staleThreshold) { client.ws.terminate() this.removeClient(id) } else { client.ws.ping() } } } priva

What's inside
Steps it walks through
  1. Connection Management
  2. Room Pattern
  3. Client-Side Reconnection
  4. Message Protocol Design
  5. Checklist
  6. Anti-Patterns
More from vibecosystem
All skills →
About this skill
What does the websocket-patterns skill do?

Connection management, room patterns, reconnection strategies, message buffering, and binary protocol design.

How do I install it?

Run `npx skills add vibeeval/vibecosystem --skill websocket-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From vibeeval/vibecosystem, a repository with 521 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going