real-time-features — Claude Code skill: what it does, how to install
Equips coding assistants with architectural patterns for WebSockets, Server-Sent Events, and long polling. Useful for chat apps, live feeds, and collaborative workspaces.
npx skills add aj-geddes/useful-ai-prompts --skill real-time-features -a claude-codeWhat real-time-features does
The skill provides reference implementations for bidirectional client-server communication. It focuses on instant data synchronization. The materials cover a Node.js WebSocket backend built with the ws package, a React client integration, Server-Sent Events, and a production configuration for Socket.IO.
It enforces operational practices like exponential backoff on reconnection and ping-pong heartbeat mechanisms. Broadcasting sensitive data without encryption breaks privacy, so the guides require payload sanitization and channel-level message segregation.
What it helps with
- build a Node.js WebSocket server with room partitioning
- stream live data feeds using Server-Sent Events
- manage connection retries on React clients
- implement ping-pong heartbeats to catch dropped sockets
Example prompts for the agent
- Create a Node.js WebSocket server using ws with ping-pong heartbeat and room isolation
- Implement a React hook to consume Server-Sent Events with automatic reconnection
- Add message validation and authentication to my Socket.IO handler
How to install real-time-features
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill real-time-features -a claude-code2Manually: put the files in place
~/.claude/skills/real-time-features/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/real-time-features/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill real-time-features -a codex2Manually: put the files in place
.agents/skills/real-time-features/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill real-time-features -a cursor2Manually: put the files in place
.cursor/skills/real-time-features/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aj-geddes/useful-ai-prompts real-time-features2Manually: put the files in place
.github/skills/real-time-features/SKILL.md1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill real-time-features -a gemini-cli2Platform CLI
gemini skills install https://github.com/aj-geddes/useful-ai-prompts --path skills/real-time-featuresManually: put the files in place
.devin/skills/real-time-features/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill real-time-features -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about real-time-features
How do I install real-time-features in Claude Code?
Run npx skills add aj-geddes/useful-ai-prompts --skill real-time-features -a claude-code in your terminal.
What does the real-time-features skill do?
It provides architecture patterns and reference code for real-time networking. The prompts guide the assistant to set up WebSockets, SSE streams, and Socket.IO servers with error handling.
Which real-time technologies does this skill cover?
The included guides detail raw WebSocket servers using the ws package in Node.js, React frontend clients, Server-Sent Events, and Socket.IO deployments.
Source text
SKILL.md · MIT
---
name: real-time-features
description: >
Implement real-time functionality using WebSockets, Server-Sent Events (SSE),
or long polling. Use when building chat applications, live dashboards,
collaborative editing, notifications, or any feature requiring instant
updates.
---
# Real-Time Features
## Table of Contents
- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)
## Overview
Implement real-time bidirectional communication between clients and servers for instant data synchronization and live updates.
## When to Use
- Chat and messaging applications
- Live dashboards and analytics
- Collaborative editing (Google Docs-style)
- Real-time notifications
- Live sports scores or stock tickers
- Multiplayer games
- Live auctions or bidding systems
- IoT device monitoring
- Real-time location tracking
## Quick Start
Minimal working example:
```typescript
// server.ts
import WebSocket, { WebSocketServer } from "ws";
import { createServer } from "http";
interface Message {
type: "join" | "message" | "leave" | "typing";
userId: string;
username: string;
content?: string;
timestamp: number;
}
interface Client {
ws: WebSocket;
userId: string;
username: string;
roomId: string;
}
class ChatServer {
private wss: WebSocketServer;
private clients: Map<string, Client> = new Map();
private rooms: Map<string, Set<string>> = new Map();
constructor(port: number) {
// ... (see reference guides for full implementation)
```
## Reference Guides
Detailed implementations in the `references/` directory:
| Guide | Contents |
|---|---|
| [WebSocket Server (Node.js)](references/websocket-server-nodejs.md) | WebSocket Server (Node.js) |
| [WebSocket Client (React)](references/websocket-client-react.md) | WebSocket Client (React) |
| [Server-Sent Events (SSE)](references/server-sent-events-sse.md) | Server-Sent Events (SSE) |
| [Socket.IO (Production-Ready)](references/socketio-production-ready.md) | Socket.IO (Production-Ready) |
## Best Practices
### ✅ DO
- Implement reconnection logic with exponential backoff
- Use heartbeat/ping-pong to detect dead connections
- Validate and sanitize all messages
- Implement authentication and authorization
- Handle connection limits and rate limiting
- Use compression for large payloads
- Implement proper error handling
- Monitor connection health
- Use rooms/channels for targeted messaging
- Implement graceful shutdown
### ❌ DON'T
- Send sensitive data without encryption
- Keep connections open indefinitely without cleanup
- Broadcast to all users when targeted messaging suffices
- Ignore connection state management
- Send large payloads frequently
- Skip message validation
- Forget about mobile/unstable connections
- Ignore scaling considerations
© aj-geddes · MIT · aj-geddes/useful-ai-prompts