clerk-webhooks

Create Clerk webhook handlers with signature verification for Next.js or Express.

1|Updated Jun 13, 2017
One-click install
npx skills add https://github.com/RoyMcCrain/dotsfile --skill clerk-webhooks-roymccrain
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clerk-webhooks
Source: https://github.com/RoyMcCrain/dotsfile/tree/main/claude/skills/clerk-webhooks
Command: npx skills add https://github.com/RoyMcCrain/dotsfile --skill clerk-webhooks-roymccrain

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers often struggle to implement Clerk webhook handlers that correctly verify signatures, avoid middleware protection, and reliably sync user, organization, and membership events to their databases.

Core Features & Use Cases

  • Full verification: Always uses verifyWebhook or Svix verification, never skipping signature checks.
  • Ready-to-use handlers: Provides complete Next.js App Router and Express examples for user, organization, and membership events, including Prisma database operations.
  • Public route configuration: Shows how to make webhook routes public to prevent 401 errors.
  • Multi‑event support: Handles user creation/update/deletion, organization creation, membership joins/leaves, and can trigger Resend emails or Slack notifications.

Quick Start

Ask the skill to generate a copy‑paste‑ready Next.js webhook handler that verifies signatures and creates a new Prisma user record on user.created events.

Frequently Asked Questions about clerk-webhooks

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

FAQPage Schema
How do I create secure Clerk webhook handlers to sync user data with Prisma?

To create secure Clerk webhook handlers, use verifyWebhook or Svix to check signatures and process real-time user events into your Prisma database. This ensures user, organization, and membership data stays synced without skipping verification checks.

Why does my Clerk webhook return a 401 error in Next.js App Router?

Your Clerk webhook returns a 401 error because the route is protected by middleware. You must configure public routes in your Next.js App Router application to bypass authentication for webhook endpoints, allowing external Clerk events to reach your handler.

Can I send Slack notifications or Resend emails from a Clerk webhook handler?

Yes, you can send Slack notifications or Resend emails from a Clerk webhook handler. The handlers process real-time events like user creation and organization membership joins, triggering optional actions such as posting messages to Slack or sending emails via Resend.

Does this Clerk webhook handler work with Express as well as Next.js?

Yes, the Clerk webhook handler works with both Express and Next.js App Router applications. It provides complete examples for both frameworks to verify signatures and synchronize user, organization, and membership data directly to your database.

What is the best way to verify Clerk webhook signatures for organization events?

The best way to verify Clerk webhook signatures for organization events is to use the verifyWebhook function or Svix verification. This approach guarantees that incoming organization creation and membership join or leave events are authentic before syncing to your database.