- Home
- Skills
- Agents & Orchestration
- nex-webhook-handler-pattern
Works with the AI tools you already use
Nex Webhook Handler Pattern
Generate production-grade, idempotent FastAPI webhook handlers with signature verification and audit logging.
Free
nex-webhook-handler-pattern
Example session with this skill installed
Add a Stripe webhook handler to my FastAPI app that handles checkout.session.completed events using ARQ.
- Read your context and instructions
- Compiled the nex-webhook-handler-pattern
I have generated the webhooks/ directory.
verifiers/stripe.py: Implements HMAC-SHA256 signature checks.handlers/stripe.py: FastAPI route with verify-store-enqueue logic.audit.py: SQLAlchemy/SQLModel forwebhook_eventswith UNIQUE(provider, event_id).jobs/stripe.py: ARQ worker stub.
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
Webhook handlers often fail due to slow processing timeouts, lack of idempotency, or incorrect signature verification. Developers frequently struggle with replay attacks and lose visibility into missed deliveries when workers crash.
What it does
- Generates provider-specific cryptographic signature verification for Stripe, Resend, Clerk, and others.
- Implements a verify-then-store-then-enqueue flow to ensure data integrity.
- Creates an audit table with a unique constraint on provider event IDs to prevent duplicate processing.
- Offloads heavy logic to ARQ background jobs, allowing the FastAPI handler to return a 200 OK within one second.
- Includes a replay CLI to re-run unprocessed or failed events from the audit log.
Frameworks & tools
FastAPI, ARQ (Redis-based task queue), PostgreSQL, and Pydantic.
Why this beats prompting it yourself
Signature verification contracts vary wildly between providers. This skill uses hard-coded, production-tested patterns for header parsing and timestamp tolerance that generic prompts often hallucinate or oversimplify, leaving you vulnerable to replay attacks.
Use cases
- Hardening a Stripe integration against signature-bypass and replay attacks.
- Recovering from worker outages by replaying missed events from an audit table.
- Standardizing webhook ingestion across multiple providers like Cloudflare and Postmark.
- Debugging "silent failures" where webhooks fire but no business logic executes.
Known limitations
Designed specifically for FastAPI and ARQ. Porting to Express or Next.js requires manual adaptation of the dependency injection and queueing logic.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
5 installs
Downloaded by developers to date
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean 1 month ago
- Free to download with an account