agentleFS
chatquillchatquill/claude-code-websites/.claude/skills/add-realtime/SKILL.md

add-realtime

Skill1 starsChanged 24 days agoMITView on GitHub

Adds live features (notifications, live dashboards, presence, chat, collaborative editing) via SSE, WebSockets or a managed service (Supabase Realtime, Pusher, Ably, Liveblocks), with authorised channels, reconnects and scale-out. Use when something must update without a page reload.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is 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.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If stack.realtime is null or changes: ADR, then config-set.sh stack.realtime=<value> after approval.

    line 32
  2. Distinctive:

    Ask: stories (recommended) or direct implementation.

    line 49

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Add Realtime

Adds liveness only where it pays for itself. First question: would polling, revalidation on focus, or optimistic UI be enough?

Inputs

  • The feature and its spec
  • project.yaml → stack.realtime, stack.hosting, stack.backend, stack.cache_queue

Phases

Phase 1: Is realtime needed?

realtime-engineer compares: polling/revalidate (simplest), SSE (server → client), WebSockets (bidirectional), managed service (serverless hosting, presence, CRDT collaboration). Note hosting limits: serverless functions on Vercel/Netlify do not hold long-lived WebSockets; use a managed service or a separate long-running service (Fly, Railway, Render, Durable Objects on Cloudflare). Recommend one; ask.

Phase 2: Record

If stack.realtime is null or changes: ADR, then config-set.sh stack.realtime=<value> after approval.

Phase 3: Design

  • channels/rooms naming and server-side authorisation of every subscription
  • message schema (typed, versioned), size limits, per-connection rate limits
  • delivery: at-least-once with idempotent handlers; resume from last event ID
  • scale-out: Redis pub/sub, Postgres LISTEN/NOTIFY or the managed broker
  • UI: connection state indicator, reconnect with backoff, tab sleep/wake handling
  • collaboration: Yjs/Automerge or Liveblocks; never hand-rolled OT

security-lead reviews channel authorisation and data exposure.

Phase 4: Plan and build

Tests: unit for message handlers, integration for subscription authz (wrong user is rejected), Playwright with two browser contexts to verify live updates. Ask: stories (recommended) or direct implementation.

Next step

/load-test for the realtime endpoint before launch.

Download now (ZIP)

Does 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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.