Command Palette

Search for a command to run...

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

gitbook-webhooks

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

Receive and verify GitBook webhooks. Use when configuring GitBook webhook endpoints, debugging x-gitbook-signature signatures, or handling…

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

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

GitBook Webhooks

Receive GitBook content updates, page feedback and site views.

When to Use This Skill

  • Configure a receiver for GitBook webhook deliveries.
  • Diagnose x-gitbook-signature verification failures.
  • Handle space_content_updated, page_feedback, site_view.

Setup

Install the Webhook integration in your GitBook organisation, then open its configuration in a space or site, enter the Webhook URL, select events and click Save Configuration. The Secret section of the same screen shows the signing secret, which GitBook generates. The URL and secret belong to the organisation's installation, so every space and site that sends to this endpoint uses the same secret. Regenerate replaces it once you save; update your receiver straight away.

Set GITBOOK_WEBHOOK_SECRET in the server environment. Read setup before enabling delivery.

Verification (core)

x-gitbook-signature contains t=<Unix seconds>,v1=<hex> over timestamp + "." + raw body. Use HMAC-SHA256 with the secret's UTF-8 bytes. Verify the original bytes before parsing JSON. Validate the digest format, then compare equal-length buffers in constant time.

After extracting the documented digest and constructing message as described in verification, the comparison is:

const expected = crypto.createHmac('sha256', secret).update(message).digest();
if (digest.length !== 64 || !/^[0-9a-fA-F]{64}$/.test(digest)) return false;
const received = Buffer.from(digest, 'hex');
return received.length === expected.length && crypto.timingSafeEqual(received, expected);

Set GITBOOK_WEBHOOK_TOLERANCE_SECONDS to a positive number to enforce an application age limit in seconds. Unset or 0 disables it. Old timestamps remain valid by default so Hookdeck retries and replays can retain the original headers.

Complete handlers and tests: Express, Next.js, FastAPI.

Event Handling

Dispatch on type: space_content_updated is a space event; page_feedback and site_view are site events. The envelope includes eventId and installationId.

Return a successful HTTP response promptly. Keep processing idempotent using eventId, and accommodate retries.

Local Development

npx hookdeck-cli listen 3000 gitbook --path /webhooks/gitbook

Use port 8000 for FastAPI. The CLI provides a local tunnel and inspection UI; no account is required to start.

Resources

Recommended: webhook-handler-patterns

Use the patterns skill for handler sequence, idempotency, error handling and retry logic.

Related Skills

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

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

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

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

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

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

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

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

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

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

FAQ

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

Receive and verify GitBook webhooks. Use when configuring GitBook webhook endpoints, debugging x-gitbook-signature signatures, or handling space_content_updated, page_feedback, site_view.

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

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

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

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

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

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