/platform-frontend:bytedesk-realtime-engineer [service] [resource] | --auditfrom platform-frontend
ByteDesk browser realtime engineer for SignalR and ByteDesk.Realtime. Invoke whenever the user wants live updates, realtime streams, SignalR topics, push updates, polling replacement, topic registry work, Redis projection events, replay/state/history wiring, agent/chat/job/deployment live feeds, admin realtime diagnostics, or an audit for banned browser SSE/EventSource/raw WebSocket patterns. Use this instead of implementing SSE directly; ByteDesk browser realtime is Redis projection events -> ByteDesk.Realtime -> SignalR -> useTopic/useAdminTopic.
Ships in platform-frontend. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Wire or audit browser-facing realtime using the canonical ByteDesk SignalR pattern.
Read .claude/rules/realtime.md before touching any file. ADR-0032 is authoritative: browser realtime uses ByteDesk.Realtime + SignalR. ADR-0012 is historical context only.
| Layer | What | Common files |
|---|---|---|
| Domain/service publisher | Publish tenant/resource-scoped projection events to Redis, optionally update state/history keys | src/ByteDesk.{Service}/Services/** |
| Realtime service | Resolve typed topics, authorize, replay state/history, bridge Redis Pub/Sub or Streams to SignalR | src/ByteDesk.Realtime/Topics/RealtimeTopicRegistry.cs, src/ByteDesk.Realtime/Messaging/RealtimeTopicBridge.cs |
| Gateway | Normal YARP proxy for /hubs/* and /api/realtime/admin/*; no browser SSE proxy routes | src/ByteDesk.Gateway/** |
| Frontend | Subscribe through shared SignalR client hooks | src/ByteDesk.Web/src/lib/ws/use-topic.ts, src/ByteDesk.Web/src/lib/ws/use-admin-topic.ts |
Canonical examples:
src/ByteDesk.Web/src/lib/hooks/use-dev-server-events.tssrc/ByteDesk.Web/src/lib/hooks/use-agent-log.tssrc/ByteDesk.Realtime/Topics/RealtimeTopicRegistry.cssrc/ByteDesk.Realtime/Messaging/RealtimeTopicBridge.cs/bytedesk-realtime-engineer
Scan for realtime violations and opportunities. Output findings only unless the user asked for implementation.
/bytedesk-realtime-engineer {service}
Audit or wire all realtime gaps in one service.
/bytedesk-realtime-engineer {service} {resource}
Wire one resource end to end: publisher -> topic registry -> frontend hook/component.
Always survey before changing realtime code:
# Browser transport violations
rg -n "new EventSource|EventSource\\(|text/event-stream|ReadableStream|getReader\\(|new WebSocket|WebSocket\\(" src/ByteDesk.Web/src src/ByteDesk.Gateway src/ByteDesk.* -g '*.ts' -g '*.tsx' -g '*.cs'
# Polling that may need SignalR
rg -n "refetchInterval" src/ByteDesk.Web/src -g '*.ts' -g '*.tsx'
# Existing frontend realtime usage
rg -n "useTopic|useAdminTopic|ReceiveTopicEvent|ReceiveAiChatEvent" src/ByteDesk.Web/src -g '*.ts' -g '*.tsx'
# Existing Realtime registry and topic bridge coverage
rg -n "RealtimeTopicKind|ResolvePlatformTopic|ResolveAdminFeed|RedisChannel|HistoryKey|StateKey" src/ByteDesk.Realtime -g '*.cs'
# Service Redis publishers and channel naming
rg -n "PublishAsync|StringSetAsync|HashSetAsync|ListRightPushAsync|StreamAddAsync|tools:|devserver:|deploy:|database:|chat:|agentlog:|office:" src -g '*.cs'
# Gateway should only proxy hubs/admin realtime, not browser SSE routes
rg -n "hubs|event-stream|/events|Sse|SSE" src/ByteDesk.Gateway -g '*.cs'
Classify findings:
EventSource, raw browser WebSocket, new text/event-stream, custom /ws, global tenant-agnostic product topic, or bare resource-id Redis channel.refetchInterval where latency matters and a Redis publisher or durable event source already exists.useTopic/useAdminTopic, topic registry authorization, tenant/resource channel naming, and optional replay intentionally.Before wiring, settle these questions from code or by asking the user:
useTopic) or platform-admin-only (useAdminTopic)?RealtimeTopicRegistry enforce?Do not add a topic until the publisher, topic name, authorization scope, and frontend consumer are known.
Use the bundled references only as starting points:
references/backend-realtime-publisher.mdreferences/realtime-topic-registry.mdreferences/frontend-signalr-hook.tsImplementation rules:
RealtimeTopicRegistry.SourceType.PubSub for live projection events; use SourceType.Stream when Redis Stream cursor replay is needed.StateKey for latest snapshot and HistoryKey/HistoryCount for bounded replay only when the UX needs it./hubs/{**catch-all} or /api/realtime/admin/{**catch-all} proxying is missing.useTopic or useAdminTopic; never instantiate SignalR connections per component..claude/rules/realtime.md and ADR-0032 were read.EventSource, raw browser WebSocket, or custom Gateway topic bridge.RealtimeTopicRegistry resolves the topic with correct Kind, SourceType, auth flags, state/history keys, and admin/product split.useTopic/useAdminTopic.## Realtime Engineer Run - {DATE}
### Findings
| Resource | Status | Action |
|---|---|---|
| development/devserver | P3 compliant | Uses devserver:{projectId} via useTopic |
| tools/jobs | P1 wire | Add/repair topic registry or frontend hook |
### Changes
- Publisher: {service/channel/state/history}
- Registry: {topic kind/source/auth/replay}
- Frontend: {hook/component subscription}
### Verification
- {commands or checks run}
### Follow-ups
- {items intentionally left out of scope}
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub bytedeskai/bytedesk-marketplace --plugin platform-frontend4 skills in this plugin
/bytedesk-atomizeByteDesk UI componentization skill using atomic design. Invoke this skill whenever the user wants to extract inline JSX into atoms/molecules/organisms, refactor large page files into smaller components, componentize any area of the ByteDesk frontend, apply atomic design principles to the application, extract repeated patterns into shared components, or clean up a page that's grown too large. Also invoke for "componentize this", "extract this into a component", "break this page into atoms", "apply atomic design to X", "componentize the UI", "run atomize on sales", or any phrasing around structuring the frontend by atomic design layers. Run this over and over until the entire UI is componentized. Use agents to attack different domains in parallel. When in doubt, invoke this rather than doing componentization work directly — it enforces the right placement rules and design system constraints./bytedesk-browser-testDrive the ByteDesk web app through real Chrome via the `agent-browser` CLI to prove frontend changes actually render and behave correctly before they ship. Required for every PR that touches `src/ByteDesk.Web/**`. Covers login, navigation, snapshot-and-ref interaction, screenshot capture, console/error inspection, network/HAR/trace capture, React DevTools, web vitals, mobile/PWA smoke, and tab management. Invoke for "browser test", "smoke the UI", "agent-browser", "render check", "frontend smoke", or whenever a PR's diff touches a `.tsx`, `.ts`, `.css`, `.json` under `src/ByteDesk.Web/`.