All skills
clerk avatar

/clerk-android

@dbc2e14 official
by clerkclerk/skills83 stars
5

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.

Use this Skill: https://skilld.dev/gh/clerk/skills/clerk-android

This session only. Nothing lands on disk.

referencesprebuilt.md

≈690 tokens on demand. Your agent reads this file only when SKILL.md points to it.

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.

Source: SKILL.md on GitHub

No alerts16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides safe and standard instructions for integrating Clerk authentication into native Android applications using official SDKs and documentation.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    3/4 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at dbc2e14. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 6 months ago
What it can do
Network
metadata
{
  "author": "clerk",
  "version": "1.2.0"
}
compatibility
Requires Android Studio and clerk-android Gradle dependency
All 1 allowed tools
WebFetch
  • android
  • kotlin
  • jetpack-compose
  • clerk
  • authentication
  • native-mobile
  • auth-ui

README badge

README badge for clerk/skills/clerk-android

Implements Clerk authentication in native Android apps using the clerk-android SDK with Kotlin and Jetpack Compose, supporting both prebuilt AuthView/UserButton components and custom API-driven flows. Does not work with Expo or React Native projects.

Generated from the current SKILL.md.

Does this skill work with Expo or React Native?
No. This skill is for native Android projects only. For Expo or React Native, use the general Clerk setup skill instead.
What are the two auth flow options?
Prebuilt flow uses AuthView and UserButton components for fastest setup. Custom flow gives full control over the auth UI and sequencing by calling the Clerk API directly.
Do I need a publishable key to use this skill?
Yes. The skill requires a real Clerk publishable key and will ask for it before making any implementation changes.
Which Gradle dependency should I add?
For prebuilt flow, add clerk-android-ui (which includes the API). For custom flow, add clerk-android-api unless you also need prebuilt components.
What Android setup does this skill verify?
The skill checks that the Clerk Native API is enabled, minimum SDK and Java version match requirements, internet permission is in the manifest, and app-level Clerk initialization is in place before auth is used.

Generated from the current SKILL.md. These answers refresh after source changes.