Skip to content

feat: add mailgun-webhooks skill#48

Merged
leggetter merged 2 commits into
mainfrom
feat/mailgun-webhooks
May 11, 2026
Merged

feat: add mailgun-webhooks skill#48
leggetter merged 2 commits into
mainfrom
feat/mailgun-webhooks

Conversation

@leggetter
Copy link
Copy Markdown
Collaborator

Summary

Adds a complete mailgun-webhooks provider skill. Mailgun is unusual in delivering the signature inside the request body (not a header) — this skill covers HMAC-SHA256 verification over timestamp+token using the HTTP Webhook Signing Key.

What's included

  • skills/mailgun-webhooks/SKILL.md — entry point
  • skills/mailgun-webhooks/references/ — overview, setup, verification
  • skills/mailgun-webhooks/examples/ — Express, Next.js, FastAPI handlers (33 passing tests across the 3 frameworks)
  • Optional parent-signature handling for subaccount events

Notes

  • Signature location: request body, top-level signature object with timestamp, token, signature fields
  • Algorithm: HMAC-SHA256 over timestamp+token (no separator), hex-encoded, compared with timing-safe equality
  • Signing key: HTTP Webhook Signing Key (account-level — same key works for both account-level and domain-level webhooks)
  • Replay protection: cache token values to drop replays; optionally reject stale timestamps (be lenient — delivery can lag)
  • Subaccount support: parent-signature field signed with the parent account's key
  • Events covered: accepted, rejected, delivered, failed (with severity: permanent|temporary), opened, clicked, unsubscribed, complained, stored, list_member_uploaded
  • Scope: Transactional email events only (not InboxReady monitoring alerts — that's a separate product)

Test plan

  • cd skills/mailgun-webhooks/examples/express && npm test
  • cd skills/mailgun-webhooks/examples/nextjs && npm test
  • cd skills/mailgun-webhooks/examples/fastapi && pytest test_webhook.py -v
  • Verify against a real Mailgun-signed webhook
  • Test parent-signature path with a subaccount webhook
  • Confirm event names match https://documentation.mailgun.com/docs/mailgun/user-manual/events/events

Generation details

https://claude.ai/code/session_01NNTgQRJss1V7gyzzJ9rjnB


Generated by Claude Code

claude and others added 2 commits May 11, 2026 23:21
Adds a complete skill for receiving and verifying Mailgun webhooks across
Express, Next.js, and FastAPI. Mailgun is unusual in delivering the
signature inside the request body (not a header) as a top-level signature
object; the handler computes HMAC-SHA256 over timestamp+token (no
separator) using the HTTP Webhook Signing Key and compares hex digests
with timing-safe equality. Includes optional parent-signature handling for
subaccount events, full coverage of the common event types (accepted,
rejected, delivered, failed with severity, opened, clicked, unsubscribed,
complained, stored, list_member_uploaded), and 33 passing tests across the
three frameworks.

https://claude.ai/code/session_01NNTgQRJss1V7gyzzJ9rjnB
…rce arg

Applies the new project convention from PR #40: use
`npx hookdeck-cli listen <port> <source> --path /webhooks/<source>`
everywhere instead of `hookdeck listen <port> --path /webhooks/<source>`.
Skips the global-install prereq (webhook-skills is provider-neutral) and
passes the required `[source]` positional so the command is copy-paste-
runnable without falling into an interactive prompt.

https://claude.ai/code/session_01NNTgQRJss1V7gyzzJ9rjnB
@leggetter leggetter marked this pull request as ready for review May 11, 2026 22:22
@leggetter leggetter force-pushed the feat/mailgun-webhooks branch from a50dad4 to 099faf4 Compare May 11, 2026 22:22
@leggetter leggetter merged commit 3c1d86f into main May 11, 2026
6 checks passed
@leggetter leggetter deleted the feat/mailgun-webhooks branch May 11, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants