webhook-system
Installation
SKILL.md
Webhook System
Five concerns that must each be correct independently: subscription management, delivery, signing, failure tracking, and re-delivery. A mistake in any one breaks the whole contract with consumers.
Phase 1: Discovery
Before writing any code:
What triggers webhooks?
- Domain events from DB writes (user.created, payment.succeeded) — or any state change?
- Who emits events: one service or multiple? If multiple, a shared event bus is needed; per-service pub/sub is not enough
- Are events ordered? Consumers often assume ordering per-entity; delivery order is not guaranteed across retries unless explicitly designed for
What's the delivery guarantee requirement?
- At-least-once (standard, acceptable duplicates) — use idempotency keys on consumer side
- Exactly-once — not achievable at the transport layer; requires idempotent consumers + deduplication window