Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aj-geddes/useful-ai-prompts --skill real-time-features -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/real-time-features/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/real-time-features/

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

Similar skills

All skills for Backend and APIs →

From the same set143

oauth-implementation Guides the setup of OAuth 2.0, OpenID Connect, JWT tokens, and SSO in web and mobile apps. Useful when configuring social logins or securing backend APIs. CX Codex +1 553installs process-mapping A skill that walks the agent through documenting a current workflow, spotting bottlenecks and designing an improved version. CX Codex +1 552installs integration-testing Helps design and implement integration tests for APIs, databases, message queues, and external services. Useful for validating end-to-end interactions between system components. CX Codex +1 551installs memory-optimization A skill for profiling application memory, finding leaks and cutting the footprint. Useful when a process keeps growing or dies with out of memory. CX Codex +1 544installs web-performance-audit This skill measures page load times, finds bottlenecks and points at what to fix. Useful after a big release or when users complain about slowness. CX Codex +1 543installs semantic-versioning A skill for automated SemVer versioning: conventional commits, semantic-release and changelog generation. CX Codex +1 542installs browser-debugging A skill for chasing client-side bugs: JavaScript errors, broken layouts, slow pages. Useful when something misbehaves and the cause isn't obvious. CX Codex +1 540installs mobile-offline-support A skill for designing offline-first mobile apps with local caching, sync queues, and conflict resolution. It handles connection drops and background sync. CX Codex +1 540installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor