用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Dev-Toolbelt/dev-team-agents --skill realtime命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | realtime |
| description | Supabase Realtime/WebSocket — broadcast, presence, Postgres changes. |
| Signal | Meaning |
|---|---|
supabase.channel() in code | Supabase Realtime |
REALTIME_* env vars | Supabase Realtime service config |
realtime service in docker-compose.yml | Self-hosted Realtime |
ws:// / wss:// URLs in code | Generic WebSocket |
socket.io, ably, pusher dependencies | Third-party WS providers |
Supabase Realtime is built on Phoenix channels (Elixir). It exposes three features via a single WebSocket connection:
| Feature | What it does |
|---|---|
| Broadcast | Send arbitrary messages between clients via a named channel |
| Presence | Track which clients are connected to a channel and their state |
| Postgres Changes | Stream database mutations (INSERT/UPDATE/DELETE) to clients |
Supabase Realtime enforces RLS for Postgres Changes. The JWT used to connect to the channel determines what data is streamed.
Pass the user JWT when creating the client (happens automatically if using supabase-js with active session). For server-side Realtime subscriptions, use the service-role key deliberately and be aware that all changes will flow through.
removeChannel / unsubscribe on cleanup — channels accumulate and cause memory leaksreplica identity full — payload.old is empty on UPDATE/DELETEpostgres_changes without RLS — all rows stream to all clientsCHANNEL_ERROR and TIMED_OUT statuses — the subscription silently stops workingCloseEvent code — 1000/1001 are intentional closes, everything else should trigger a reconnectOPEN state for minutes before the OS noticesws:// on an HTTPS page — browsers block the mixed-content connection outright; always use wss://Origin header alone, or skipping token validation on the upgrade handshake| When | Load |
|---|---|
| Implementing broadcast, presence, Postgres Changes, or generic WebSocket patterns | references/implementation.md |