/clerk:clerk-swiftfrom clerk
Implements Clerk authentication UI in native Swift apps for iOS and macOS using ClerkKitUI prebuilt views or custom ClerkKit flows. Handles setup via Clerk CLI or manual quickstart.
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.
This skill builds Clerk authentication UI in native Swift projects: prebuilt ClerkKitUI views or custom flows on ClerkKit. Setup (SDK, capabilities, native registration, and Clerk initialization) comes first and has its own workflow.
Activate this skill when either condition is true:
.xcodeproj, .xcworkspace, Package.swift, Swift targets).Do not activate this skill when either condition is true:
If Expo/React Native signals are present, route to the general setup skill instead of this one.
If Clerk isn't set up yet (no clerk-ios package, no Clerk.configure call, or no Clerk application chosen), follow the iOS setup prompt before any UI work. It uses the Clerk CLI to choose a Clerk application, install the SDK, configure capabilities, register the native app, and hand off the remaining Swift integration. The CLI also supplies the publishable key, so don't ask the user to paste one.
If the CLI can't set up the project (for example, Xcode isn't available or the project isn't supported), follow the manual iOS quickstart instead.
If the user already asked for sign-in UI, such as a custom flow, continue here once setup's build check passes. Otherwise, return to this skill when the user wants sign-in UI added or changed.
| Task | Reference |
|---|---|
| Prebuilt AuthView / UserButton (fastest) | references/prebuilt.md |
| Custom API-driven auth flows (full control) | references/custom.md |
| Native Sign in with Apple setup, before a flow is chosen | "Sign in with Apple" under Prerequisites in references/prebuilt.md (references/custom.md has the same steps) |
| Step | Action |
|---|---|
| 1 | Confirm the project is native Swift and not Expo/React Native |
| 2 | If Clerk isn't set up, follow the iOS setup prompt first (see above) |
| 3 | Determine the flow type (prebuilt or custom); ask if it's undecided, then load the matching reference |
| 4 | Check the prerequisites the selected flow needs, such as a package product or capability, and make only the targeted changes that are missing |
| 5 | Implement the flow by following the selected reference |
| 6 | Build the target and report what remains unverified |
User asks for Clerk in Swift
|
+-- Expo/React Native project detected?
| |
| +-- YES -> Do not use this skill
| |
| +-- NO -> Continue
|
+-- Clerk set up in this project?
| |
| +-- NO -> Follow the iOS setup prompt (manual quickstart if the CLI can't)
| |
| +-- YES -> Continue
|
+-- Existing auth UI detected?
| |
| +-- Prebuilt views detected -> Load references/prebuilt.md
| |
| +-- Custom flow detected -> Load references/custom.md
| |
| +-- New implementation -> Ask developer prebuilt/custom, then load matching reference
|
+-- Make targeted prerequisite changes for the selected flow
|
+-- Implement using selected flow reference
After flow type is known, load exactly one:
Do not blend the two references in a single implementation unless the developer explicitly asks for a hybrid approach.
Before UI implementation edits, the agent must have a flow choice: prebuilt or custom. If it's missing, ask the user and wait for the answer. Only skip asking when the user has already chosen in this conversation or the existing UI makes the choice clear.
Clerk.configure call and how the app loads its publishable key, including plist, build-setting, or other custom key loading. Don't replace it with a hardcoded key.npx -y clerk@latest doctor. It reports SDK linkage, capabilities, native registration, and the Apple connection.Use the installed clerk-ios package source as the reference for UI behavior, especially for custom flows.
| Use Case | Source of Truth in Installed Package |
|---|---|
| SDK products, platform support, and dependency constraints | Package manifest and target product definitions for ClerkKit and ClerkKitUI |
| Auth flow sequencing and gating | ClerkKitUI AuthView implementation and how it reads the injected Clerk instance's environment |
| Native Sign in with Apple | Apple sign-in behavior in the selected flow reference |
prebuilt or custom.| Level | Issue | Prevention |
|---|---|---|
| CRITICAL | Doing setup by hand when Clerk isn't set up | Follow the iOS setup prompt; it runs the Clerk CLI. Use the manual quickstart only when the CLI can't set up the project |
| CRITICAL | Asking the user to paste a publishable key | The CLI provides it during setup; keep an existing app's own key loading |
| CRITICAL | Replacing custom key loading or existing setup | Keep the existing Clerk.configure, packages, and capabilities; add only what's missing |
| CRITICAL | Starting UI implementation before the flow type is confirmed | Confirm the flow first and load the matching reference |
| CRITICAL | Custom flow layout diverges from AuthView without explicit request | Keep custom screens materially close to AuthView structure and step composition by default |
| CRITICAL | Collapsing custom auth into a single all-fields screen | Follow AuthView-style multi-step progression and step-specific field collection |
| CRITICAL | Guessing custom sequencing or gating when uncertain | Reference installed ClerkKitUI behavior and mirror it |
| HIGH | Hardcoding this instance's current settings into custom flow code | Gate steps at runtime from the injected Clerk instance's environment, as AuthView does |
| HIGH | Using this skill for Expo/React Native | Detect and route away before implementation |
clerk skill for top-level Clerk routingclerk-setup skill for non-native or cross-framework setuphttps://github.com/clerk/clerk-iosWhat SKILL.md sets; muted values are Claude Code's defaults
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-patternsOther plugins' skills for the same job