Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

liveblocks-webhooks

БесплатноЗапускает вложенные скриптыНе проверен

Receive and verify Liveblocks webhooks, which follow the Standard Webhooks specification. Use when setting up a Liveblocks webhook endpoint, getting the…

hookdeckот hookdeck★ 104 звезды на GitHub

Об этом скилле

Liveblocks Webhooks

Liveblocks is realtime collaboration infrastructure: rooms, Storage, Yjs, Comments and notifications. It POSTs a signed JSON event to each endpoint you add in the project's Webhooks dashboard, for all events or a filtered subset. Signatures follow Standard Webhooks, so each delivery carries webhook-id, webhook-timestamp and webhook-signature headers.

When to Use This Skill

  • How do I receive Liveblocks webhooks?
  • How do I verify a Liveblocks webhook signature (webhook-signature)?
  • Where do I find my Liveblocks webhook secret (whsec_...)?
  • How do I handle userEntered, storageUpdated, ydocUpdated, commentCreated or threadCreated events?
  • How do I send emails from Liveblocks notification events?
  • Why is my Liveblocks webhook verification failing, or failing only on retries and replays?

Verification (core)

Header Value
webhook-id Identifies the message and is signed. The body has no event id, and the docs don't say whether a retry reuses this one
webhook-timestamp Unix seconds
webhook-signature One or more space-separated v1,<base64> entries

Signed content is {webhook-id}.{webhook-timestamp}.{raw body}, HMAC-SHA256, base64 output. The key is the base64-decoded part of the whsec_... secret after the prefix. Compare against every v1, entry; ignore other versions. If webhook-id is absent, read svix-id, svix-timestamp and svix-signature instead. The examples use the standardwebhooks library (npm and PyPI):

const { Webhook } = require('standardwebhooks');

// rawBody: exact request body (Buffer or string), NOT re-serialised JSON
function verifyLiveblocks(rawBody, headers, secret = process.env.LIVEBLOCKS_WEBHOOK_SECRET) {
  const p = headers['webhook-id'] ? 'webhook' : 'svix'; // fall back to the svix-* names
  new Webhook(secret).verify(rawBody, {
    'webhook-id': headers[`${p}-id`],
    'webhook-timestamp': headers[`${p}-timestamp`],
    'webhook-signature': headers[`${p}-signature`],
  }, { jsonParse: false }); // throws on a bad signature or stale timestamp → respond 401
}

The library always enforces a fixed 5-minute timestamp window. Hookdeck retries and replays resend the original webhook-timestamp, so the library rejects them once they are more than 5 minutes old. If you receive through Hookdeck and need late retries to pass, use the manual verifier in references/verification.md, which can drop or widen the window. In Express, read the body with express.raw({ type: '*/*' }) so any content type verifies, and parse JSON only after the check.

Liveblocks' own @liveblocks/node package offers new WebhookHandler(secret).verifyRequest({ headers, rawBody }), which verifies and returns a typed event. See references/verification.md for when to pick it.

For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.

Event Type and Payload

Every body is the same { type, data } envelope. The event name is the camelCase top-level type, and the event fields sit under data:

{
  "type": "commentCreated",
  "data": {
    "projectId": "my-project-id",
    "roomId": "my-room-id",
    "threadId": "my-thread-id",
    "commentId": "my-comment-id",
    "createdAt": "2021-10-06T01:45:56.558Z",
    "createdBy": "my-user-id"
  }
}

The notification event is refined by data.kind: thread, textMention, or a custom $-prefixed kind you trigger from your server.

Common Event Types

Event Fired when
userEntered / userLeft A user connects to or disconnects from a room (numActiveUsers is the count after the change; not throttled)
storageUpdated A user writes to Storage (throttled at 60 s, so not sent for every write)
ydocUpdated A user changes a Yjs document in a room (throttled at 60 s)
roomCreated / roomDeleted A room is created (by API or by a user connecting to a missing room) or deleted
commentCreated / commentEdited / commentDeleted A comment changes
commentReactionAdded / commentReactionRemoved An emoji reaction is added to or removed from a comment
commentMetadataUpdated A comment's metadata is updated
threadCreated / threadDeleted A thread is created, or deleted (all comments removed or deleted manually)
threadMetadataUpdated A thread's metadata is updated
threadMarkedAsResolved / threadMarkedAsUnresolved A thread's resolved state changes
notification A user was mentioned or replied to and hasn't seen it; sent 30 minutes after the activity by default (configurable in project settings), once per enabled channel (data.channel)

These 18 are

Полный SKILL.md на GitHub

Установить liveblocks-webhooks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/express/.env.exampleexamples/express/README.mdexamples/express/package.jsonexamples/express/src/index.jsexamples/fastapi/.env.exampleexamples/fastapi/README.mdexamples/fastapi/main.pyexamples/fastapi/requirements.txtexamples/fastapi/test_webhook.pyexamples/nextjs/.env.exampleexamples/nextjs/README.mdexamples/nextjs/app/webhooks/liveblocks/route.tsexamples/nextjs/package.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

FAQ

Что делает скилл liveblocks-webhooks?

Receive and verify Liveblocks webhooks, which follow the Standard Webhooks specification. Use when setting up a Liveblocks webhook endpoint, getting the whsec_ signing secret, debugging webhook-id / webhook-timestamp / webhook-signature verification, or handling events like userEntered, storageUpdated, ydocUpdated, commentCreated, threadCreated and notification.

Как установить скилл liveblocks-webhooks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл liveblocks-webhooks запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить liveblocks-webhooks с