# /realtime-feature - WebSockets & Realtime State Synchronizer

> WebSocket handlers, live presence, collaborative state, and SSE feeds.

Canonical: https://www.agentickit.co/commands/realtime-feature
Last updated: 2026-11-18

Implements real-time features: WebSocket servers, Server-Sent Events, live user presence indicators, and multi-user state synchronization.

**Usage:** `Use when building live chat, collaborative editing, or real-time notifications.`

## Pipeline
1. Set up WebSocket / SSE route handler with heartbeat ping/pong
2. Implement channel subscription and client authentication
3. Distribute broadcast messages across nodes via Redis Pub/Sub
4. Connect frontend client with automatic exponential reconnect logic

## Output files
- `src/lib/realtime.ts`
- `src/hooks/useRealtime.ts`
- `src/components/...`

**Claude Code frontmatter:** `argument-hint: [realtime feature description]` · `model: inherit`

## Related
- [realtime-engineer](https://www.agentickit.co/agents/realtime-engineer)
- [backend-architect](https://www.agentickit.co/agents/backend-architect)
- [realtime-websockets](https://www.agentickit.co/skills/realtime-websockets)
- [saas-patterns](https://www.agentickit.co/skills/saas-patterns)
