pagerduty-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify PagerDuty V3 webhooks (outbound webhook subscriptions created via the /webhook_subscriptions REST API). Use when setting up a PagerDuty…
от hookdeck★ 104 звезды на GitHubОб этом скилле
PagerDuty Webhooks
PagerDuty sends outbound V3 webhooks when incidents and services change — triggered, acknowledged, escalated, reassigned, resolved, annotated, and more.
This skill targets V3 webhook subscriptions — the current and only supported generation, created via
POST https://api.pagerduty.com/webhook_subscriptions.Canonical docs: Webhooks Overview, Verifying Signatures, Behaviour.
What This Is Not
- V1 webhook extensions — not covered, EOL October 2022 (they no longer function).
- V2 webhook extensions — legacy. End-of-support 31 Oct 2022, still
functioning (no EOL date set) but receiving no fixes or features. Their
payload is a
messages[]array with event strings likeincident.trigger(singular, nod) — deliberately different from V3'sincident.triggered. V2 extensions are not signed withX-PagerDuty-Signature, so none of the verification here applies to them. Migrate to V3. - PagerDuty Events API v1/v2 (
events.pagerduty.com) — the opposite direction. You send alerts and change events to PagerDuty. Not webhooks. - Custom Incident Actions / "Generic Webhooks" — same delivery pipeline, but a 16-second response timeout instead of 5 (see Delivery).
- Lookalikes: PagerTree, Pagerly, Opsgenie, incident.io. Unrelated companies.
When to Use This Skill
- How do I receive PagerDuty webhooks?
- How do I verify a PagerDuty webhook signature?
- Why is my
X-PagerDuty-Signatureverification failing? - Why does
X-PagerDuty-Signaturecontain two signatures? - How do I handle
incident.triggered,incident.acknowledgedandincident.resolved? - Where do I get the PagerDuty webhook signing secret?
- Does PagerDuty send a handshake or validation request? (No.)
- How do I de-duplicate PagerDuty webhook retries?
Verification (core)
HMAC-SHA256 over the raw request body, lowercase hex (Base16), in
X-PagerDuty-Signature. The header may carry multiple comma-separated
signatures — accept if any matches. Keyed with the subscription secret.
const crypto = require('crypto');
// X-PagerDuty-Signature: v1=<hex>,v1=<hex> <- multiple = secret rotation
function verifyPagerDutySignature(rawBody, signatureHeader, secret) {
if (!signatureHeader || !secret) return false; // fail closed
// HMAC over the RAW bytes. Raw digest, not hex — compare decoded bytes.
const expected = crypto.createHmac('sha256', secret).update(rawBody).digest();
return signatureHeader.split(',').some((entry) => {
const part = entry.trim();
if (!part.startsWith('v1=')) return false; // IGNORE unknown versions, don't fail
const candidate = Buffer.from(part.slice(3), 'hex'); // bad hex -> wrong length
return (
candidate.length === expected.length &&
crypto.timingSafeEqual(candidate, expected) // length guard FIRST: it throws
);
});
}
import hashlib
import hmac
SIGNATURE_PREFIX = "v1=" # the current and only signature version
def verify_pagerduty_signature(raw_body: bytes, signature_header, secret) -> bool:
if not signature_header or not secret:
return False # fail closed
# HMAC-SHA256 over the RAW body bytes, lowercase hex (Base16) — not base64.
expected = hmac.new(secret.encode("utf-8"), raw_body, hashlib.sha256).hexdigest()
expected_bytes = expected.encode("ascii")
matched = False
for entry in signature_header.split(","):
part = entry.strip() # defensive: PagerDuty sends no space
if not part.startswith(SIGNATURE_PREFIX):
continue # IGNORE unknown versions, don't fail
candidate = part[len(SIGNATURE_PREFIX):].lower()
# compare_digest on BYTES: two str args raise TypeError on non-ASCII,
# and a forged header can carry anything. No early break — the work
# stays independent of which entry matched.
if hmac.compare_digest(candidate.encode("utf-8"), expected_bytes):
matched = True
return matched
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
There is no timestamp and no nonce in the signed content, so there is no replay window to check. Do not add a tolerance or stale-time check — you would be inventing a field that does not exist.
Why manual HMAC and not an SDK
PagerDuty's JavaScript client (@pagerduty/pdjs) and Python client (pdpyras)
are REST API clients with no webhook-verification helper — there is nothing
to call. The only official verifier is in the Go client,
[`webhookv3/webhookv3.g
Установить pagerduty-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл pagerduty-webhooks?
Receive and verify PagerDuty V3 webhooks (outbound webhook subscriptions created via the /webhook_subscriptions REST API). Use when setting up a PagerDuty webhook handler, debugging X-PagerDuty-Signature verification, or handling events like incident.triggered, incident.acknowledged, incident.resolved, incident.reassigned, incident.priority_updated, incident.annotated, incident.responder.added or service.updated. PagerDuty signs with HMAC-SHA256 over the RAW body, lowercase hex (Base16), in the X-PagerDuty-Signature header, which can carry MULTIPLE comma-separated `v1=` signatures for zero-downtime secret rotation. There is no timestamp and no replay window. Not PagerDuty Events API v1/v2 (that is inbound to PagerDuty), not V1/V2 webhook extensions, not PagerTree, not Pagerly, not Opsgenie, not incident.io.
Как установить скилл pagerduty-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pagerduty-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic