hookdeck/webhook-skills

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, or framework-specific issues with Express, Next.js, or FastAPI.

First seen Feb 4, 2026

Installation

$ npx skills add hookdeck/webhook-skills --skill webhook-handler-patterns

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from hookdeck/webhook-skills · top by installs.

npx skills add hookdeck/webhook-skills

Browse all from hookdeck/webhook-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 84
License LICENSE
Default branch main
Open issues 6
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version0.1.0
LicenseMIT
More metadata
author
hookdeck
version
0.1.0
repository
https://github.com/hookdeck/webhook-skills

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,007 B
  • docs SUMMARY.md 268 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 402 installs

SKILL.md

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
  • Understanding framework-specific gotchas (raw body, middleware order)
  • Building production-ready webhook infrastructure

Resources

Handler Sequence

  • [references/handler-sequence.md](references/handler-sequence.md) - Verify first, parse second, handle idempotently third

Best Practices

  • [references/idempotency.md](references/idempotency.md) - Prevent duplicate processing
  • [references/error-handling.md](references/error-handling.md) - Return codes, logging, dead letter queues
  • [references/retry-logic.md](references/retry-logic.md) - Provider retry schedules, backoff patterns

Framework Guides

  • [references/frameworks/express.md](references/frameworks/express.md) - Express.js patterns and gotchas
  • [references/frameworks/nextjs.md](references/frameworks/nextjs.md) - Next.js App Router patterns
  • [references/frameworks/fastapi.md](references/frameworks/fastapi.md) - FastAPI/Python patterns

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](references/handler-sequence.md) for details and links to provider verification and idempotency patterns.

Response Codes

Code Meaning Provider Behavior
2xx Success No retry
4xx Client error Usually no retry (except 429)
5xx Server error Retry with backoff
429 Rate limited Retry 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