shadow-realtime
Skill1 starsChanged yesterdayMITView on GitHub
Realtime Transport & Client Synchronization Engineering. Use when designing WebSockets, Server-Sent Events (SSE), long-lived streams, Last-Event-ID resumption cursors, mid-connection auth revocation, presence accuracy, slow-consumer backpressure, or multi-node pub/sub fan-out. Do NOT use for durable queue semantics (shadow-concurrency), stateless HTTP APIs (shadow-api), or third-party webhooks (shadow-integrate).
In this repository51 other files it gives its agents.
- antislop-codeSkill
- antislop-copywritingSkill
- antislop-humanSkill
- antislop-layoutmobileSkill
- antislopSkill
- antislop-uiSkill
- context7Skill
- handoffSkill
- shadow-accessibilitySkill
- shadow-apiSkill
- shadow-architectSkill
- shadow-authSkill
- shadow-bootstrapSkill
- shadow-browserSkill
- shadow-cacheSkill
- shadow-compatSkill
- shadow-concurrencySkill
- shadow-dataSkill
- shadow-dbSkill
- shadow-debugSkill
- shadow-designSkill
- shadow-discoverySkill
- shadow-docSkill
- shadow-domainSkill
- shadow-eaSkill
- shadow-evalSkill
- shadow-finopsSkill
- shadow-gitSkill
- shadow-grcSkill
- shadow-handoverSkill
- shadow-integrateSkill
- shadow-maintainSkill
- shadow-mobileSkill
- shadow-modernizeSkill
- shadow-monarchSkill
- shadow-observeSkill
- shadow-opsSkill
- shadow-perfSkill
- shadow-planSkill
- shadow-pmoSkill
- shadow-presalesSkill
- shadow-privacySkill
- shadow-qualitySkill
- shadow-refactorSkill
- shadow-releaseSkill
- shadow-resilienceSkill
- shadow-searchSkill
- shadow-secSkill
- shadow-supplychainSkill
- shadow-testSkill
- shadow-uatSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Presence Honesty: Document explicit staleness bounds (e.g., heartbeat_interval + grace_window) rather than claiming exact real-time online …
- Very specific: line 16
Read methodologies/WEBSOCKET-SSE-RESUMPTION-AND-BACKPRESSURE.md and playbooks/REALTIME-PROTOCOL-ADR-AND-RUNBOOK.md:
- Very specific: line 17
Select Transport via ADR: Prefer SSE (EventSource + Last-Event-ID) for server->client feeds behind standard HTTP proxies.
- Distinctive: line 20
Configure Multi-Node Fan-Out & Backpressure: Use Redis Pub/Sub / NATS / Kafka fan-out (never in-memory-only arrays behind load balancers).
- Very specific: line 21
Simulate Adversarial Disconnects: Test 30-minute offline reconnect, duplicate frame delivery, token revocation mid-stream, and …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/shadow-realtime — Realtime Transport & Client Synchronization
- Owner: Live client connections, protocol choice (
WebSocketvsSSEvsPolling), auth renewal/revocation, resumption cursors, deduplication, and backpressure. - Boundaries: Durable business job outbox/DLQ (
shadow-concurrency), stateless REST (shadow-api), outbound payment/SMTP adapters (shadow-integrate).
1. Preconditions, Security & Accuracy Rules
- Revocation Gate: A mid-session permission downgrade or token expiration MUST terminate or pause unauthorized event streams immediately — never continue pushing events on a stale socket.
- Presence Honesty: Document explicit staleness bounds (e.g.,
heartbeat_interval + grace_window) rather than claiming exact real-time online counts across mobile networks.
2. 6-Step Realtime Engineering Playbook
Read methodologies/WEBSOCKET-SSE-RESUMPTION-AND-BACKPRESSURE.md and playbooks/REALTIME-PROTOCOL-ADR-AND-RUNBOOK.md:
- Select Transport via ADR: Prefer SSE (
EventSource+Last-Event-ID) for server->client feeds behind standard HTTP proxies; use WebSocket when bidirectional low-latency frames are required; use Polling for low-frequency status updates. - Design Resumption & Deduplication: Attach monotonic sequence/cursor IDs; replay missed bounded history on reconnect or trigger full state resync (
snapshot_required) if cursor fell behind retention window. - Enforce Auth & Tenant ACL Per-Subscription: Validate token & tenant ACL at handshake AND on periodic refresh / revocation channel events.
- Configure Multi-Node Fan-Out & Backpressure: Use Redis Pub/Sub / NATS / Kafka fan-out (never in-memory-only arrays behind load balancers); bound per-client send queues so one slow consumer drops/resyncs instead of OOMing the server.
- Simulate Adversarial Disconnects: Test 30-minute offline reconnect, duplicate frame delivery, token revocation mid-stream, and reverse-proxy idle timeout (
proxy_read_timeoutvs heartbeat ping). - Verify Observability & Runbook: Track active connections, disconnect reasons, drop rates, and reconnect storms with jittered exponential backoff.
python "shadow-realtime/scripts/realtime_transport_verifier.py" --self-test
python "shadow-realtime/scripts/realtime_transport_verifier.py" --verify-session path/to/session_spec.jsonDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

