Generated banner for Clerk Android
Generated logo for Clerk Android

Clerk Android

ClerkOfficialCreated by clerk

  • Skill
  • Tool integration
  • Software development
  • MIT
  • No issues found

From the author

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.
— the description by clerk

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured approach to implementing Clerk authentication in native Android projects. It supports two primary integration paths: a prebuilt UI flow using AuthView and UserButton for rapid deployment, and a custom API-driven flow for developers requiring full control over the authentication sequence. The skill ensures compliance with official Android quickstart requirements, proper SDK initialization, and capability-driven logic that respects dashboard configurations.

What it does

  • Guides the setup of Clerk authentication in native Android apps.
  • Supports prebuilt UI components for fast integration.
  • Enables custom API-driven authentication flows for specialized requirements.
  • Ensures correct SDK initialization and state management.
  • Validates project prerequisites like manifest permissions and SDK versions.
  • Promotes capability-driven development based on Clerk runtime settings.

When to use it

  • When adding authentication to a native Android application using Kotlin.
  • When using Jetpack Compose for UI development.
  • When you need to choose between prebuilt auth screens or a custom-built auth experience.
  • When you need to ensure your Android project meets Clerk's specific integration requirements.

Advantages

  • Provides clear separation between prebuilt and custom implementation paths.
  • Enforces mandatory setup checks to prevent common integration errors.
  • Promotes clean architecture by separating UI, state, and API logic.
  • Ensures authentication behavior remains consistent with dashboard settings.

Usage examples

“How do I add Clerk to my new Android app using the prebuilt UI?”
The agent will verify your project type, ask for your Clerk publishable key, and guide you through installing the clerk-android-ui artifact and implementing AuthView.
“I need to build a custom sign-in flow for my Android app using Clerk.”
The agent will confirm your requirements, ask for your publishable key, and provide a checklist for using the clerk-android-api artifact to build a multi-step auth flow.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/clerk/clerk-android/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip clerk-android.zip -d .agents/skills

Documentation by clerk

Clerk Android (Native)

This skill implements Clerk in native Android projects by following current clerk-android SDK and docs patterns.

Activation Rules

