skills/clerk-android/SKILL.md
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 skillsauth add awfixers-stuff/opencode-config clerk-androidInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill implements Clerk in native Android projects by following current clerk-android SDK and docs patterns.
Activate this skill when either condition is true:
build.gradle(.kts) with Android plugins, AndroidManifest.xml, app/src/main/java, Compose UI files).Do not activate this skill when either condition is true:
If Expo/React Native signals are present, route to the general setup skill instead.
| Task | Reference | |------|-----------| | Prebuilt AuthView / UserButton (fastest) | references/prebuilt.md | | Custom API-driven auth flows (full control) | references/custom.md |
| Step | Action |
|------|--------|
| 1 | Confirm project type is native Android and not Expo/React Native |
| 2 | Determine flow type (prebuilt or custom) and load the matching reference file |
| 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 clerk-android source/sample patterns relevant to selected flow |
| 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 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 any implementation edits, the agent must have both:
prebuilt or customIf either value is missing from the user request/context:
Only skip asking when the user has already explicitly provided the value in this conversation.
Do not hardcode implementation examples in this skill. Inspect current clerk-android source/docs for the installed SDK version before implementing.
| Use Case | Source of Truth |
|----------|-----------------|
| SDK artifacts and dependency split (clerk-android-api vs clerk-android-ui) | clerk-android README and Android install docs |
| SDK initialization and publishable key wiring | Android quickstart and source/api/.../Clerk.kt |
| Prebuilt auth and profile behavior | source/ui/.../AuthView.kt, source/ui/.../UserButton.kt, and prebuilt sample |
| Custom auth sequencing and factor handling | source/ui/auth/*, source/api/auth/*, and custom-flows sample |
| Capability/feature gating from instance settings | Clerk public fields (for example enabledFirstFactorAttributes, socialProviders, isGoogleOneTapEnabled, mfaIsEnabled) and environment model source |
| Required Android setup checklist | Official Android quickstart (/docs/android/getting-started/quickstart) |
Clerk.initialize(...).clerk-android-ui (includes API).clerk-android-api unless prebuilt components are explicitly requested.Clerk.isInitialized) before assuming auth-ready state.custom flow, preserve multi-step auth progression and factor-specific handling (no single all-fields form by default).prebuilt flow, do not rebuild auth forms with custom API calls unless explicitly requested.AuthView/UserButton as default building blocks.prebuilt or custom.Clerk.initialize(...) path and publishable key wiring are valid.| Level | Issue | Prevention |
|-------|-------|------------|
| CRITICAL | Not asking for missing flow choice before implementation | Ask for prebuilt vs custom and wait before edits |
| 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 Clerk.initialize(...) call | Initialize Clerk from Application startup path |
| HIGH | Wrong artifact for chosen flow | Prebuilt: clerk-android-ui; custom: clerk-android-api |
| HIGH | Rendering auth UI before SDK initialization completes | Gate UI with Clerk.isInitialized state |
| 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 for top-level Clerk routingclerk-setup skill for cross-framework quickstart setuphttps://github.com/clerk/clerk-androidhttps://clerk.com/docs/android/getting-started/quickstartdevelopment
Use when starting dev servers, watchers, tilt, or any process expected to outlive the conversation. Provides zmx session management patterns for long-lived processes.
development
Zig testing skill for writing and running tests. Use when using zig build test, writing comptime tests, using test filters, working with test allocators to detect leaks, or using Zig's built-in fuzz testing (0.14+). Activates on queries about Zig tests, zig test, zig build test, comptime testing, test allocators, Zig fuzz testing, or detecting memory leaks in Zig tests.
development
Zig debugging skill. Use when debugging Zig programs with GDB or LLDB, interpreting Zig runtime panics, using std.debug.print for tracing, configuring debug builds, or debugging Zig programs in VS Code. Activates on queries about debugging Zig, Zig panics, zig gdb, zig lldb, std.debug.print, Zig stack traces, or Zig error return traces.
tools
Zig cross-compilation skill. Use when cross-compiling Zig programs to different targets, using Zig's built-in cross-compilation for embedded, WASM, Windows, ARM, or using zig cc to cross-compile C code without a system cross-toolchain. Activates on queries about Zig cross-compilation, zig target triples, zig cc cross-compile, Zig embedded targets, or Zig WASM.