cachibot-websocket-event

Add real-time WebSocket message types and handlers across CachiBot backend and frontend.

18|2|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/jhd3197/CachiBot --skill cachibot-websocket-event
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cachibot-websocket-event
Source: https://github.com/jhd3197/CachiBot/tree/main/.claude/skills/cachibot-websocket-event
Command: npx skills add https://github.com/jhd3197/CachiBot --skill cachibot-websocket-event

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Coordinating real-time WebSocket events across CachiBot's backend and frontend is error-prone and time-consuming, leading to mismatched message types, missing payload schemas, and frontend stores that don't reflect live state. This Skill provides a clear, end-to-end process for adding new server-to-client and client-to-server message types so events stream reliably and are handled consistently across the stack.

Core Features & Use Cases

  • Backend integration: Extend WSMessageType enums, define payload models, and add WSMessage factory methods to produce strongly-typed events.
  • Runtime delivery: Emit events from websocket handlers or run_agent loops using manager.send or manager.broadcast for targeted or broadcast updates.
  • Frontend handling: Add TypeScript message types, implement message switches in useWebSocket, and update Zustand stores to reflect live progress, approvals, or status changes.
  • Use Cases: Live progress updates for long-running agent tasks, streaming file upload status, approval request workflows, and bidirectional client-initiated control messages.

Quick Start

Add a new server-to-client 'your_event' by extending WSMessageType and payload models in the backend, sending the event via manager.send or broadcast from the appropriate handler, then add TypeScript types, a useWebSocket handler, and a store action to process the incoming payload.

Frequently Asked Questions about cachibot-websocket-event

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new WebSocket event type for real-time streaming in a Python and TypeScript stack?

To add a WebSocket event, extend the WSMessageType enum and define payload models in Python, then emit events using manager.send or broadcast, and implement matching TypeScript types and Zustand store actions in the frontend.

What is the best way to handle live progress updates for long-running tasks over WebSockets?

Live progress updates are handled by streaming server-to-client events via manager.broadcast from the backend runtime, then processing the incoming payloads through a useWebSocket hook and updating the Zustand store on the frontend.

How do I implement an approval workflow using bidirectional WebSocket messages?

Approval workflows use bidirectional WebSocket messages by sending server-to-client approval requests via manager.send, then handling the client-initiated responses through TypeScript message switches and corresponding Python websocket handlers.

Can I use Zustand to manage realtime state changes from WebSocket server-client streaming?

Yes, Zustand manages realtime state by implementing store actions that process incoming WebSocket payloads, allowing the frontend to reflect live status changes, streaming progress, and approvals directly from server events.

Why do my WebSocket event payloads show mismatched schemas between the Python backend and TypeScript frontend?

Mismatched schemas occur when backend payload models and frontend TypeScript types are not updated together, requiring strongly-typed WSMessage factory methods in Python to align with exact frontend message handler definitions.