skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
hookdeck/webhook-skills463 installs

webhook-handler-patterns

Best practices for webhook handlers. Use when implementing the handler sequence (verify first, parse second, handle idempotently), idempotency, error handling, retry logic, out-of-order or replayed events, or framework-specific issues with Express, Next.js, or FastAPI.

How do I install this agent skill?

npx skills add https://github.com/hookdeck/webhook-skills --skill webhook-handler-patterns
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill provides comprehensive best practices and code patterns for implementing secure and resilient webhook handlers. It covers signature verification, idempotency, and error handling for Express, Next.js, and FastAPI. No security risks were detected.

  • Socketpass

    No alerts

  • Snykfail

    Risk: CRITICAL · 1 issue

  • Runlayerwarn

    8/8 files flagged

What does this agent skill do?

Webhook Handler Patterns

When to Use This Skill

  • Following the correct webhook handler order (verify → parse → handle idempotently)
  • Implementing idempotent webhook handlers
  • Handling errors and configuring retry behavior
  • Handling events that arrive out of order or are replayed after an outage
  • Understanding framework-specific gotchas (raw body, middleware order)
  • Building production-ready webhook infrastructure

Resources

Handler Sequence

Best Practices

Framework Guides

Quick Reference

Handler Sequence

  1. Verify signature first — Use raw body; reject invalid requests with 4xx.
  2. Parse payload second — After verification, parse or construct the event.
  3. Handle idempotently third — Check event ID, then process; return 2xx for duplicates.

See references/handler-sequence.md for details and links to provider verification and idempotency patterns.

Response Codes

CodeMeaningProvider Behavior
2xxSuccessNo retry
4xxClient errorUsually no retry (except 429)
5xxServer errorRetry with backoff
429Rate limitedRetry after delay

Idempotency Checklist

  1. Extract unique event ID from payload
  2. Check if event was already processed
  3. Process event within transaction
  4. Store event ID after successful processing
  5. Return success for duplicate events

Related Skills

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/hookdeck/webhook-skills/webhook-handler-patterns">View webhook-handler-patterns on skillZs</a>