/clerk:clerk-expofrom clerk
Adds Clerk authentication to Expo and React Native apps using @clerk/expo. Covers setup, prebuilt components (AuthView, UserButton), custom sign-in/sign-up flows (email, password, SMS/phone OTP, MFA), OAuth/SSO, native Google/Apple sign-in, Expo Router protected routes, biometrics, and push notifications.
Ships in clerk. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Implement Clerk in Expo / React Native projects. This skill inlines verified patterns for the stable surface (provider, token cache, flows) and requires source inspection of the installed @clerk/expo package for anything volatile (component props, hook signatures).
Activate when either is true:
@clerk/expo, ClerkProvider, Expo Router auth, or Clerk hooks in a native app.app.json / app.config.js, expo in package.json, metro.config.js, @clerk/expo dependency).Route away when:
.xcodeproj, Package.swift) → clerk-swiftbuild.gradle without React Native) → clerk-androidMatch what the user asked for, then load the reference(s) listed. Load only what the task needs.
| User intent (examples) | Path | Reference |
|---|---|---|
| "Add auth to my app" / "add sign-in with Clerk" | Prebuilt native components (default) | references/setup.md + references/prebuilt-components.md |
| "Add auth" but Expo Go / web / custom UI required | Custom flows | references/setup.md + references/custom-flows.md |
| "Add phone / SMS auth", "email OTP", "passwordless" | Custom flow, phoneCode / emailCode | references/custom-flows.md |
| "Sign in with Google/Apple/GitHub", "social login", "SSO" | Browser SSO or native buttons | references/sso-and-native-auth.md |
| "MFA / 2FA / TOTP", "forgot password" | Custom flow additions | references/custom-flows.md |
| "Email link" | Expo web custom flow; native apps use email codes for custom UI or <AuthView /> in a development build | references/custom-flows.md + references/prebuilt-components.md |
| "Protect routes/screens", "redirect if signed out" | Expo Router guards | references/protected-routes.md |
| "Show user profile", "org switching", "push notifications", "sign out", "call my backend" | App recipes | references/recipes.md |
| "Biometric login", "Face ID", "passkeys" | Device features | references/recipes.md |
When the user says "add auth" without specifying UI:
AuthView + UserButton from @clerk/expo/native-components). Fastest to working auth; UI is maintained by Clerk. Tell the developer they are in beta, need the @clerk/expo-native-components package, and require a development build.AuthView (or vice versa) without being asked.Do not blend prebuilt components and custom flows for the same auth step (e.g. AuthView plus a custom password form). Blending is allowed only when the developer explicitly asks.
init flow here. Then follow the Expo setup reference for provider, token cache, config plugin, and build-type steps not already completed.npx tsc --noEmit or equivalent).npx expo run:ios / run:android for native features, npx expo start for Expo Go flows. If the build fails, fix and rebuild iteratively — build errors against the installed SDK are the ground truth when this skill and the SDK disagree. After ~5 failed fix attempts, stop and ask the developer how to proceed instead of thrashing.process.env.EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY in app code. Never NEXT_PUBLIC_, never hardcoded. If the key is missing, follow the appropriate new or existing application path in clerk-setup. Expo has no accountless keys, and an agent's init won't write one without a target application, even when signed in. For a new application, have the developer sign in and select or create an application, then run npx -y clerk@latest init --app <application_id>. For an existing application, have them sign in, link the selected application if needed, then run npx -y clerk@latest env pull. Alternatively, ask the developer for the publishable key from Clerk Dashboard → API keys and wait. Don't continue until a real key is set, and never run a fresh init for an existing Clerk project.https://dashboard.clerk.com/~/native-applications). Tell the developer to verify this during setup; it is required for any native integration.pk_test_ / pk_live_, then drop the trailing $) and fetch <frontendApiUrl>/v1/environment?_is_native=true, or ask the developer to check the dashboard (User & authentication). SMS in particular is instance-configuration-dependent — code written for a disabled factor fails at runtime, not build time.useSignIn() / useSignUp() from @clerk/expo return { signIn, errors, fetchStatus } and use method-based flows: signIn.password(), signIn.phoneCode.sendCode(), signIn.finalize(). Never generate the legacy pattern: destructuring isLoaded/setActive from useSignIn()/useSignUp() (the current hooks don't return them), or signIn.create() chained with prepareFirstFactor()/attemptFirstFactor() + setActive({ session }). That pattern lives at @clerk/expo/legacy and is only for maintaining existing legacy code, never for new work. Scope notes: isLoaded from useAuth()/useUser() is current API and required in guards; signIn.create() itself still exists for advanced cases — prefer the factor-specific methods.useSSO(), never useOAuth() — useOAuth is deprecated. Note the asymmetry: startSSOFlow() still returns { createdSessionId, setActive } and requires setActive({ session: createdSessionId }) — SSO does not use finalize().tokenCache from @clerk/expo/token-cache on ClerkProvider. Never use expo-secure-store directly for session tokens, never AsyncStorage.resourceCache, never secureStore — if offline resource caching comes up, @clerk/expo/secure-store is deprecated; use resourceCache from @clerk/expo/resource-cache.@clerk/expo/native-components) and native hooks (useSignInWithGoogle, useSignInWithApple, useBiometricCredentials) require a development build (npx expo run:ios / run:android), not Expo Go, and don't exist on web. For web targets use @clerk/expo/web components or custom flows. State the build requirement before implementing a native-only feature.<View nativeID="clerk-captcha" />. It is required on Expo web when the instance uses legacy bot sign-up protection. Clerk skips the browser CAPTCHA on iOS and Android, so it is harmless there and keeps the screen web-ready.node_modules/@clerk/expo-native-components/dist/*.d.ts for component props, node_modules/@clerk/expo/dist/**/*.d.ts for hooks, and @clerk/expo's package.json exports. The installed version wins over this skill if they disagree.@clerk/expo 4.17.x. Check the installed version (node_modules/@clerk/expo/package.json). If it is newer than 4.17.x (a newer minor or major), treat this skill's code snippets as suspect: re-verify against the docs URL cited next to each snippet (every reference section carries one) or the installed .d.ts before using them. If it is older than 4.15, offer an upgrade to the latest v4 first. @clerk/expo/native-components arrived in 4.11, the current @clerk/expo-native-components renders blank with @clerk/expo older than 4.14, and useAppVersionSupport() arrived in 4.15. If it is v2 or older, the method-based custom-flows API doesn't exist, so offer an upgrade instead of writing legacy code.expo >=54 <59. v4.0 dropped Expo SDK 53, and v4.13 added SDK 58. React Native 0.75+.| Feature | Install | Import from |
|---|---|---|
AuthView, UserButton, UserProfileView | @clerk/expo-native-components | @clerk/expo/native-components |
useSignInWithGoogle() | @clerk/expo-google-signin (and add its config plugin) | @clerk/expo/google |
useBiometricCredentials() | @clerk/expo-biometrics | @clerk/expo/biometrics |
| Passkeys | @clerk/expo-passkeys | @clerk/expo/passkeys |
@clerk/expo-passkeys fails the bundle.@clerk/expo/native still works but is deprecated. Never use it in new code.useLocalCredentials() is deprecated and will be removed in the next major. Use useBiometricCredentials() for biometric sign-in.@clerk/expo-native-components, the app doesn't include the Clerk iOS and Android SDKs and doesn't require iOS 17.setActive() after native-component auth.@clerk/expo/hosted-auth (useHostedAuth(), sign in through the Account Portal) and @clerk/expo/native-to-web (useAuthenticatedWebView(), openInBrowser(), open your web app already signed in, v4.17+).| Level | Issue | Prevention |
|---|---|---|
| CRITICAL | Generating legacy custom-flow code (signIn.create + prepareFirstFactor + setActive) | Use the current method-based API (Gate 4) |
| CRITICAL | Using useOAuth() | Use useSSO() (Gate 5) |
| CRITICAL | Implementing SMS/social auth without checking the factor is enabled | Check environment/dashboard first (Gate 3) |
| CRITICAL | Native components targeted at Expo Go or web | Require a dev build; offer custom flows otherwise (Gate 8) |
| MEDIUM | Sign-up screen missing <View nativeID="clerk-captcha" /> (breaks Expo web with legacy bot protection) | Always include it (Gate 10) |
| HIGH | NEXT_PUBLIC_ env prefix, or env var read inside node_modules | EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY, passed explicitly to ClerkProvider |
| HIGH | Session lost on restart | tokenCache from @clerk/expo/token-cache on the provider |
| HIGH | Calling setActive() after AuthView / UserButton auth | Native components sync sessions automatically |
| HIGH | Pairing AuthView with useSignInWithGoogle/useSignInWithApple | AuthView renders enabled social providers itself |
| HIGH | Calling WebBrowser.maybeCompleteAuthSession() manually | ClerkProvider handles it |
| HIGH | Splitting sign-in / sign-up without being asked | Combined flow by default (Gate 9) |
| MEDIUM | Missing isLoaded check before isSignedIn in guards | Always gate on isLoaded first |
| MEDIUM | Using yalc/pnpm link for local @clerk/expo development | Use Verdaccio or pkg.pr.new |
clerk — top-level routerclerk-swift / clerk-android — native mobile SDKsclerk-orgs, clerk-billing, clerk-webhooks — feature skills (hooks work the same in Expo)node_modules/@clerk/expo/evals/evals.json (opens in a new tab)references/custom-flows.md (opens in a new tab)references/prebuilt-components.md (opens in a new tab)references/protected-routes.md (opens in a new tab)references/recipes.md (opens in a new tab)references/setup.md (opens in a new tab)references/sso-and-native-auth.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub clerk/skills --plugin clerk21 skills in this plugin
/clerkClerk 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, migrating or importing users from another auth provider, testing, impersonating a user, testing webhooks locally, or reading Application Logs to debug a sign-in or sign-up. Automatically routes to the specific skill based on their task./clerk-androidImplement Clerk authentication for native Android apps using Kotlin and Jetpack Compose with clerk-android source-guided patterns. Use for prebuilt AuthView/UserButton or custom API-driven auth flows. Do not use for Expo or React Native projects./clerk-astro-patternsAstro patterns with Clerk — middleware, SSR pages, island components, API routes, static vs SSR rendering. Triggers on: astro clerk, clerk astro middleware, astro protected page, clerk island component, astro API route auth, clerk astro SSR./clerk-backend-apiClerk Backend REST API explorer and executor. Browse tags, inspect endpoint schemas, and execute authenticated requests. Use when listing users, managing organizations, or calling any Clerk API endpoint./clerk-billingClerk Billing for subscription management - render Clerk's PricingTable and in-app checkout drawer, configure subscription plans, seat-limit plans for B2B, feature entitlements with has(), and billing webhooks. Use for SaaS monetization, plan gating, checkout flows, trials, invoicing, and subscription lifecycle management./clerk-chrome-extension-patternsChrome Extension auth with @clerk/chrome-extension -- popup/sidepanel setup, syncHost for OAuth/SAML via web app, createClerkClient for service workers and headless extensions, stable CRX ID. Triggers on: Chrome extension auth, Plasmo clerk, popup sign-in, syncHost, background service worker token, createClerkClient, headless extension.Other plugins' skills for the same job