Command Palette

Search for a command to run...

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

incident-io-webhooks

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

Receive and verify incident.io webhooks (Standard Webhooks / Svix). Use when setting up incident.io webhook handlers, debugging webhook-signature…

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

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

incident.io Webhooks

incident.io (incident management and on-call) sends webhooks from Settings → Webhooks. Delivery runs on Svix and follows the Standard Webhooks spec, with the spec-neutral webhook- header prefix: webhook-id, webhook-timestamp and webhook-signature (not svix-*). Each delivery is a JSON POST; return any 2xx to acknowledge it. There is no handshake or challenge.

This skill covers the Settings → Webhooks product only. Workflow "HTTP request" steps are a separate feature that leaves from different IPs and doesn't use this signing scheme.

When to Use This Skill

  • How do I receive incident.io webhooks?
  • How do I verify the incident.io webhook-signature header?
  • How do I handle public_incident.incident_created_v2 or schedule.shift_change_v1?
  • Why does my handler crash on private_incident.* events (they only contain an id)?
  • Where is the event data? (body[body.event_type], not body.data)
  • Why is my incident.io webhook signature verification failing?

Verification (core)

Signed content is {webhook-id}.{webhook-timestamp}. followed by the raw body bytes. HMAC-SHA256, standard base64 digest. webhook-signature holds space-delimited v1,<base64> entries (several during a secret rotation); accept if any v1 entry matches. Key: a whsec_<base64> secret is base64-decoded after the prefix, any other value is used as UTF-8 bytes.

import crypto from 'node:crypto';

function secretToKey(s) {
  if (!s) return Buffer.alloc(0);
  if (!s.startsWith('whsec_')) return Buffer.from(s, 'utf8');
  const encoded = s.slice('whsec_'.length);
  // Buffer.from(x, 'base64') skips invalid characters, so check the alphabet first
  if (!/^[A-Za-z0-9+/]+={0,2}$/.test(encoded)) return Buffer.alloc(0);
  return Buffer.from(encoded, 'base64');
}

const key = secretToKey(process.env.INCIDENT_IO_WEBHOOK_SECRET);
// id/ts/sig = webhook-id / webhook-timestamp / webhook-signature headers; rawBody = Buffer
if (key.length === 0 || !/^[1-9]\d*$/.test(ts)) throw new Error('Bad secret or timestamp');
const expected = Buffer.from(
  crypto.createHmac('sha256', key).update(`${id}.${ts}.`).update(rawBody).digest('base64')
);
const valid = sig.split(' ').some((entry) => {
  const comma = entry.indexOf(',');
  if (comma === -1 || entry.slice(0, comma) !== 'v1') return false; // version tag must be exactly v1
  const received = Buffer.from(entry.slice(comma + 1)); // compare base64 text, don't decode
  return received.length === expected.length && crypto.timingSafeEqual(received, expected);
});
const body = JSON.parse(rawBody.toString('utf8')); // only after valid === true
const resource = body[body.event_type]; // the key IS the event type string

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

The examples verify by hand rather than with the svix / standardwebhooks libraries. incident.io has no SDK of its own, those libraries hardcode a 5-minute timestamp window, and the hand-written version handles both secret forms (and rejects a whsec_ value that isn't valid base64). The timestamp is signed, so the replay window is optional (INCIDENT_IO_WEBHOOK_TOLERANCE_SECONDS); deduplicate on webhook-id either way. See references/verification.md.

Payload Envelope and Private Resources

{
  "event_type": "public_incident.incident_created_v2",
  "public_incident.incident_created_v2": { "id": "01FDAG4SAP5TYPT98WGR2N7W91", "name": "Our database is sad", "...": "..." }
}

Route on event_type (there is no event-type header) and read the resource from body[event_type]. Private incidents, alerts and escalations send only { "id": "abc123" }. Call the incident.io API with a key that has private access to get the details. The two private_incident.membership_* events are the exception: they carry incident_id, user_id and actor_user_id.

Common Event Types

All 34 event names carry a _vN version suffix that is part of the name.

Event Triggered When
public_incident.incident_created_v2 An incident is created
public_incident.incident_updated_v2 An incident is updated
public_incident.incident_status_updated_v2 An incident's status changes (no private counterpart)
public_incident.follow_up_created_v2 A follow-up is created
private_incident.incident_created_v2 A private incident is created (id only)
public_alert.alert_created_v1 / public_alert.alert_resolved_v1 An alert fires / resolves
public_escalation.escalation_created_v1 An escalation is created
schedule.shift_change_v1 The on-call user(s) on a schedule change
status_page_incident.update_shared_v1 An update is posted on a status page incident

See references/overview.md for the full list of 34 events.

Environment Var

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

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

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

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

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

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

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

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

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

TODO.mdexamples/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/incident-io/route.tsexamples/nextjs/lib/incident-io.tsexamples/nextjs/package.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

FAQ

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

Receive and verify incident.io webhooks (Standard Webhooks / Svix). Use when setting up incident.io webhook handlers, debugging webhook-signature verification, or handling incident, alert, escalation and on-call events like public_incident.incident_created_v2, public_incident.incident_status_updated_v2, public_alert.alert_created_v1 and schedule.shift_change_v1.

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

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

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

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

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

Сравнить incident-io-webhooks с