CachiBot: Skill for Claude Code

.claude/skills/cachibot-websocket-event/SKILL.md

cachibot-websocket-event is a skill for Claude Code from jhd3197/CachiBot. It costs 68 tokens per session (1,706 once invoked), scanned A, original, MIT.

A development guide for adding new WebSocket messages and event handlers to CachiBot's real-time system. WebSockets keep a live two-way connection between a server and a browser.

In plain words
What is it for?
Use it to add events such as progress updates, file-upload status, or approval requests across CachiBot's Python backend, TypeScript frontend, and state store.
Why use it?
It helps keep the server, browser code, and application state in agreement when new live events are added.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is jhd3197/CachiBot's own configuration. It tells Claude Code how to work on CachiBot itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything CachiBot configures →

Reuse

Borrowing it

Nothing to install: this file belongs to jhd3197/CachiBot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/jhd3197/CachiBot/main/.claude/skills/cachibot-websocket-event/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/jhd3197/CachiBot

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cachibot-websocket-event

README.md
[![agentmods](https://agentmods.dev/badge/skills/jhd3197/cachibot/cachibot-websocket-event/github.svg)](https://agentmods.dev/skills/jhd3197/cachibot/cachibot-websocket-event)
Your own site
<a href="https://agentmods.dev/skills/jhd3197/cachibot/cachibot-websocket-event"><img src="https://agentmods.dev/badge/skills/jhd3197/cachibot/cachibot-websocket-event/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cachibot-websocket-event

Your own site · 80×15
<a href="https://agentmods.dev/skills/jhd3197/cachibot/cachibot-websocket-event"><img src="https://agentmods.dev/badge/skills/jhd3197/cachibot/cachibot-websocket-event.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,706 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00068 $0.01706
Opus 5 $0.00034 $0.00853
Sonnet 5 $0.00014 $0.00341
Haiku 4.5 $0.00007 $0.00171

Measured 10d ago against content hash 5cb43591b2c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

cachibot-websocket-event scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/cachibot-websocket-event/SKILL.md · 240 lines

How it starts

The opening of the file, as written. The whole thing — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CachiBot WebSocket Event Creation

Add new real-time WebSocket events spanning the backend server, frontend hook, and store integration.

Architecture Overview

Backend (Python)                    Frontend (TypeScript)
─────────────────                   ─────────────────────
websocket.py                        api/websocket.ts
  ├── ConnectionManager               └── WebSocketClient
  ├── WSMessage model                      ├── send(type, payload)
  └── run_agent() handler                  └── onMessage(handler)

models/websocket.py                 hooks/useWebSocket.ts
  ├── WSMessageType enum               └── message handler switch
  └── Payload models                       └── store actions

                                    stores/bots.ts
                                      └── state + actions

Step 1: Backend — Add Message Type

Edit cachibot/models/websocket.py:

class WSMessageType(str, Enum):
    # ... existing types ...
    YOUR_EVENT = "your_event"      # Server -> Client
    YOUR_REQUEST = "your_request"  # Client -> Server (if bidirectional)

Add payload model (if it carries data):

class YourEventPayload(BaseModel):
    """Payload for your_event messages."""

    item_id: str
    status: str
    data: dict = {}

Add a factory method to WSMessage:

class WSMessage(BaseModel):
    type: WSMessageType
    payload: dict = {}

    # ... existing factory methods ...

    @classmethod
    def your_event(cls, item_id: str, status: str, data: dict | None = None) -> "WSMessage":
        return cls(
            type=WSMessageType.YOUR_EVENT,
            payload={"item_id": item_id, "status": status, "data": data or {}},
        )

Step 2: Backend — Send the Event

In the relevant handler (e.g., websocket.py or a service), send the event:

from cachibot.api.websocket import manager

# Send to a specific client
await manager.send(client_id, WSMessage.your_event(
    item_id="abc",
    status="completed",
    data={"result": "..."},
))

# Or broadcast to all clients of a bot
await manager.broadcast(bot_id, WSMessage.your_event(...))

Read the full file on GitHub · 240 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 240 lines · 68 tokens per session scan A 5cb43591b2c8

Subscribe to this mod's changes

cachibot-websocket-event is a skill published in the GitHub repository jhd3197/CachiBot (19 stars, last pushed 6mo ago), licensed MIT. It adds 68 tokens to every session and 1,706 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

eliza-cloud

Use when the task involves Eliza Cloud or elizaOS Cloud as a managed backend, app platform, deployment target, billing layer, or monetization surface. The catch-all skill for any user request about THEIR existing apps / containers / earnings / credits / api-keys / analytics / billing / payment requests / payouts …

elizaOS/eliza · 191 tokens

ai-mcp

Host-side Model Context Protocol (MCP) client for TanStack AI: connect to external MCP servers, discover and run their tools inside any adapter's chat() loop, read resources and prompts, generate TypeScript types (typed tool names/pool keys) with the bundled CLI, and manage lifecycle with close()/await using.

TanStack/ai · 69 tokens

remix

Build and review Remix 3 applications using the remix npm package and subpath imports. Use when working on Remix app structure, routes, controllers, middleware, validation, data access, auth, sessions, file uploads, server setup, UI components, hydration, HMR, navigation, or tests.

TanStack/ai · 65 tokens

ai-persistence/stores

Implement the MessageStore, RunStore, InterruptStore, MetadataStore contracts for @tanstack/ai-persistence against any database. defineAIPersistence, composePersistence overrides, critical invariants (full-replace saveThread, insert-if-absent createOrResume and interrupt create), authorize thread access…

TanStack/ai · 93 tokens

ai-core/chat-experience

End-to-end chat implementation: server endpoint with chat() and toServerSentEventsResponse(), client-side useChat hook with fetchServerSentEvents(), message rendering with UIMessage parts, multimodal content, thinking/reasoning display. Covers streaming states, connection adapters, and message format conversions. NOT…

TanStack/ai · 78 tokens

ai-persistence/build-drizzle-adapter

Use when an app already runs Drizzle ORM and needs TanStack AI chat persistence — writes a chat-persistence.ts into the app against its existing db handle, schema file, and drizzle-kit journal. Covers the four tables (SQLite/Postgres/MySQL), the onConflict idempotency rules, JSON columns, and per-request bindings like…

TanStack/ai · 79 tokens