Agent skill · software engineering · jeremylongshore
clerk-webhooks-events
Configure Clerk webhooks and handle authentication events.
Why this skill is useful
Adds specific implementation patterns for handling Clerk webhooks and authentication events that the AI wouldn't reliably generate on its own.
What it needs
Requires npm installed locally. Requires clerk account access. About 5k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Clerk Webhooks & Events Overview Configure and handle Clerk webhooks for user lifecycle events and data synchronization. Clerk uses Svix for webhook delivery with HMAC-SHA256 signature verification. As of 2025, Clerk provides a built-in verifyWebhook() helper in @clerk/backend alongside the manual Svix approach. Prerequisites Clerk account with webhook endpoint configured in Dashboard HTTPS endpoint (use ngrok for local dev) CLERKWEBHOOKSECRET environment variable (starts with whsec) Instructions Step 1: Install Dependencies Step 2: Create Webhook Endpoint (verifyWebhook — Recommended) Step 2 (Alternative): Manual Svix Verification Step 3: Implement Event Handlers Step 4: Idempotency Protection Step 5: Configure Webhook in Clerk Dashboard 1. Navigate to Clerk Dashboard > Webhooks > Add Endpoint 2. Set endpoint URL: https://yourdomain.com/api/webhooks/clerk 3. Select events to subscribe to: User events: user.created, user.updated, user.deleted Org events: organization.created, organizationMembership.created Session events: session.created, session.ended (optional, high volume) 4. Copy the Signing Secret (whsec...) to your .env.local: Step 6: Express.js Webhook Endpoint Local Development with ngrok Error Handling Error Cause Solution ------- ------- ---------- Invalid signature Wrong CLERKWEBHOOKSECRET Re-copy signing secret from Dashboard > Webhooks Invalid signature Body parsed with json() before verify Use req.text() (Next.js) or express.raw() (Express) Missing svix headers Request not from Clerk/Svix Verify endpoint URL; check sender Duplicate processing Clerk retried delivery Implement idempotency with svix-id as unique key Handler timeout Slow DB operations Offload heavy work to a background job queue 404 on webhook URL Route not matching Ensure /api/webhooks is in middleware's isPublicRoute Enterprise Considerations Treat CLERKWEBHOOKSECRET like a password -- rotate it if compromised (Dashboard > Webhooks > Signing Secret > Rotate) Svix headers include svix-tim …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/clerk-webhooks-events--2b2f0a