Activate this skill when either condition is true:

  • The user explicitly asks for Android, Kotlin, Jetpack Compose, or native mobile Clerk implementation on Android.

  • The project appears to be native Android (for example 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:

  • The project is Expo.

  • The project is React Native.

If Expo/React Native signals are present, route to the general setup skill instead.

What Do You Need?

TaskReference
Prebuilt AuthView / UserButton (fastest)references/prebuilt.md
Custom API-driven auth flows (full control)references/custom.md

Quick Start

StepAction
1Confirm project type is native Android and not Expo/React Native
2Determine flow type (prebuilt or custom) and load the matching reference file
3Ensure a real Clerk publishable key exists (or ask developer)
4Ensure correct Clerk artifacts are installed for the selected flow
5Read official Android quickstart and verify required setup (Native API, min SDK/Java, manifest, initialization)
6Inspect clerk-android source/sample patterns relevant to selected flow
7Implement flow by following only the selected reference checklist

Decision Tree

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

Flow References

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.

Interaction Contract

Before any implementation edits, the agent must have both:

  • flow choice: prebuilt or custom

  • a real Clerk publishable key

If either value is missing from the user request/context:

  • ask the user for the missing value(s)

  • pause and wait for the answer

  • do not edit files or install dependencies yet

Only skip asking when the user has already explicitly provided the value in this conversation.

Source-Driven Templates

Do not hardcode implementation examples in this skill. Inspect current clerk-android source/docs for the installed SDK version before implementing.

Use CaseSource 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 wiringAndroid quickstart and source/api/.../Clerk.kt
Prebuilt auth and profile behaviorsource/ui/.../AuthView.kt, source/ui/.../UserButton.kt, and prebuilt sample
Custom auth sequencing and factor handlingsource/ui/auth/*, source/api/auth/*, and custom-flows sample
Capability/feature gating from instance settingsClerk public fields (for example enabledFirstFactorAttributes, socialProviders, isGoogleOneTapEnabled, mfaIsEnabled) and environment model source
Required Android setup checklistOfficial Android quickstart (/docs/android/getting-started/quickstart)

Execution Gates (Do Not Skip)

  1. No implementation edits before prerequisites

  • Do not edit project files until flow type is confirmed and a valid publishable key is available.

  1. Missing flow or key must trigger a question

  • If flow choice is missing, explicitly ask: prebuilt views or custom flow.

  • If publishable key is missing/placeholder/invalid, explicitly ask for a real key.

  • Do not continue until both answers are provided.

  1. Publishable key wiring mode is mandatory

  • By default, wire the developer-provided key directly in Clerk.initialize(...).

  • Do not introduce secret-management indirection unless explicitly requested.

  1. Artifact install policy is mandatory

  • Prebuilt flow: use clerk-android-ui (includes API).

  • Custom flow: use clerk-android-api unless prebuilt components are explicitly requested.

  • If Clerk artifacts are missing, add the latest stable release available.

  1. Android quickstart compliance is mandatory

  • Verify Native API is enabled for the Clerk app.

  • Verify Android requirements from quickstart are implemented in project (minimum SDK and Java target, manifest internet permission, app-level Clerk initialization).

  • Verify app waits for SDK initialization (Clerk.isInitialized) before assuming auth-ready state.

  1. Capability-driven behavior is mandatory

  • Use Clerk runtime capability/settings state (for example enabled factors/social providers/MFA flags) to gate flow behavior.

  • Do not hardcode factor assumptions that may conflict with dashboard configuration.

  1. Reference-file discipline is mandatory

  • Once flow is selected, follow only that flow reference file for implementation and verification.

  1. Custom-flow structure parity is mandatory

  • For custom flow, preserve multi-step auth progression and factor-specific handling (no single all-fields form by default).

  • Keep UI, state orchestration, and Clerk API integration in separate modules.

  1. Prebuilt preference is mandatory when selected

  • For prebuilt flow, do not rebuild auth forms with custom API calls unless explicitly requested.

  • Use AuthView/UserButton as default building blocks.

Workflow

  1. Detect native Android vs Expo/React Native.

  2. If flow type is not explicitly provided, ask user for prebuilt or custom.

  3. If publishable key is not explicitly provided, ask user for it.

  4. Wait for both answers before changing files.

  5. Load matching flow reference file.

  6. Ensure Clerk.initialize(...) path and publishable key wiring are valid.

  7. Ensure dependencies/artifacts match selected flow.

  8. Review Android quickstart requirements and apply missing setup in project.

  9. Implement using selected reference checklist.

  10. Verify using selected reference checklist plus shared gates.

Common Pitfalls

LevelIssuePrevention
CRITICALNot asking for missing flow choice before implementationAsk for prebuilt vs custom and wait before edits
CRITICALNot asking for missing publishable key before implementationAsk for key and wait before edits
CRITICALStarting implementation before flow type is confirmedConfirm flow first and load matching reference
CRITICALSkipping Android quickstart prerequisitesVerify and apply required setup from official Android quickstart
CRITICALMissing app-level Clerk.initialize(...) callInitialize Clerk from Application startup path
HIGHWrong artifact for chosen flowPrebuilt: clerk-android-ui; custom: clerk-android-api
HIGHRendering auth UI before SDK initialization completesGate UI with Clerk.isInitialized state
HIGHHardcoding auth factors/social providersDrive behavior from Clerk runtime capability fields
HIGHUsing this skill for Expo/React NativeDetect and route away before implementation

See Also

  • clerk skill for top-level Clerk routing

  • clerk-setup skill for cross-framework quickstart setup

  • https://github.com/clerk/clerk-android

  • https://clerk.com/docs/android/getting-started/quickstart

Files

references/prebuilt.md

Prebuilt Flow Reference (Clerk Android UI)

Use this file only when flow type is prebuilt.

Purpose

Implement native Android auth with Clerk prebuilt Compose views (AuthView, UserButton) instead of building custom auth UI logic.

Required Patterns

  1. Artifact selection

  • Ensure com.clerk:clerk-android-ui is installed (it includes API artifact transitively).

  • Do not add clerk-android-api separately unless the project explicitly needs it.

  • Use the latest stable release unless the developer requests a specific version.

  1. Quickstart prerequisite audit

  • Read the official Android quickstart: https://clerk.com/docs/android/getting-started/quickstart.

  • Verify required setup is present:

    • Native API is enabled in Clerk Dashboard.

    • Project min SDK and Java target meet Clerk Android requirements.

    • android.permission.INTERNET is present in AndroidManifest.xml.

    • App-level initialization calls Clerk.initialize(...) in Application startup.

  • If any required setup is missing, implement it before finishing prebuilt auth work.

  1. Initialization and state gating

  • Treat SDK initialization as async/non-blocking.

  • Gate signed-in/signed-out rendering using Clerk.isInitialized and Clerk.userFlow.

  • Show loading while initialization is in progress.

  1. Signed-in/out presentation pattern

  • Default signed-out UI: AuthView().

  • Default signed-in UI: UserButton() (or app content with UserButton entry point).

  • Keep AuthView() in combined sign-in-or-sign-up behavior unless explicitly requested otherwise.

  1. Capability alignment

  • If social/OAuth options appear inconsistent with expected behavior, verify dashboard config and runtime capability fields (Clerk.socialProviders, Clerk.isGoogleOneTapEnabled, MFA flags).

  • Do not hardcode provider availability.

  1. Minimal customization by default

  • Do not replace prebuilt views with custom forms unless the developer asks for custom flow.

  • Keep customization focused on layout placement/theme integration.

Verification Checklist

  1. Quickstart prerequisites are complete

  • Native API enabled.

  • Required Android project setup from quickstart is present.

  • Missing required prerequisites were applied, not only reported.

  1. Correct prebuilt artifact usage

  • clerk-android-ui is installed.

  • Versioning follows latest stable by default.

  1. Auth UI gating correctness

  • UI waits for Clerk.isInitialized.

  • Signed-out state renders AuthView().

  • Signed-in state renders UserButton() or user content that includes it.

  1. Capability correctness

  • Social/MFA behavior aligns with runtime capability state and dashboard configuration.

  1. No accidental custom-flow rewrite

  • No unnecessary custom sign-in/sign-up form logic was introduced.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Declares allowed tools

The author says: Requires Android Studio and clerk-android Gradle dependency

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
clerk
Publisher
Clerk (Official)
Source
clerk/skills · skills/clerk-android · commit c5d2c0d
Licence
MIT License (redistribution allowed)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by clerk.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download clerk-android.zip