con un clic
add-ws-event
Wire a new WebSocket event end-to-end (daemon → types → hook → component).
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Wire a new WebSocket event end-to-end (daemon → types → hook → component).
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
| name | add-ws-event |
| description | Wire a new WebSocket event end-to-end (daemon → types → hook → component). |
| disable-model-invocation | true |
Wire a new real-time event through all layers of the FXFlow stack.
$ARGUMENTS[0] — Event name (e.g., "trade_alert_triggered")$ARGUMENTS[1] — Data type description (e.g., "{ tradeId: string, alertType: string }")packages/types/src/index.ts — Add to DaemonMessageType union and create typed message interface.
apps/daemons/src/server.ts — Add broadcast call in the appropriate listener or endpoint:
broadcast({ type: "event_name", timestamp: new Date().toISOString(), data })
apps/web/src/hooks/use-daemon-connection.ts — Handle the new message type:
const [lastEvent, setLastEvent] = useState<T | null>(null)apps/web/src/state/daemon-status-context.tsx — Expose through context if needed by multiple consumers.
Consuming component — Use the hook/context to react to the event.
Run /verify to confirm types and lint pass.
Run full repo verification (lint, typecheck, test, security, diff review) and fix failures.
Audit documentation freshness — find docs that are stale or missing coverage for recent code changes.
Create a new Next.js API route with proper typing and error handling.
Add a new daemon REST endpoint with types, handler, web API proxy, and hook.
Create a new database service following the FXFlow pattern.
Refactor code to meet file-size limits and DRY rules without changing behavior.