Generated banner for Clerk
Generated logo for Clerk

Clerk

ClerkOfficialPublished by Clerk

  • Skill
  • Meta (authoring, orchestration, planning, memory)
  • Automation and integrations
  • MIT
  • No issues found

From the author

Clerk authentication router. Use when user asks about Clerk CLI operations, adding authentication, setting up Clerk, custom sign-in flows, Swift or native iOS auth, native Android auth, Next.js patterns, React patterns, Vue patterns, Nuxt patterns, Astro patterns, TanStack Start patterns, Expo patterns, React Router patterns, Chrome Extension patterns, organizations, billing, subscriptions, payments, pricing, plans, seat-based pricing, feature entitlements, syncing users, testing, impersonating a user, or testing webhooks locally. Automatically routes to the specific skill based on their task.
— the description by Clerk

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The Clerk router acts as a primary interface for navigating the extensive suite of Clerk-related skills. It identifies the user's specific authentication requirement—ranging from initial project setup and CLI management to framework-specific patterns (Next.js, React, Expo, etc.), B2B organization features, billing, and native mobile implementation—and directs the request to the appropriate specialized skill. It also provides version detection logic to ensure users receive guidance tailored to either Core 2 or current SDK versions.

What it does

  • Routes user requests to the correct Clerk-focused skill based on the task.
  • Provides version detection to distinguish between Core 2 and current SDK patterns.
  • Covers setup, CLI operations, and custom UI implementation.
  • Supports framework-specific patterns for web, mobile, and browser extensions.
  • Manages B2B organization, billing, and subscription-related inquiries.
  • Facilitates access to testing, webhook management, and backend API interactions.

When to use it

  • When you are unsure which Clerk-specific skill is needed for your current task.
  • When you need to determine if your project is using Core 2 or current SDK versions.
  • When starting a new Clerk integration or migrating an existing authentication provider.
  • When performing administrative tasks via the Clerk CLI.
  • When implementing complex features like B2B organizations, billing, or custom sign-in flows.

Advantages

  • Simplifies navigation across a large library of specialized Clerk skills.
  • Ensures version-appropriate guidance for SDKs.
  • Centralizes access to diverse authentication workflows and patterns.
  • Reduces search time by providing a clear mapping of tasks to specific skills.

Usage examples

“How do I set up Clerk in my new Next.js project?”
The router identifies the framework and directs you to the clerk-setup skill for initial configuration.
“I need to test my webhooks locally, what should I do?”
The router recognizes the CLI-related task and directs you to the clerk-cli skill.
“How do I implement seat-based billing for my organization?”
The router directs you to the clerk-billing skill for guidance on pricing and feature entitlements.
“Can you help me with native iOS authentication using Swift?”
The router routes the request to the clerk-swift skill for native mobile implementation guidance.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/clerk/clerk/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip clerk.zip -d .agents/skills

Documentation by Clerk

Clerk Skills Router

Version Detection

Check package.json to determine the Clerk SDK version. This determines which patterns to use:

PackageCore 2 (LTS until Jan 2027)Current
@clerk/nextjsv5–v6v7+
@clerk/react or @clerk/clerk-reactv5–v6v7+
@clerk/expo or @clerk/clerk-expov1–v2v3+
@clerk/react-routerv1–v2v3+
@clerk/tanstack-react-start< v0.26.0v0.26.0+

Default to current if the version is unclear or the project is new. Core 2 packages use @clerk/clerk-react and @clerk/clerk-expo (with clerk- prefix); current packages use @clerk/react and @clerk/expo.

All skills are written for the current SDK. When something differs in Core 2, it's noted inline with > **Core 2 ONLY (skip if current SDK):** callouts. The exception is clerk-custom-ui, which has separate core-2/ and core-3/ directories for custom flow hooks since those APIs are entirely different between versions.


By Task

Adding Clerk to your project → Use clerk-setup

  • Framework detection and quickstart

  • Environment setup, API keys, temporary dev keys via clerk init

  • Migration from other auth providers

  • Native iOS and macOS apps in Xcode, through the iOS setup prompt

Operating Clerk from the CLI → Use clerk-cli

  • Auth, linking, doctor, and environment pulls

  • User, org, session, app, and instance management

  • Impersonating a user (clerk impersonate) and local webhook testing (clerk webhooks listen)

  • Feature toggles (clerk enable orgs, clerk enable billing)

  • Backend, Platform, and Frontend API calls through clerk api

  • Deploy handoff and deploy status verification

