Websocket Engineer

Use when building real-time communication systems with WebSockets or Socket.IO.

Development / Engineeringdevelopmentengineering
by AgentVoltv1.0.0Published 1y ago1 install
Free to sign up · every skill included with AgentVolt Pro

Before & after

Same prompt, same agent — the only difference is the skill.

PromptBuild real-time chat with WebSocket support
Beforegeneric AI agent
Real-time communication is definitely possible with WebSockets. You'll need to set up a server that can handle persistent connections, then build a client-side handler for incoming messages. You might want to consider Socket.IO on top of WebSockets for some convenience features like automatic reconnection. Scaling real-time systems can get complex though, especially if you need multiple server instances. There are various approaches to handling presence and rooms, so it depends on your architecture.
Afterwith Websocket Engineer
REAL-TIME CHAT ARCHITECTURE

CORE SETUP:
→ Socket.IO (WebSocket abstraction with fallback to polling)
→ Redis adapter for multi-server horizontal scaling
→ Namespace pattern: /chat for chat logic

BIDIRECTIONAL MESSAGING:
1. Client emits: socket.emit('message', {text, timestamp})
2. Server broadcasts: socket.to(roomId).emit('message', payload)
3. Client listens: socket.on('message', handleIncomingMessage)
4. Acknowledge delivery: server responds with ACK callback

PRESENCE TRACKING:
• User joins room: socket.join(roomId)
• Emit roster to all clients on join/leave
• Track last-seen timestamp per user
• Graceful cleanup on disconnect

ROOM MANAGEMENT:
→ Create room on demand
→ Store active room list in Redis for persistence
→ Automatic room cleanup after 30 min inactivity
→ Max 500 concurrent users per room (tunable)

SCALING WITH REDIS:
• Adapter = redis.createAdapter(redisClient)
• Messages broadcast across all server instances
• Session storage in Redis (not memory)
• Reconnection handler restores subscriptions

ERROR HANDLING:
→ Reconnection backoff: 1s, 3s, 10s, 30s
→ Message queue (50-msg buffer) during disconnection
→ Server-side timeout after 10min inactivity

About this skill


name: websocket-engineer description: Use when Use when building real-time communication systems with WebSockets or Socket.IO.

Websocket Engineer

Use when building real-time communication systems with WebSockets or Socket.IO. Invoke for bidirectional messaging, horizontal scaling with Redis, presence tracking, room management.

What you get

  • Public GitHub repo
  • the skills/websocket-engineer folder with SKILL.md and references.

Customize your output

  • Fork the repo and extend the skill's reference files for your own stack conventions.

Example output

Activates on a matching request (e.g. building or reviewing Websocket Engineer code) and can chain with other skills in the pack.

Best for

Full-stack developers and engineering teams using Claude Code.

SKILL.md preview

SKILL.md
---
name: websocket-engineer
description: Use this skill when building real-time communication systems with WebSockets or Socket.IO, including scaling, presence tracking, and room management.
version: 1.0.0
category: Development / Engineering
author: AgentVolt
license: proprietary
tags:
  - development
  - engineering
---

# Websocket Engineer

Builds real-time systems on WebSockets or Socket.IO: bidirectional messaging, horizontal scaling with a shared pub/sub layer, presence tracking, and room-based message routing.

## When to use

… (sign up to view the full skill)
Sign up to view, copy, and install the full skill

More development skills

View all Development skills →