clerk
Installation
Summary
Intelligent router that directs authentication tasks to specialized Clerk skills based on your framework and use case.
- Routes to eight specialized skills covering setup, custom UI, Next.js patterns, organizations, webhooks, testing, native iOS/Android, and backend API
- Detects Clerk SDK version (Core 2 LTS vs. current) from
package.jsonto apply correct patterns and APIs - Covers web frameworks (Next.js, React, Expo, React Router, TanStack Start) and native platforms (Swift/iOS, Kotlin/Android)
- Includes inline callouts for Core 2-specific differences, with separate directories for custom UI hooks that differ between SDK versions
SKILL.md
Clerk Skills Router
Version Detection
Check package.json to determine the Clerk SDK version. This determines which patterns to use:
| Package | Core 2 (LTS until Jan 2027) | Current |
|---|---|---|
@clerk/nextjs |
v5–v6 | v7+ |
@clerk/react or @clerk/clerk-react |
v5–v6 | v7+ |
@clerk/expo or @clerk/clerk-expo |
v1–v2 | v3+ |
@clerk/react-router |
v1–v2 | v3+ |
@clerk/tanstack-react-start |
< v0.26.0 | v0.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.