Webhook

Verify HMAC signatures, prevent replay attacks, and deduplicate webhook events.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/nakamotosai/chii --skill webhook-nakamotosai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Webhook
Source: https://github.com/nakamotosai/chii/tree/main/skills/webhook
Command: npx skills add https://github.com/nakamotosai/chii --skill webhook-nakamotosai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Webhook integrations are vulnerable to forgery, duplicates, and unreliable delivery. This Skill provides a structured approach to reliably receive and send webhooks with strong verification, idempotency, and resilient error handling.

Core Features & Use Cases

  • Receiving: Signature Verification: Always verify HMAC signatures on inbound payloads to prevent forgery; use raw body bytes and constant-time comparison; reject missing/invalid signatures with 401 and logs for investigation.
  • Receiving: Replay Prevention: Enforce timestamps and nonce IDs to reject replayed events; tolerate small clock skew.
  • Receiving: Idempotency (Critical): Use event IDs for deduplication; make handlers idempotent; retain IDs for 24-72h to balance storage and protection.
  • Receiving: Fast Response: Acknowledge with 200/202 and process asynchronously via a queue to avoid retries; perform minimal upfront validation.
  • Sending: Retry Strategy & Signature: When sending, sign payloads with a timestamp; implement exponential backoff and cap retries; distinguish 4xx vs 5xx behavior.
  • Event Design & Delivery Tracking: Include event type and timestamp, provide full resource or ID, log attempts, and provide a retry dashboard; retain webhook logs for debugging.
  • Security & Common Mistakes: Enforce HTTPS, rotate secrets, avoid including secrets in payloads, and prevent common misconfigurations.

Quick Start

Configure a webhook endpoint to verify signatures on inbound payloads and enqueue processing for asynchronous handling.

Frequently Asked Questions about Webhook

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify webhook signatures to prevent payload forgery?

Webhook signature verification uses HMAC signatures on raw body bytes with constant-time comparison to prevent payload forgery. Missing or invalid signatures should trigger a 401 rejection and generate logs for security investigation.

What is the best way to prevent duplicate webhook deliveries in distributed systems?

Preventing duplicate webhook deliveries requires per-event idempotency using unique event IDs for deduplication. Handlers must be idempotent, and event IDs should be retained for 24 to 72 hours to balance storage costs with replay protection.

How does replay protection work for inbound webhook payloads?

Replay protection for inbound webhook payloads enforces timestamps and nonce IDs to reject replayed events. The system tolerates small clock skew to ensure legitimate delayed deliveries are processed while malicious replays are blocked.

Why do webhook endpoints timeout and how to handle asynchronous processing?

Webhook endpoints timeout when processing blocks the HTTP response, so you should acknowledge with 200 or 202 and process asynchronously via a queue. Perform minimal upfront validation to avoid triggering retries from delayed responses.

What retry strategy should I use when sending webhooks to handle 4xx vs 5xx errors?

Sending webhooks requires signing payloads with a timestamp and implementing exponential backoff with capped retries. The strategy must distinguish 4xx client errors, which should stop retries, from 5xx server errors, which warrant continued attempts.