What problem does it solve?
This Skill solves the problem of securely receiving and processing Clerk webhook events to keep your application data in sync without relying on synchronous user flows.
Core Features & Use Cases
- Signature verification everywhere: Verifies every incoming webhook request using verifyWebhook(req) to prevent spoofed events from being processed.
- Asynchronous, reliable event handling: Supports eventual-consistency workflows such as database synchronization, notifications, and third-party integrations triggered by lifecycle events.
- Multi-event operational patterns: Covers common Clerk event types including users, sessions, organizations, memberships, billing/subscription, payments, and more, with safe payload narrowing by evt.type.
- Public webhook routing guidance: Ensures webhook endpoints are excluded from Clerk middleware protection to avoid 401 errors.
Quick Start
Ask to generate a Next.js app router POST webhook endpoint at app/api/webhooks/route.ts that uses verifyWebhook(req) on every request and, on user.created, extracts id, email, and name and writes a corresponding row to your database.