Command Palette

Search for a command to run...

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

cerebrum-webhooks

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

Receive and verify Cerebrum (cerebrum.com) background-check and identity verification webhooks, delivered through Svix. Use when setting up a Cerebrum…

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

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

Cerebrum Webhooks

Cerebrum is a background-check and identity-verification (vID / vouchers) API. It POSTs compact order, vID invite and monitoring notifications to the postbackWebhookUrl you set when you create an order or invite. Delivery, signing and the webhook portal are provided by Svix, so every webhook carries svix-id, svix-timestamp and svix-signature headers (Standard Webhooks).

When to Use This Skill

  • How do I receive Cerebrum webhooks?
  • How do I verify a Cerebrum webhook signature?
  • Where do I get the Cerebrum webhook signing secret?
  • How do I handle ORDER_STATUS_CHANGE, ORDER_SCORE_CHANGE or VOUCHER_REDEEMED events?
  • Why is my Cerebrum svix-signature verification failing?
  • Why are Hookdeck retries of Cerebrum webhooks rejected after 5 minutes?

Verification (core)

Header Value
svix-id Unique message ID, the same on every retry
svix-timestamp Unix seconds of this delivery attempt
svix-signature One or more space-separated v1,<base64 HMAC-SHA256> entries

Signed content is {svix-id}.{svix-timestamp}.{raw body}. The key is the base64-decoded part of the secret after whsec_. The same values may arrive as webhook-id, webhook-timestamp and webhook-signature; read svix-* and fall back to webhook-* when svix-id is absent. Use the official svix library (npm, PyPI):

import { Webhook } from 'svix';

// rawBody: exact request body string, NOT re-serialised JSON
function verify(rawBody, h /* header getter */, secret = process.env.CEREBRUM_WEBHOOK_SECRET) {
  const p = h('svix-id') ? 'svix' : 'webhook';
  const headers = { 'svix-id': h(`${p}-id`), 'svix-timestamp': h(`${p}-timestamp`),
                    'svix-signature': h(`${p}-signature`) };
  if (Object.values(headers).some((v) => !v)) throw new Error('missing headers');
  new Webhook(secret).verify(rawBody, headers); // throws on a bad signature or old timestamp
  return JSON.parse(rawBody);                   // parse only after it passes
}

Python: from svix.webhooks import Webhook, then Webhook(secret).verify(raw_body, headers) (returns the parsed payload).

Timestamp window. The library always rejects timestamps more than 5 minutes from now. Hookdeck retries and replays resend the original timestamp, so a retry later than 5 minutes after the original delivery fails verification. If you receive through Hookdeck, use the manual verifier in references/verification.md, where the window can be dropped or widened.

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

Payload

The JSON body (schema has additionalProperties: false) has these fields:

Field Notes
event Event type, required (see below)
id, idType The object the event is about, and whether it is an order, invite, beamInput or report ID
organizationId Organization the event belongs to (optional only for older payloads)
eventDate When the event happened
svixAppId, additionalMetadata Svix application ID (not a secret) and the metadata attached at creation
metadata Only metadata.delta, a JSON Patch-style change list, on the four order-update events

Notifications are lookup hints: fetch GET /v1/orders/{id}, GET /v1/vid/invites/{id} or GET /v1/monitoring/reports/{id} for the current state. Cerebrum's Event Types page has a synthetic example for every event. Dedupe on the svix-id header.

Common Event Types

The event field holds one of 13 documented values. Cerebrum has no published policy for new names, so log and acknowledge unknown ones:

Event Group Note
ORDER_STATUS_CHANGE Order
ORDER_SCORE_CHANGE Order
ORDER_CUSTOM_SCORE_CHANGE Order
ORDER_DISPUTE_RESOLVED Order Sent just before the matching ORDER_STATUS_CHANGE
ORDER_ERROR Order Opt-in (order.error)
VOUCHER_REDEEMED vID invite id is the invite ID
VOUCHER_ACCEPTED vID invite Opt-in (voucher.accepted)
VOUCHER_STARTED vID invite Opt-in (voucher.started)
VOUCHER_CANCELED vID invite Opt-in (voucher.canceled)
VOUCHER_EXPIRED vID invite
VOUCHER_OPTED_OUT vID invite
MONITORING_REPORT_GENERATED Monitoring
BEAM_INPUT_CREATED Beam Simulation route only; no production emitter found by Cerebrum

Opt-in events are enabled under metadata.webhooks.events on the package or organization, keyed by the internal names in brackets. The delta page's order.updated is one of those internal names, not a payload value. See references/overview.md.

Delivery Semantics

  • Any 2xx
Полный SKILL.md на GitHub

Установить cerebrum-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/cerebrum/route.tsexamples/nextjs/package.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

FAQ

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

Receive and verify Cerebrum (cerebrum.com) background-check and identity verification webhooks, delivered through Svix. Use when setting up a Cerebrum postbackWebhookUrl handler, getting the whsec_ signing secret, debugging svix-id / svix-timestamp / svix-signature verification, or handling events like ORDER_STATUS_CHANGE, ORDER_SCORE_CHANGE, ORDER_DISPUTE_RESOLVED, VOUCHER_REDEEMED and MONITORING_REPORT_GENERATED.

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

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

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

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

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

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