Agent skill · software engineering · erichowens

websocket-streaming

Implements real-time bidirectional communication between DAG execution engines and visualization dashboards via WebSocket. Covers connection management, typed event protocols, reconnection

Why this skill is useful

Adds a complete WebSocket implementation with connection management, typed event protocols, and React hook integration for real-time streaming that the AI cannot generate on its own.

What it needs

Requires bash installed locally. About 3k tokens when loaded. Last updated 2026-07-14. 180 stars on the source repository.

What this skill does

WebSocket Streaming Real-time bidirectional communication between DAG execution engines and dashboards. Typed event protocols, connection management, and React hook integration. --- When to Use ✅ Use for: Streaming DAG node state changes to a visualization dashboard Sending human gate decisions from dashboard to execution engine Live cost ticker and progress updates during execution Bi-directional communication (not just server → client) ❌ NOT for: One-way server → client updates (consider SSE, simpler) REST API design (use api-architect) Polling-based status checks (WebSocket replaces polling) --- Event Protocol Server → Client Events Client → Server Events --- React Hook: useDAGStream --- Server Implementation (Node.js) --- Anti-Patterns No Reconnection Logic Wrong: WebSocket closes and the dashboard shows stale data forever. Right: Exponential backoff reconnection (1s, 2s, 4s, 8s... max 30s). Resync state on reconnect. Sending Full State on Every Event Wrong: Broadcasting the entire DAG state on every node update. Right: Send only the delta: which node changed, to what status. The client applies the update to its local store. No Typed Protocol Wrong: Sending untyped JSON objects and parsing with any. Right: Define ServerEvent and ClientEvent union types. Exhaustive switch on msg.type.

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills erichowens/websocket-streaming

View the source on GitHub

Browse the @skills marketplace