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.
89
87%
Does it follow best practices?
Impact
89%
1.12xAverage score across 3 eval scenarios
Advisory
Suggest reviewing before use
Express raw body and middleware ordering
Uses express.raw()
100%
100%
Raw middleware before JSON parser
100%
100%
Verify before parse
100%
100%
Parse after verify
100%
100%
4xx on invalid signature
100%
100%
Correct content-type in express.raw
100%
100%
2xx on success
100%
100%
Idempotency check present
0%
100%
Async processing pattern
0%
50%
No express.json() on webhook route
100%
100%
Idempotent webhook handler with deduplication
Extracts event ID
100%
100%
Checks for prior processing
100%
100%
2xx for duplicate events
83%
100%
Stores event ID after processing
100%
100%
Processed events schema
100%
100%
Race condition handling
100%
83%
Side effects only once
100%
100%
Handler sequence followed
87%
100%
2xx on first success
100%
100%
No duplicate side effects in test
30%
40%
FastAPI webhook patterns and response codes
Uses request.body()
100%
100%
Dependency injection for verification
0%
100%
Verify before parse
100%
100%
4xx for invalid signature
100%
100%
BackgroundTasks for async processing
100%
100%
Returns 200 quickly
100%
100%
5xx or 503 for server errors
0%
50%
Handler sequence
100%
100%
Idempotency present
0%
0%
Structured logging
25%
25%
No request.json() first
100%
100%
f8a4801
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.