Custom sign-in/sign-up UI → Use clerk-custom-ui

  • Custom authentication flows with useSignIn / useSignUp hooks

  • Appearance and styling (themes, colors, layout)

  • <Show> component for conditional rendering

Advanced Next.js patterns → Use clerk-nextjs-patterns

  • Server vs Client auth APIs

  • Middleware strategies

  • Server Actions, caching

  • API route protection

React patterns → Use clerk-react-patterns

  • Hooks (useAuth, useUser, useClerk)

  • Protected routes, auth guards

  • Router integration

React Router patterns → Use clerk-react-router-patterns

  • Loaders & actions with auth

  • Route protection

  • SSR auth

Vue patterns → Use clerk-vue-patterns

  • Composables (useAuth, useUser, useClerk)

  • Vue Router guards

  • Pinia auth store integration

Nuxt patterns → Use clerk-nuxt-patterns

  • Server middleware auth

  • SSR auth with composables

  • Server API routes

Astro patterns → Use clerk-astro-patterns

  • SSR auth pages

  • Island components with React

  • Middleware & API routes

TanStack Start patterns → Use clerk-tanstack-patterns

  • Server functions with auth

  • Route protection via loaders

  • Vite plugin and request middleware setup

Expo / React Native auth → Use clerk-expo

  • Prebuilt native components (AuthView, UserButton)

  • Custom flows: email, password, SMS/phone OTP, MFA

  • OAuth/SSO and native Google/Apple sign-in

  • Expo Router protected routes, token storage, push notifications

Chrome Extension patterns → Use clerk-chrome-extension-patterns

  • Background scripts auth

  • Popup auth flows

  • Content scripts with sync host

B2B / Organizations → Use clerk-orgs

  • Multi-tenant apps

  • Organization slugs in URLs

  • Roles, permissions, RBAC

  • Member management

Billing & Subscriptions → Use clerk-billing

  • <PricingTable /> component

  • Plan and feature gating with has()

  • Seat-based B2B billing with organizations

  • Subscription lifecycle webhooks

  • Free trials, invoicing

Webhooks → Use clerk-webhooks

  • Real-time events

  • Data syncing

  • Notifications & integrations

E2E Testing → Use clerk-testing

  • Playwright/Cypress setup

  • Auth flow testing

  • Test utilities

Swift / native iOS auth → Use clerk-swift

  • Sign-in UI in native iOS and macOS Swift and SwiftUI projects

  • ClerkKitUI prebuilt views and custom ClerkKit flows

  • Source-driven patterns from clerk-ios

  • If Clerk isn't set up yet, set it up first through clerk-setup

Android / native mobile auth → Use clerk-android

  • Native Android Kotlin and Jetpack Compose projects

  • clerk-android-api and clerk-android-ui implementation guidance

  • Source-driven patterns from clerk-android

  • Do not use for Expo or React Native projects

Backend REST API → Use clerk-backend-api

  • Browse API tags and endpoints

  • Inspect endpoint schemas

  • Execute API requests with scope enforcement

Quick Navigation

If you know your task, you can directly access:

  • /clerk-setup - Framework setup

  • /clerk-cli - CLI operations and Clerk resource management

  • /clerk-custom-ui - Custom flows & appearance

  • /clerk-nextjs-patterns - Next.js patterns

  • /clerk-react-patterns - React patterns

  • /clerk-react-router-patterns - React Router patterns

  • /clerk-vue-patterns - Vue patterns

  • /clerk-nuxt-patterns - Nuxt patterns

  • /clerk-astro-patterns - Astro patterns

  • /clerk-tanstack-patterns - TanStack Start patterns

  • /clerk-expo - Expo / React Native

  • /clerk-chrome-extension-patterns - Chrome Extension patterns

  • /clerk-orgs - Organizations

  • /clerk-billing - Billing & subscriptions

  • /clerk-webhooks - Webhooks

  • /clerk-testing - Testing

  • /clerk-swift - Swift/native iOS and macOS UI

  • /clerk-android - Native Android

  • /clerk-backend-api - Backend REST API

Or describe what you need and I'll recommend the right one.

Files

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an API key

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Clerk
Publisher
Clerk (Official)
Source
clerk/skills · skills/clerk · commit c5d2c0d
Licence
MIT License (redistribution allowed)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Clerk.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download clerk.zip