PlugWiki

clerk-webhooks Skill for Claude: What It Does and How to Install It

Makes Claude write verified Clerk webhook handlers that sync users and organizations to your database.

Installs
53.9K
on skills.sh
Stars
89
on GitHub
Files
2
besides SKILL.md
Updated
Oct 2026
last repo commit

This is Clerk's own webhook skill. Claude writes a handler that checks every event with verifyWebhook, then reacts to events such as user.created or organizationMembership.deleted by updating your database or sending a notification. It includes a Next.js handler and examples for six other frameworks.

The folder holds SKILL.md, a frameworks reference and an evals file, and bundles no scripts. The examples delete database rows and call Resend and Slack, so read the safety box.

Good for

  • Developers keeping their own users table in sync with Clerk
  • Teams sending welcome emails or Slack alerts on sign-up
  • Anyone handling organization, membership or billing events

Install clerk-webhooks

Claude Code

  1. 1

    Copy this prompt.

    Install the clerk-webhooks skill in Claude Code. Run this command:
    
    /plugin marketplace add clerk/skills
    /plugin install clerk@clerk-skills
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Pick one route. The Clerk plugin installs all 20 skills in the repo plus the hosted Clerk MCP server (mcp.clerk.com/mcp) from its .mcp.json; the skills CLI routes install skills only. Per the README, the clerk plugin replaces the earlier clerk-skills@clerk Codex plugin and the earlier core, frameworks, features and mobile Copilot plugins, and Copilot may leave clerk@clerk-skills disabled until you run copilot plugin enable clerk@clerk-skills.

From the project README. Source.

What's in the skill

When it loads

Clerk webhooks for real-time events and data syncing. Verify with verifyWebhook from the framework-specific package. Handle user, session, organization, billing, and payment events. Build event-driven features like database sync, notifications, and integrations.

Sections in SKILL.md

  1. When to Use Webhooks
  2. Verify Every Webhook
  3. Keep the Webhook Route Unprotected
  4. Complete Webhook Handler (Next.js App Router)
  5. Full Example: Welcome Email (Resend) + Slack Notification on user.created
  6. Full Example: Organization Membership Sync to Database
  7. Other Frameworks
  8. Type Narrowing for evt.data
  9. Payload Field Reference
  10. User events (user.created, user.updated, user.deleted)
  11. Organization events (organization.created, organization.updated, organization.deleted)
  12. Organization Membership events (organizationMembership.created, organizationMembership.updated, organizationMembership.deleted)
  13. Supported Events (Full Catalog)
  14. Webhook Reliability
  15. Common Pitfalls
  16. Testing & Deployment

Key facts

Installs on skills.sh
53,938 (Nov 2, 2026)
Last repo commit
Oct 30, 2026

What it includes

  • Writes a handler that verifies every event with the framework package first

    Next.js uses @clerk/nextjs/webhooks. Never skip verification, even for notification-only handlers.

    Try: “Sync users to Prisma via webhooks”

    Write · verifyWebhook handler

  • Keeps the webhook route public; auth.protect() would return 404 on every delivery

    Write · Unprotected route rule

  • Creates, updates and deletes your own user and membership rows on Clerk events

    Delete · Database sync

  • Welcome email via Resend and a Slack post on user.created

    Write · Notification examples

  • Handlers for Express, Astro, Fastify, Nuxt, React Router and TanStack Start

    Reference: references/frameworks.md.

    Write · Other frameworks

  • Lists supported events: user, session, organization, membership, billing and more

    SKILL.md groups them under 13 headings, from User to Payment.

    Event catalog

  • Svix retries failed deliveries; use the svix-id header to deduplicate

    Failed webhooks can be replayed from the dashboard.

    Reliability notes

  • clerk webhooks listen forwards events to localhost through a relay

    Runs code · Local testing

From the official docs

Permissions

Medium risk

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • Its example handlers delete data

    The sample handlers call db.users.delete, db.teamMembers.delete and db.team_members.deleteMany when a user or membership is removed in Clerk. Check each delete matches your schema before you run it. github.com

  • Local testing opens a public relay

    `clerk webhooks listen` gives a relay URL at webhooks.clerk.com that forwards events to your localhost. The skill also names ngrok, localtunnel and Cloudflare Tunnel. Only add the URL to a development Clerk instance. github.com

  • The route must stay unprotected

    SKILL.md says not to call auth.protect() on the webhook route. Signature checks with verifyWebhook are the only guard, so never skip them. github.com

  • Examples send email and Slack messages

    The welcome-email example uses Resend and a Slack webhook URL taken from environment variables. Use your own keys and test addresses. github.com

  • The Clerk plugin also adds an MCP server

    The plugin bundles .mcp.json, which registers the hosted Clerk MCP server at mcp.clerk.com/mcp. plugin.json lists no hooks. The skills CLI and folder routes do not add it. github.com

Technical details
Turning on read-onlyThere is no read-only switch. Claude writes handler code into your project.
Talks toclerk.com. webhooks.clerk.com
Sign-in and keysReads CLERK_WEBHOOK_SIGNING_SECRET (a svix signing secret from the Clerk dashboard) from the environment.
Scopes
  • Writes webhook handler routes in your app

  • Examples write to and delete from your database

  • Optionally runs the Clerk CLI tunnel to forward events to localhost

Questions

What does the clerk-webhooks skill do?

It makes Claude write Clerk webhook handlers that verify every event with verifyWebhook, then sync users and organizations to your database or trigger notifications. It covers Next.js and six other frameworks.

How do I install clerk-webhooks?

Use the install box above. The Clerk plugin installs all 20 skills. npx skills add clerk/skills installs the skills alone.

Does it need an API key?

It needs CLERK_WEBHOOK_SIGNING_SECRET, a svix signing secret from your Clerk dashboard. The notification examples also use RESEND_API_KEY and SLACK_WEBHOOK_URL.

Why does my webhook route return 404?

SKILL.md says a project that calls auth.protect() on the webhook route returns 404 for every delivery. Remove that check. verifyWebhook is the only check the route needs.

Can I rely on webhooks during sign-up?

No. SKILL.md says webhooks are asynchronous and eventually consistent. For data the user just created, read the session token or call the Backend API instead.

How do I test webhooks locally?

Run clerk webhooks listen with a token and your local URL, then add the printed relay URL as an endpoint in the dashboard. Without the CLI, tunnel localhost yourself with ngrok or a similar tool.

Is it safe?

It bundles no scripts, but its examples delete database rows and can send email and Slack messages, and local testing opens a relay to your machine. Our advice: try it against a development Clerk instance and a test database.

Does it work in the Claude app?

The README documents Claude Code, Codex, Cursor, GitHub Copilot CLI and the skills CLI. It documents no Claude app upload route, so use one of those.

Is it an official Clerk skill?

It is in Clerk's own repo, and the repo's marketplace.json describes the plugin as "Official Clerk skills for AI coding agents".

Information

updated Nov 2, 2026

Repository
clerk/skills
Folder
skills/clerk-webhooks

clerk/skillsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 6
  1. clerk/skills README · github.com
  2. clerk/skills marketplace.json · github.com
  3. clerk plugin.json · github.com
  4. clerk/skills .mcp.json · github.com
  5. clerk-webhooks SKILL.md · github.com
  6. clerk-webhooks frameworks.md · github.com

Updated Nov 2, 2026.