backend-webhooks
Use when the user asks about webhooks, receiving Stripe or GitHub webhooks safely, verifying webhook signatures (HMAC), sending outgoing webhooks, retries or…
от j4flmao★ 47 звёзд на GitHub
Установить backend-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Backend Webhooks
Purpose
Securely receive, verify, retry, and deliver webhooks between services with guaranteed delivery and tamper-proof signatures. Webhooks are the standard mechanism for asynchronous service-to-service event notification.
Agent Protocol
Trigger
Exact user phrases: "webhook", "webhook receiver", "webhook delivery", "signature verification", "HMAC", "event delivery", "outgoing webhook", "incoming webhook", "retry webhook", "webhook endpoint".
Input Context
- Direction: receiving incoming webhooks or sending outgoing webhooks.
- Security requirements (signing, IP allowlisting).
- Expected volume and payload size.
- Event types and schemas.
Output Artifact
Webhook handler code or configuration. No file unless requested.
Response Format
Direction: {incoming|outgoing}
Auth: {HMAC|Basic|OAuth|None}
Retry: {strategy}
Delivery Guarantee: {at-least-once|exactly-once}
Completion Criteria
- Signature verification for incoming webhooks.
- Payload signing for outgoing webhooks.
- Retry with exponential backoff for failed deliveries.
- Dead-letter queue for permanently failed deliveries.
- At-least-once delivery guaranteed.
- Idempotency handling for duplicate deliveries.
Max Response Length
4 lines per webhook. 20 lines for full implementation.
Architecture Decision Tree
Should I Use Webhooks or Polling?
Does the consumer need near-real-time notification?
├── Yes → Webhooks (push-based, lower latency)
└── No → Is the consumer behind a firewall?
├── Yes → Polling (consumer pulls when ready)
└── No → Does the consumer need guaranteed delivery?
├── Yes → Webhooks + retry + DLQ
└── No → Webhooks (best-effort)
Outgoing vs Incoming Webhook Design
Are you sending events to external systems?
├── Yes → Outgoing webhooks:
│ ├── Subscription management (CRUD endpoints)
│ ├── Payload signing (HMAC-SHA256)
│ ├── Retry with backoff (5 attempts)
│ ├── Dead letter queue (after max retries)
│ ├── Rate limiting per subscription
│ └── Consumer-managed endpoint configuration
└── No → Incoming webhooks:
├── Signature verification (timing-safe)
│ ├── Timestamp validation (tolerance window)
│ ├── Payload validation (schema check)
│ ├── Idempotency handling (X-Webhook-ID)
└── Fast acknowledgment (200 before processing)
Authentication Decision
What level of security does the integration need?
├── HMAC signature → Most common, simple, tamper-proof
│ ├── Shared secret known to both parties
│ ├── Payload + timestamp signed with SHA256
│ └── Use timing-safe comparison for verification
├── OAuth2/Bearer token → Standard for API-first services
│ ├── Provider issues access token
│ └── Consumer validates token on each webhook
├── IP allowlisting → Additional layer, not standalone
│ └── Only accept from known IP ranges
└── Mutual TLS → Highest security, operational overhead
└── Both parties present certificates
Workflow
Step 1: Define Event Types
events:
order.created:
description: Order has been placed
schema: OrderCreatedEvent
version: 1
order.fulfilled:
description: Order has been shipped
schema: OrderFulfilledEvent
version: 1
order.cancelled:
description: Order was cancelled
schema: OrderCancelledEvent
version: 1
Step 2: Sign Outgoing Payloads
function signPayload(payload, secret) {
const timestamp = Math.floor(Date.now() / 1000);
const payloadString = JSON.stringify(payload);
const signature = crypto
.createHmac('sha256', secret)
.update(`${timestamp}.${payloadString}`)
.digest('hex');
return { signature, timestamp };
}
async function deliverWebhook(subscription, event) {
const { signature, timestamp } = signPayload(event, subscription.secret);
const headers = {
'Content-Type': 'application/json',
'X-Webhook-Signature': `sha256=${signature}`,
'X-Webhook-Timestamp': timestamp,
'X-Webhook-ID': event.id,
'X-Webhook-Event': event.type,
};
return fetch(subscription.url, {
method: 'POST',
headers,
body: JSON.stringify(event),
});
}
Step 3: Verify Incoming Signatures
function verifyWebhook(payload, headers, secret, toleranceMs = 300000) {
const signature = headers['x-webhook-signature'];
const timestamp = parseInt(headers['x-webhook-timestamp'], 10);
const eventId = headers['x-webhook-id'];
// 1. Validate timestamp is within tolerance window
const age = Date.now() - timestamp * 1000;
if (Math.abs(age) > toleranceMs) {
throw new Error(`Webhook timestamp expired: age=${age}ms > tolerance=${toleranceMs}ms`);
}
// 2. Verify signature using timing-safe comparison
const payloadString = JSON.stringify(payload);
const expectedSig = crypto
.createHmac('sha256', secret)
.up
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/webhook-delivery.md
- references/webhook-monitoring.md
- references/webhook-rate-limiting.md
- references/webhook-scaling.md
- references/webhook-security.md
- references/webhook-setup.md
- references/webhooks-architecture.md
- references/webhooks-delivery.md
FAQ
Что делает скилл backend-webhooks?
Use when the user asks about webhooks, receiving Stripe or GitHub webhooks safely, verifying webhook signatures (HMAC), sending outgoing webhooks, retries or replay protection. Produces webhook receiver and delivery code. Not for payment flows themselves (use ecommerce-payment-processing).
Как установить скилл backend-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл backend-webhooks запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis 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…