Centrifugo
pedronauck/skills
Centrifugo real-time messaging server expert for WebSocket PUB/SUB, channel management, JWT authentication, event proxying, and horizontal scaling with Redis/NATS.
How Circuit Breaker moves data between backend and frontend — the NATS internal bus, Redis pub/sub, the WebSocket stream endpoints and their first-message JWT handshake, SSE log/event streams, and…
$ npx skills add BlkLeg/CircuitBreaker --skill cb-realtime-api -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install BlkLeg/CircuitBreaker cb-realtime-api --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/BlkLeg/CircuitBreaker.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/cb-realtime-api .claude/skills/cb-realtime-api && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "cb-realtime-api" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-realtime-api into .claude/skills/cb-realtime-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-realtime-api", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-realtime-apiType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add BlkLeg/CircuitBreaker --skill cb-realtime-api -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install BlkLeg/CircuitBreaker cb-realtime-api --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/BlkLeg/CircuitBreaker.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/cb-realtime-api .agents/skills/cb-realtime-api && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cb-realtime-api" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-realtime-api into .agents/skills/cb-realtime-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-realtime-api", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add BlkLeg/CircuitBreaker --skill cb-realtime-api -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install BlkLeg/CircuitBreaker cb-realtime-api --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/BlkLeg/CircuitBreaker.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/cb-realtime-api .cursor/skills/cb-realtime-api && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "cb-realtime-api" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-realtime-api into .cursor/skills/cb-realtime-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-realtime-api", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/BlkLeg/CircuitBreaker.git --path .claude/skills/cb-realtime-api--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add BlkLeg/CircuitBreaker --skill cb-realtime-api -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install BlkLeg/CircuitBreaker cb-realtime-api --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/BlkLeg/CircuitBreaker.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/cb-realtime-api .gemini/skills/cb-realtime-api && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "cb-realtime-api" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-realtime-api into .gemini/skills/cb-realtime-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-realtime-api", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install BlkLeg/CircuitBreaker cb-realtime-apiInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add BlkLeg/CircuitBreaker --skill cb-realtime-api -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/BlkLeg/CircuitBreaker.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/cb-realtime-api .github/skills/cb-realtime-api && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "cb-realtime-api" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-realtime-api into .github/skills/cb-realtime-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-realtime-api", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add BlkLeg/CircuitBreaker --skill cb-realtime-api -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install BlkLeg/CircuitBreaker cb-realtime-api --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/BlkLeg/CircuitBreaker.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/cb-realtime-api .opencode/skills/cb-realtime-api && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "cb-realtime-api" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-realtime-api into .opencode/skills/cb-realtime-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-realtime-api", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
cb-realtime-apiHow Circuit Breaker moves data between backend and frontend — the NATS internal bus, Redis pub/sub, the WebSocket stream endpoints and their first-message JWT handshake, SSE log/event streams, and…
Cb Realtime API is an agent skill from BlkLeg/CircuitBreaker. How Circuit Breaker moves data between backend and frontend — the NATS internal bus, Redis pub/sub, the WebSocket stream endpoints and their first-message JWT handshake, SSE log/event streams, and the axios API client. Use this whenever adding or changing a WebSocket or SSE endpoint, publishing or subscribing to a NATS subject, wiring a React hook to live data, adding or renaming a REST endpoint or response field, debugging a stream that will not connect or reconnect, or auditing whether the frontend and backend…
Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs, covering Realtime and WebSockets, API design and Event-driven systems. It works with Redis. The repository describes itself as: Bring your homelab to life. A self-hosted IPAM and service mapper that visualizes complex hardware, compute, and network relationships in real-time. The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit fc44f2e. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python, json and bash).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
NATS_AUTH_TOKENFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Cb Realtime API loads about 1.7k tokens when it runs. Until then it costs about 141 tokens; SKILL.md has 719 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from BlkLeg/CircuitBreaker at commit fc44f2e, republished under its MIT licence (© BlkLeg). 719 words, ~1,699 tokens.
.claude/skills/cb-realtime-api/SKILL.md (or your agent's skills folder).Three mechanisms, each with a job. Picking the wrong one is the most common mistake here, so start from the question "who needs this, and when?"
| Transport | Use it for | Where |
|---|---|---|
| NATS | Backend-internal fan-out between API, workers, and agents | core/nats_client.py, subjects in core/subjects.py |
| Redis pub/sub | Backing store for WS push; last-value cache | core/redis.py |
| WebSocket | Bidirectional browser streams where the client subscribes | api/ws_*.py |
| SSE | One-way server→browser append streams (logs, events) | api/events.py, api/logs.py |
| REST | Everything else | api/*.py ↔ apps/frontend/src/api/*.js |
NATS is the internal bus and never reaches the browser directly. A worker
publishes to a subject; the API process subscribes and relays to connected
sockets. Authentication is NATS_AUTH_TOKEN, which docker-compose.yml
requires with :? — there is no unauthenticated bus.
Every subject lives in app/core/subjects.py under <domain>.<entity>.<event>:
from app.core.subjects import DISCOVERY_SCAN_PROGRESS, TELEMETRY_INGEST
await nats.publish(DISCOVERY_SCAN_PROGRESS, {"scan_id": scan_id, "pct": 42})
await nats.publish(TELEMETRY_INGEST.format(hardware_id=hw.id), payload)Import the constant rather than typing the string. A hard-coded subject is
invisible to the subscriber side when someone renames an event, and the failure
mode is silent: the publish succeeds, nobody is listening, and the feature just
stops updating. Subjects with {...} placeholders are formatted at publish
time and have a matching .> wildcard for subscribers.
NatsClient.publish buffers on failure and resubscribes registered subjects
after a reconnect, so a dropped bus recovers on its own. Do not add retry loops
around it.
Five streams, all mounted at /stream under their router prefix:
WS /api/v1/discovery/stream ws_discovery.py
WS /api/v1/telemetry/stream ws_telemetry.py
WS /api/v1/topology/stream ws_topology.py
WS /api/v1/monitors/stream ws_monitors.py
WS /api/v1/agents/stream ws_agents.pyAll five are mounted with Depends(require_auth) in main.py. The agent
/enroll and /link sockets are the one router mounted without it, because
their Noise IK handshake is the authentication — that exception is deliberate
and documented at the mount site.
The handshake is identical everywhere, and new streams must match it:
{"status": "connected"}.Server-side that means token_from_websocket_scope, decode_token,
is_session_revoked, and ws_require_wss from core/auth_cookie.py and
core/security.py. There is no anonymous path — see the cb-security-hardening
skill, which treats a WS handler without JWT validation as a security defect.
Policy rejections close with 1008 and an {"error": "..."} frame
(unauthorized, auth_timeout, subscription_limit_exceeded). This matters
because the client uses the code to decide whether to retry: 1008 must not
trigger reconnection, or a revoked session becomes a reconnect storm.
Subscription frames follow the ws_telemetry.py shape:
{"subscribe": [5, 12, 34]} {"unsubscribe": [12]} {"type": "ping"}Cap total distinct channels per connection and reject overflow rather than letting one socket subscribe to everything.
Hooks live in apps/frontend/src/hooks/*.js — useDiscoveryStream,
useTelemetryStream, useAgentLive, useConnectionState. Read
useDiscoveryStream.js before writing a new one; its header documents the
contract and it is the reference implementation.
Established behavior worth preserving:
App.jsx), not per page —
it must survive navigation, and per-component sockets multiply silently.auth_timeout — the credential is the
problem, and retrying only burns the server.Redis being unavailable degrades a stream to "connected but silent"; the client falls back to REST polling. Keep that path working rather than failing the socket outright.
Backend : apps/backend/src/app/api/*.py
Frontend : apps/frontend/src/api/*.js (axios, via client.jsx)The frontend never calls fetch inline. api/client.jsx is the single axios
instance and it already handles 401 session expiry, 422 field-error extraction
into {field: message}, 5xx user-facing messages, and server clock recording.
A new endpoint gets a function in the matching api/*.js module so every caller
inherits that behavior.
API conventions: snake_case JSON both directions, errors as
{"detail": "message"}, and 422 validation errors as the FastAPI array shape
that extractFieldErrors already understands.
When OOBE breaks or a page renders empty fields, the usual cause is a schema that moved without its caller. Compare the two sides directly:
grep -rhoE "'/[a-z0-9/_{}-]+'" apps/frontend/src/api/*.js | sort -u
grep -rhoE '@router\.(get|post|put|patch|delete)\("[^"]+"' apps/backend/src/app/api/*.py | sort -uReport gaps as a table, then fix backend-first — schema, then service, then route, then the frontend module — so the frontend is never written against an endpoint that does not exist yet:
| Frontend call | Backend endpoint | Gap | Fix |
|---|
Changing a response field is a breaking change. Add the new field alongside the old one and migrate callers rather than renaming in place; self-hosted users upgrade on their own schedule and a half-updated deployment should still work.
© BlkLeg, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/cb-realtime-api of BlkLeg/CircuitBreaker.
Open the folder on GitHubat commit fc44f2e
Cb Realtime API next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Cb Realtime API this skillBlkLeg/CircuitBreaker | 201 | — | ~1.7k | Automated safety check: Pass | MIT | |
| Centrifugopedronauck/skills | 634 | — | ~3.1k | Automated safety check: Pass | None | |
| API Conventionshuangjia2019/claude-code-engineering | 1.1k | 1 repos | ~398 | Automated safety check: Pass | None | |
| WooCommerce Store API Routeswoocommerce/woocommerce | 11k | — | ~932 | Automated safety check: Pass | Custom licence | |
| Discover APIrand/cc-polymath | 181 | 1 repos | ~1.5k | Automated safety check: Pass | MIT | |
| Domain Webfjrevoredo/mini-diarium | 308 | 1 repos | ~1k | Automated safety check: Pass | MIT |
pedronauck/skills
Centrifugo real-time messaging server expert for WebSocket PUB/SUB, channel management, JWT authentication, event proxying, and horizontal scaling with Redis/NATS.
huangjia2019/claude-code-engineering
API design patterns and conventions for this project. An agent skill from huangjia2019/claude-code-engineering.
woocommerce/woocommerce
Guidelines for adding or changing routes in the WooCommerce Store API under /wc/store/v1, covering authentication, REST design, schemas and variations.
rand/cc-polymath
Automatically discover API design skills when working with REST APIs, GraphQL schemas, API authentication, OAuth, JWT, rate limiting, API versioning, error handling, or endpoint design.
fjrevoredo/mini-diarium
A skill your agent uses when building web services. An agent skill from fjrevoredo/mini-diarium.
gjovanovicst/golang-auth-api
Complete module inventory of the Auth API project with file paths, dependencies, and architecture overview.
BlkLeg/CircuitBreaker
How Circuit Breaker is built, tested, packaged, and kept secret-safe — the make dev/verify/test targets, the PostgreSQL integration test database and its fixtures, the mono Docker image and native…
BlkLeg/CircuitBreaker
Circuit Breaker code conventions and the quality gates that actually block a push — ruff, mypy, eslint, the pytest coverage ratchet, and the make verify tiers.
BlkLeg/CircuitBreaker
How a Circuit Breaker release is cut, approved, published and followed up — the candidate→approval→promote flow in release.yml, the release environment gate, the make release- targets, the…
BlkLeg/CircuitBreaker
Enforces Circuit Breaker security hardening conventions across backend, frontend, Docker, and nginx.
BlkLeg/CircuitBreaker
The maintenance automation around Circuit Breaker — which bots and scheduled workflows exist (Discord notifications, ledger watch, branch cleanup, Dependabot lockfile sync, the required-checks…
Works with
Categories
How Circuit Breaker moves data between backend and frontend — the NATS internal bus, Redis pub/sub, the WebSocket stream endpoints and their first-message JWT handshake, SSE log/event streams, and…. Cb Realtime API is an agent skill from BlkLeg/CircuitBreaker. How Circuit Breaker moves data between backend and frontend — the NATS internal bus, Redis pub/sub, the WebSocket stream endpoints and their first-message JWT handshake, SSE log/event streams, and the axios API client.
Cb Realtime API fits situations like: tasks that involve Realtime and WebSockets; tasks that involve API design; tasks that involve Event-driven systems.
Run `npx skills add BlkLeg/CircuitBreaker --skill cb-realtime-api -a claude-code`. Or copy the skill folder (.claude/skills/cb-realtime-api in BlkLeg/CircuitBreaker) into .claude/skills/cb-realtime-api in your project. Claude Code loads it when a task matches its description.
Run `npx skills add BlkLeg/CircuitBreaker --skill cb-realtime-api -a codex`. Or copy the skill folder (.claude/skills/cb-realtime-api in BlkLeg/CircuitBreaker) into .agents/skills/cb-realtime-api in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add BlkLeg/CircuitBreaker --skill cb-realtime-api -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cb-realtime-api, .gemini/skills/cb-realtime-api, .github/skills/cb-realtime-api and .opencode/skills/cb-realtime-api in your project.
Going by SKILL.md and its folder, Cb Realtime API needs credentials named NATS_AUTH_TOKEN. Our summary lists: Python 3; Docker; A credential in NATS_AUTH_TOKEN.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Cb Realtime API is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Cb Realtime API: Centrifugo (pedronauck/skills, 634 stars), API Conventions (huangjia2019/claude-code-engineering, 1.1k stars), WooCommerce Store API Routes (woocommerce/woocommerce, 11k stars) and Discover API (rand/cc-polymath, 181 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
BlkLeg (a GitHub user) maintains it in BlkLeg/CircuitBreaker, which has 201 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 5, 2026.
Source: BlkLeg/CircuitBreaker on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.