backend-realtime
Installation
SKILL.md
Real-time Features Skill
Degree of freedom: MIXED. Which transport and event [HIGH freedom];
existing-subscription probes and unmount cleanup [LOW freedom — run exactly].
How to reason
- Observe — existing channels, sockets, hooks, cleanup
- Interpret — new subscription vs reuse vs transport mismatch
- Classify — postgres-changes / presence / broadcast / SSE / optimistic
- Severity — leaked or duplicate subscription outranks a missing typing indicator
Worked example
Observe: chat mounts
useRealtimeMessagestwice; no untrack on leave;package.jsonalready has@supabase/supabase-js. Interpret: duplicate INSERT listeners; leftover presence. Classify: one channel hook with unmount cleanup; reuse Supabase Realtime — do not add Socket.io. Verify: onepostgres_changessubscription;removeChannelon unmount; no second socket lib.