realtime-websockets

realtime-websockets is a skill for Claude Code, Codex from kouroshez/coding-os. It costs 193 tokens per session (2,718 once invoked), scanned A, original, Apache-2.0.

A guide to building software that keeps a live connection between a server and connected browsers or apps, using WebSockets or Server-Sent Events.

In plain words
What is it for?
Use it for chat, notifications, live dashboards, presence indicators, collaborative editing, order updates, reconnection, access checks, and scaling realtime connections.
Why use it?
It helps prevent dropped connections, stalled messages, duplicate updates, and problems when the service runs on multiple servers.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for chat, notifications, live dashboards, presence indicators, collaborative editing, order updates, reconnection, access checks, and scaling realtime connections.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kouroshez/coding-os/realtime-websockets
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kouroshez/coding-os --skill realtime-websockets
Clone the repo
git clone --depth 1 https://github.com/kouroshez/coding-os

Made for: Claude Code, Codex.

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 realtime-websockets

README.md
[![agentmods](https://agentmods.dev/badge/skills/kouroshez/coding-os/realtime-websockets/github.svg)](https://agentmods.dev/skills/kouroshez/coding-os/realtime-websockets)
Your own site
<a href="https://agentmods.dev/skills/kouroshez/coding-os/realtime-websockets"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/realtime-websockets/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 realtime-websockets

Your own site · 80×15
<a href="https://agentmods.dev/skills/kouroshez/coding-os/realtime-websockets"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/realtime-websockets.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 193 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,718 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.00193 $0.02718
Opus 5.5 $0.00077 $0.01087
Sonnet 5.5 $0.00039 $0.00544
Haiku 4.5 $0.00019 $0.00272

Measured 3mo ago against content hash 5a8289ecd205, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

realtime-websockets 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 3mo 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.

src/core/skills/realtime-websockets/SKILL.md · 153 lines

How it starts

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

Realtime — WebSockets + Server-Sent Events

A practical guide to running persistent realtime connections in production. Stack-agnostic; concrete patterns reference ws/Socket.IO (Node), websockets/Starlette (Python), gorilla/websocket + melody (Go), and Redis/NATS as the fan-out bus.

When to Use This Skill

  • Adding live updates: chat, notifications, presence, collaborative editing, live dashboards, order/status streams.
  • Choosing between WebSocket, Server-Sent Events (SSE), and long-polling.
  • Debugging dropped connections, zombie sockets, or "the client thinks it's connected but messages stop arriving".
  • Implementing reliable reconnection (backoff, resume, missed-message replay).
  • Scaling a socket server beyond one process/node (fan-out across instances).
  • Authenticating and authorizing a connection at the upgrade handshake.

Skip when: the interaction is request/response (use HTTP — that is api-design), or the question is the schema of subscription payloads (that is graphql for graphql-ws).

Boundary — Realtime vs api-design vs graphql

Concern Owner
REST/GraphQL request-response contracts, versioning, idempotency keys, RFC 9457 HTTP errors api-design
The persistent connection after upgrade: lifecycle, heartbeat, reconnect, backpressure, fan-out, presence realtime-websockets (this skill)
The schema/shape of messages flowing over a graphql-ws subscription graphql

api-design governs everything up to (and including) the HTTP request that opens the socket — the Upgrade handshake is an HTTP request and its auth/error semantics follow api-design. Once the connection is established and bidirectional, this skill takes over. Message payload schemas belong to whoever owns the domain (graphql for GraphQL subscriptions, or a plain JSON envelope this skill defines).

Transport Decision — WebSocket vs SSE vs Long-Poll

Transport Direction Reconnect Use when Avoid when
SSE (text/event-stream) server → client only built-in (Last-Event-ID, auto-retry) server-push only: notifications, live feeds, log tails, LLM token streams the client must also push frequently
WebSocket full duplex manual (build it) chat, collaboration, gaming, anything bidirectional and chatty a one-way feed where SSE's simplicity wins
Long-poll request/response n/a last-resort fallback where WS/SSE are blocked by middleboxes anything modern can do — it is a fallback, not a default

Read the full file on GitHub · 153 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. 3mo ago First seen · 153 lines · 193 tokens per session scan A 5a8289ecd205

Subscribe to this mod's changes

realtime-websockets is a skill published in the GitHub repository kouroshez/coding-os (7 stars, last pushed yesterday), licensed Apache-2.0. It adds 193 tokens to every session and 2,718 once invoked, about $0.0008 per session on Opus 5.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-31.

Related

realtime-websockets compared with skills from other repositories

realtime-websockets next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
realtime-websocketskouroshez/coding-osSkill7yesterdayApache-2.0A193Claude Code, Codex
potpie-repo-baselinepotpie-ai/potpieSkill5.8k5d agoApache-2.0A75Claude Code, Codex
potpie-infra-architecturepotpie-ai/potpieSkill5.8k5d agoApache-2.0A43Claude Code, Codex
potpie-project-preferencespotpie-ai/potpieSkill5.8k5d agoApache-2.0A63Claude Code, Codex
bi-causal-attributionagentscope-ai/QwenPaw-DataSkill210todayApache-2.0A76Claude Code, Codex
binder-appmpazik/BinderSkill411mo agoMITA74Claude Code, Codex
api-agent-readyGeckoVision/gecko-surfSkill221mo agoApache-2.0A186Claude Code