clerk-webhooks

Verify and process Clerk webhook payloads into application workflows.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/awfixers-stuff/opencode-config --skill clerk-webhooks-awfixers-stuff
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clerk-webhooks
Source: https://github.com/awfixers-stuff/opencode-config/tree/main/skills/clerk-webhooks
Command: npx skills add https://github.com/awfixers-stuff/opencode-config --skill clerk-webhooks-awfixers-stuff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides secure, production-ready webhook handlers that reliably process Clerk event payloads and prevent unauthorized or malformed requests by enforcing signature verification and best practices for webhook reliability.

Core Features & Use Cases

  • Complete, copy-paste-ready webhook handlers for Next.js App Router and Express that always perform signature verification using verifyWebhook(req) or Svix.
  • Built-in handling examples for user events (user.created, user.updated, user.deleted), organization and organizationMembership events, and guidance for session and subscription events.
  • Practical use cases include syncing users and org memberships to a database (Prisma examples), sending welcome emails via Resend, and posting notifications to Slack while ensuring idempotency and proper HTTP acknowledgements.
  • Operational guidance to make webhook routes public from Clerk middleware, use raw request bodies for Express routes, and treat svix-id as an idempotency key to deduplicate retries.

Quick Start

Create a POST route at /api/webhooks that calls verifyWebhook(req), handles user.created to insert a user record into your database, and returns a 200 response to acknowledge receipt.

Frequently Asked Questions about clerk-webhooks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify Clerk webhooks in a Next.js App Router application?▼

You verify Clerk webhooks in Next.js by calling verifyWebhook(req) within a POST route to validate the payload using the CLERK_WEBHOOK_SECRET before processing user or organization events. The route must be public and return a 2xx status to acknowledge receipt.

How do I handle Clerk user.created events to sync data with Prisma?▼

To handle Clerk user.created events with Prisma, create a webhook route that verifies the signature, extracts the payload, and inserts a new user record into your database. You must return a 200 response immediately to prevent Clerk from retrying the event.

Why does my Clerk webhook route fail signature verification in Express?▼

Clerk webhook signature verification fails in Express if you do not use the raw request body or if the route is caught behind authentication middleware. You must parse the raw body for Svix verification and explicitly mark the webhook route as public.

What is the best way to prevent duplicate Clerk webhook deliveries?▼

The best way to prevent duplicate Clerk webhook deliveries is to treat the svix-id header as an idempotency key. By checking this key against your database before processing, you can deduplicate retries and safely acknowledge repeated payloads with a 2xx response.

Do I need Svix to process Clerk organization and membership events?▼

You do not explicitly need Svix to process Clerk organization and membership events. You can use the native verifyWebhook(req) helper for Next.js, though raw Svix verification is required for Express implementations using the CLERK_WEBHOOK_SECRET.