Loading...
Loading...
Implement 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.
npx skill4agent add clerk/skills clerk-androidclerk-androidbuild.gradle(.kts)AndroidManifest.xmlapp/src/main/java| Step | Action |
|---|---|
| 1 | Confirm project type is native Android and not Expo/React Native |
| 2 | Determine flow type ( |
| 3 | Ensure a real Clerk publishable key exists (or ask developer) |
| 4 | Ensure correct Clerk artifacts are installed for the selected flow |
| 5 | Read official Android quickstart and verify required setup (Native API, min SDK/Java, manifest, initialization) |
| 6 | Inspect |
| 7 | Implement flow by following only the selected reference checklist |
User asks for Clerk in Android/Kotlin
|
+-- Expo/React Native project detected?
| |
| +-- YES -> Do not use this skill
| |
| +-- NO -> 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
|
+-- Ensure publishable key and SDK initialization path
|
+-- Ensure correct Android artifacts are installed
|
+-- Verify quickstart prerequisites in project
|
+-- Implement using selected flow referenceprebuiltcustomclerk-android| Use Case | Source of Truth |
|---|---|
SDK artifacts and dependency split ( | |
| SDK initialization and publishable key wiring | Android quickstart and |
| Prebuilt auth and profile behavior | |
| Custom auth sequencing and factor handling | |
| Capability/feature gating from instance settings | |
| Required Android setup checklist | Official Android quickstart ( |
Clerk.initialize(...)clerk-android-uiclerk-android-apiClerk.isInitializedcustomprebuiltAuthViewUserButtonprebuiltcustomClerk.initialize(...)| Level | Issue | Prevention |
|---|---|---|
| CRITICAL | Not asking for missing flow choice before implementation | Ask for |
| CRITICAL | Not asking for missing publishable key before implementation | Ask for key and wait before edits |
| CRITICAL | Starting implementation before flow type is confirmed | Confirm flow first and load matching reference |
| CRITICAL | Skipping Android quickstart prerequisites | Verify and apply required setup from official Android quickstart |
| CRITICAL | Missing app-level | Initialize Clerk from |
| HIGH | Wrong artifact for chosen flow | Prebuilt: |
| HIGH | Rendering auth UI before SDK initialization completes | Gate UI with |
| HIGH | Hardcoding auth factors/social providers | Drive behavior from Clerk runtime capability fields |
| HIGH | Using this skill for Expo/React Native | Detect and route away before implementation |
../clerk/SKILL.md../setup/SKILL.mdhttps://github.com/clerk/clerk-androidhttps://clerk.com/docs/android/getting-started/quickstart