一键导入
blink-realtime
WebSocket pub/sub messaging with channels, presence tracking, and message history. Real-time communication for chat, collaboration, and live updates.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
WebSocket pub/sub messaging with channels, presence tracking, and message history. Real-time communication for chat, collaboration, and live updates.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
OAuth connector system for 38+ third-party services. Execute API calls to Google, Notion, Slack, Discord, GitHub, Stripe, Jira, HubSpot, Salesforce, LinkedIn, and more.
End-to-end guide for building and shipping a Blink app. Project setup, SDK init, auth, database, backend, deploy, and custom domains. Index to all other skills.
Authentication with managed and headless modes. Social providers, email/password, magic links, RBAC.
Build and deploy Blink apps to production. Preview vs production deploys, deploy pipeline, static site hosting.
Blink Claw agent management — managed AI agent hosting on Fly.io. List agents, check status, manage secrets. For autonomous agents, Telegram/Discord bots, and scheduled workflows.
AI Gateway for text generation, image generation/editing, video generation, text-to-speech, audio transcription, and AI phone calls. Unified access to 50+ models.
| name | blink-realtime |
| description | WebSocket pub/sub messaging with channels, presence tracking, and message history. Real-time communication for chat, collaboration, and live updates. |
Requires auth: initialize with auth: { mode: 'managed' } for realtime to work.
# Publish a message to a channel
blink realtime publish chat-room --type message --data '{"text":"Hello everyone!"}'
# Publish with user context
blink realtime publish notifications --type alert --data '{"level":"info","text":"Deploy complete"}'
| Tool | Description |
|---|---|
blink_realtime_publish | Publish event to a channel |
// Simple subscribe/publish
const unsubscribe = await blink.realtime.subscribe('chat-room', (message) => {
console.log(message.data)
})
await blink.realtime.publish('chat-room', 'message', { text: 'Hello!' })
unsubscribe()
const channel = blink.realtime.channel('game-lobby')
await channel.subscribe({
userId: user.id,
metadata: { displayName: user.name, status: 'online' }
})
channel.onMessage((msg) => {
if (msg.type === 'chat') addMessage(msg.data)
})
channel.onPresence((users) => {
setOnlineUsers(users)
})
await channel.publish('chat', { text: 'Hello!' }, { userId: user.id })
const history = await channel.getMessages({ limit: 50 })
const users = await channel.getPresence()
await channel.unsubscribe()
{
id: '1640995200000-0',
type: 'chat',
data: { text: 'Hello!' },
timestamp: 1640995200000,
userId: 'user123',
metadata: { displayName: 'John' }
}
{
userId: 'user123',
metadata: { displayName: 'John', status: 'online' },
joinedAt: 1640995200000,
lastSeen: 1640995230000
}
useEffect(() => {
if (!user?.id) return
let channel: any = null
const init = async () => {
channel = blink.realtime.channel('room')
await channel.subscribe({ userId: user.id })
channel.onMessage((msg: any) => setMessages(prev => [...prev, msg]))
}
init().catch(console.error)
return () => { channel?.unsubscribe() }
}, [user?.id])
Never return cleanup from inside an async function — it gets lost. Store channel reference outside and clean up synchronously.