What problem does it solve? Building live-updating interfaces like an Activity Panel or status dashboards requires choosing between WebSocket subscriptions and polling, handling connection cleanup, and respecting row-level security — mistakes here cause leaked connections and stale data. ## Core Features & Use Cases - Decision Guidance: Clear rules for when to use Supabase Realtime versus polling based on latency tolerance. - Canonical Subscription Patterns: Typed Next.js hooks for subscribing to postgres_changes with proper cleanup via removeChannel. - RLS and Publication Setup: SQL migrations to add tables to the supabase_realtime publication so events respect row-level policies. - Testing and Fallback: Broadcast-based unit tests, service-role integration tests, and a useRealtimeWithFallback hook that degrades to 5-second polling on connection failure. - Use Case: When building an Activity Panel showing agent status changes (started, completed, failed), use this Skill to wire a typed subscription that updates the UI instantly and falls back to polling if the WebSocket drops. ## Quick Start Ask the AI to implement a Supabase Realtime subscription for live agent status updates in the Activity Panel following this skill's patterns.