clerk-android by clerk/skills
npx skills add https://github.com/clerk/skills --skill clerk-android此技能通过遵循当前 clerk-android SDK 和文档模式,在原生 Android 项目中实现 Clerk。
当满足以下任一条件时激活此技能:
build.gradle(.kts)、AndroidManifest.xml、app/src/main/java、Compose UI 文件)。当满足以下任一条件时不要激活此技能:
如果存在 Expo/React Native 信号,请转而路由到通用设置技能。
| 步骤 | 操作 |
|---|---|
| 1 | 确认项目类型是原生 Android 而非 Expo/React Native |
| 2 | 确定流程类型( 或 )并加载匹配的参考文件 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
prebuiltcustom| 3 | 确保存在真实的 Clerk publishable key(或询问开发者) |
| 4 | 确保为所选流程安装了正确的 Clerk artifacts |
| 5 | 阅读官方 Android 快速入门并验证所需的设置(Native API、最低 SDK/Java 版本、清单文件、初始化) |
| 6 | 检查与所选流程相关的 clerk-android 源代码/示例模式 |
| 7 | 仅遵循所选参考清单来实现流程 |
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
确定流程类型后,精确加载其中一个:
除非开发者明确要求混合方法,否则不要在单个实现中混合使用这两个参考。
在进行任何实现编辑之前,代理必须同时具备:
prebuilt 或 custom如果用户请求/上下文中缺少任一值:
仅当用户在此对话中已明确提供了该值时,才跳过询问。
不要在此技能中硬编码实现示例。在实现之前,检查已安装 SDK 版本的当前 clerk-android 源代码/文档。
| 用例 | 事实来源 |
|---|---|
SDK artifacts 和依赖项拆分(clerk-android-api 与 clerk-android-ui) | clerk-android README 和 Android 安装文档 |
| SDK 初始化和 publishable key 连接 | Android 快速入门和 source/api/.../Clerk.kt |
| 预构建身份验证和个人资料行为 | source/ui/.../AuthView.kt、source/ui/.../UserButton.kt 和预构建示例 |
| 自定义身份验证序列和因素处理 | source/ui/auth/*、source/api/auth/* 和自定义流程示例 |
| 来自实例设置的功能/特性门控 | Clerk 公共字段(例如 enabledFirstFactorAttributes、socialProviders、isGoogleOneTapEnabled、mfaIsEnabled)和环境模型源代码 |
| 必需的 Android 设置清单 | 官方 Android 快速入门(/docs/android/getting-started/quickstart) |
Clerk.initialize(...) 中。clerk-android-ui(包含 API)。clerk-android-api。Clerk.isInitialized)。custom 流程,保留多步骤身份验证进程和特定因素处理(默认情况下不使用单一的全字段表单)。prebuilt 流程,除非明确请求,否则不要使用自定义 API 调用重建身份验证表单。AuthView/UserButton 作为默认构建块。prebuilt 或 custom。Clerk.initialize(...) 路径和 publishable key 连接有效。| 级别 | 问题 | 预防措施 |
|---|---|---|
| CRITICAL | 在实现前未询问缺失的流程选择 | 在编辑前询问 prebuilt 与 custom 并等待回答 |
| CRITICAL | 在实现前未询问缺失的 publishable key | 在编辑前询问密钥并等待回答 |
| CRITICAL | 在确认流程类型之前开始实现 | 首先确认流程并加载匹配的参考 |
| CRITICAL | 跳过 Android 快速入门先决条件 | 验证并应用官方 Android 快速入门中所需的设置 |
| CRITICAL | 缺少应用级别的 Clerk.initialize(...) 调用 | 从 Application 启动路径初始化 Clerk |
| HIGH | 为所选流程使用了错误的 artifact | 预构建:clerk-android-ui;自定义:clerk-android-api |
| HIGH | 在 SDK 初始化完成之前渲染身份验证 UI | 使用 Clerk.isInitialized 状态控制 UI |
| HIGH | 硬编码身份验证因素/社交提供商 | 根据 Clerk 运行时功能字段驱动行为 |
| HIGH | 将此技能用于 Expo/React Native | 在实现之前检测并路由到其他技能 |
../clerk/SKILL.md 用于顶级 Clerk 路由../setup/SKILL.md 用于跨框架快速入门设置https://github.com/clerk/clerk-androidhttps://clerk.com/docs/android/getting-started/quickstart每周安装量
284
仓库
GitHub Stars
30
首次出现
13 天前
安全审计
安装于
gemini-cli275
codex275
cursor275
github-copilot274
kimi-cli274
amp274
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.
| 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/*, , and custom-flows sample |
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 |
../clerk/SKILL.md for top-level Clerk routing../setup/SKILL.md for cross-framework quickstart setuphttps://github.com/clerk/clerk-androidhttps://clerk.com/docs/android/getting-started/quickstartWeekly Installs
284
Repository
GitHub Stars
30
First Seen
13 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykFail
Installed on
gemini-cli275
codex275
cursor275
github-copilot274
kimi-cli274
amp274
OpenClaw 安全 Linux 云部署指南:私有优先、SSH隧道、Podman容器化
19,500 周安装
source/api/auth/*| 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) |
| 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 |