restore-credentials
提供使用 androidx.credentials 库实现 Android 恢复凭证(Restore Credentials)功能的知识与工作流。使用此 skill 创建恢复密钥、用其登录、删除恢复密钥,在设备恢复后实现新设备上的静默登录。涵盖版本兼容性、依赖、服务端前提条件,以及创建、读取、清除恢复密钥的完整客户端…
Skill by Google LLC
Chalk Labs
Need help deploying restore-credentials?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/iskenkenya-restore-credentials
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Nov 2, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/restore-credentials
What's inside
- Skill name
restore-credentials- Description
- 提供使用 androidx.credentials 库实现 Android 恢复凭证(Restore Credentials)功能的知识与工作流。使用此 skill 创建恢复密钥、用其登录、删除恢复密钥,在设备恢复后实现新设备上的静默登录。涵盖版本兼容性、依赖、服务端前提条件,以及创建、读取、清除恢复密钥的完整客户端实现。
- License
- GPL-3.0
- Metadata
- author: Google LLC · last-updated: 2026-09-14
- Instructions
- 337 lines in SKILL.md · view on GitHub
Files (4)
- SKILL.md
- application-element.md · references/android/guide/topics/manifest/
- create-passkeys.md · references/android/identity/passkeys/
- sign-in-with-passkeys.md · references/android/identity/passkeys/
SKILL.md (first lines)
## Fundamentals
The objective is to implement the **Restore Credentials** feature through the
Android Credential Manager API (`androidx.credentials`). This allows apps that
use or are integrating Credential Manager to silently log users back in when
they restore their app on a new device. Restore Credentials operates
independently of the app's primary authentication method (passwords, passkeys,
federated sign-in) and requires no UI changes to existing sign-in flows.
### Scope
**Crucial:** This skill focuses exclusively on the Android client-side
integration. It does **not** implement the server-side cryptographic
validation logic. The developer must be reminded of this and the
[Points to inform the developer about](#backend-guidelines) after implementation is done.
## Implementation Guidelines
When instructed to implement Restore Credentials on a developer's application,
remember the following:
1. Before the implementation, you **MUST** read and understand the [Two-Tier
Restoration Architecture](#two-tier-restoration-architecture) and review the [DOs and DON'Ts](#dos-and-donts).
2. After the implementation, you **MUST** present the developer with the [Backend Guidelines](#backend-guidelines) as a reminder for their backend setup. It is important that you remind the developer that they still have to implement the backend.
## Two-Tier Restoration Architecture
To enable a resilient sign-in experience, retrieve credentials through a
**two-tier architecture**:
1. **Tier 1 (Primary - Background):** Executes automatically during device setup using the app's `BackupAgent.onRestoreFinished()` callback. This provides an invisible restoration before the user opens the app for the first time, allowing background sync and notification delivery.
2. **Tier 2 (Secondary - Foreground):** Runs in the Launcher `Activity.onCreate()` to catch failovers if background restoration didn't complete (example: dropped network, delayed restoration) or if `allowBackup` is disabled.
If `allowBackup` in the manifest is set to true, implement both. Otherwise, only
implement tier 2 (Foreground Restoration). Do **NOT** change the value of
`allowBackup` in the manifest.
If you added a `BackupAgent` to the app, you **MUST** also set
`android:fullBackupOnly="true"` in the manifest. Do **NOT** do this if there
already existed a `BackupAgent` in the app before your implementation.
## DOs and DON'Ts
**DO:**
- Do check `AndroidManifest.xml` for the value of allowBackup to determine what you have to implement.
- Do implement a fallback for createCredential: always try calling it first with `isCloudBackupEnabled` set to true. If an `E2eeUnavailableException` is thrown, catch it and retry the call with `isCloudBackupEnabled` set to `false`.
- Do implement a `BackupAgent` (subclass of `android.app.backup.BackupAgent`) if `allowBackup` is true in the manifest.
- Do set `android:fullBackupOnly="true"` in the manifest if you added a `BackupAgent` to the app.
- Call `clearCredentialState()` when the user signs out. This is a mandatory security measure to log the user out fully.
- Do attempt to get the restore key on the first launch of the app on a new device and also within the `BackupAgent.onRestoreFinished()` callback if your app uses it.
- Do ensure that a restore credential is created even if the user is already logged in.
- Do ensure that the credential retrieval and login in `onRestoreFinished()` is performed synchronously (for example using `runBlocking`).
- Do restore notifications in the `BackupAgent` if your app uses them. (For example capture and send FCM token to backend)
- Do ensure that if you implement mock network requests or stubs, you replace all placeholders with valid, properly formatted JSON payloads for the credential requests.
- Do encapsulate credential creation and retrieval into their own dedicated functions. Because credential creation must be called in multiple places (sign-up, sign-in) and retrieval across multiple tiers (`BackupAgent` and Launcher `Activity`), this prevents code duplication.
- Do remind the developer of the [critical guidelines](#implementation-guide) for implementing the backend once you're done with the implementation.
- Do generate a separate restore key for each application if the organization has multiple apps with different package names, as a restore key is tied to a unique application package name.
**DON'T:**
- DON'T change the value of `allowBackup` in `AndroidManifest.xml`. Restore Credentials functionality is not affected by the allowBackup setting, meaning the user will still be automatically logged in when a Restore Credential exists, even if `allowBackup` is false.
- DON'T implement a `BackupAgent` if `allowBackup` is `false` in `AndroidManifest.xml`.
- DON'T assume the credential stored in the `GetCredentialResponse` to be of type `PublicKeyCredential`. It has type `RestoreCredential`.
- DON'T chain `GetRestoreCredentialOption` with any other `CredentialOption` in the construction of a `GetCredentialRequest`.
- DON'T assume `CredentialManager` or the Android system will automatically delete a restore key when a user signs out of the app. You must explicitly call `clearCredentialState` with a `ClearCredentialStateRequest` of `TYPE_CLEAR_RESTORE_CREDENTIAL`.
- DON'T remove any existing calls to `clearCredentialState()`. A `ClearCredentialStateRequest` without a type specified only clears all NON-restore credentials.
## Implementation Guide
Implement the Android client-side code by using the following guide. Follow it
**step-by-step** and don't implement any backend functionality, only remind
the user of the [Backend Guidelines](#backend-guidelines) once you're done.
## Version compatibility
Credential Manager's Restore Credentials works on devices running Android 9 (API
level 28) and higher, Google Play services (GMS) core version 24220000 or
higher, and version 1.5.0 or higher of the `androidx.credentials` library.
## Prerequisites
Set up a [relying party server](#backend-guidelines) similar to the server for [passkeys](#dos-and-donts). If
you already have a [server](#two-tier-restoration-architecture) set up to handle authentication with passkeys,
use the same server-side implementation for restore keys.
> [!NOTE]
> **Note:** While the server-side implementation is the same for passkeys and restore keys, your client-side app can support restore keys without supporting passkeys. Because restore keys work independently of the authentication method in your app (for example, passwords or Sign in with Google), you don't need to make any additional changes to the existing authentication methods in your app's code.
## Dependencies
Add the following dependencies to your app module's `build.gradle` file:
### Kotlin
```kotlin
dependencies {
implementation("androidx.credentials:credentials:1.7.0-alpha03")
implementation("androidx.credentials:credentials-play-services-auth:1.7.0-alpha03")
}
```
### Groovy
```groovy
dependencies {
implementation "androidx.credentials:credentials:1.7.0-alpha03"
implementation "androidx.credentials:credentials-play-services-auth:1.7.0-alpha03"
}
```
Restore Credentials is available from version 1.5.0 and higher of the
androidx.credentials library. However, it's recommended to use the latest stable
versions of the dependencies where possible.
> [!NOTE]
> **Note:** The Restore Credentials feature works regardless of whether [`allowBackup`](references/android/guide/topics/manifest/application-element.md) is set in the manifest.
## OverviewFrom IsKenKenYa/skills, GPL-3.0.
More from IsKenKenYa/skills
- 0.599score
verified-email
Google LLC
提供基于 Android Credential Manager API 实现已验证邮箱获取的完整工作流。使用此 skill 向 Android 应用集成安全、免 OTP 的邮箱验证流程。该 skill 利用来自 Google 等可信提供商的加密验证凭证,解决注册流程摩擦过大的问题。
SkillAFreshness: A★ 3Claude Code +9 - 0.599score
adaptive
Google LLC
提供让应用 UI 适配不同 Android 设备(手机、平板、折叠屏、笔记本、桌面、TV、Auto 和 XR)的说明。涵盖使用 Compose MediaQuery API 处理不同窗口尺寸、指针设备(如鼠标)和文本输入设备(如键盘);使用 Navigation3 Scenes 实现多窗格布局;使用 Compose…
SkillAFreshness: A★ 3Claude Code +9 - 0.599score
media3-cast-integration
Google LLC
使用 Jetpack Media3 在 Android 应用中实现 Google Cast 支持。处理添加构建依赖、更新 manifest、配置 OptionsProvider,以及在 Compose 和 View 两种 UI 中管理 CastPlayer 或 RemoteCastPlayer 播放。当添加…
SkillAFreshness: A★ 3Claude Code +9 - 0.599score
migrate-xml-views-to-jetpack-compose
Google LLC
提供将 Android XML View 迁移到 Jetpack Compose 的结构化工作流。该 skill 详述从规划和依赖设置,到主题和布局迁移、验证及 XML 清理的分步流程。当需要在 Android 项目中把 XML View 迁移到 Jetpack Compose 时使用。它解决将旧版 XML…
SkillAFreshness: A★ 3Claude Code +9 - 0.597score
agp-9-upgrade
Google LLC
升级或迁移 Android 项目以使用 Android Gradle Plugin (AGP) 版本 9。不要用此 skill 迁移 Kotlin Multiplatform (KMP) 项目。
SkillAFreshness: A★ 3Claude Code +9 - 0.597score
camerax
Google LLC
提供 Android CameraX 相机开发的技术指导。当实现相机功能、处理异步录制生命周期、使用 CameraX 对接底层硬件互操作(hardware interop),或集成 ML Kit 或 Media3 特效时使用。
SkillAFreshness: A★ 3Claude Code +9 - 0.597score
r8-analyzer
Google LLC
分析 Android 构建文件和 R8 keep 规则,识别冗余、过宽的包级规则,以及吞没了库消费者 keep 规则的规则。当开发者想优化应用体积、移除冗余或过宽的 keep 规则,或排查 Proguard 配置时使用。
SkillAFreshness: A★ 3Claude Code +9 - 0.597score
engage-sdk-integration
Google LLC
帮助开发者集成、调试和解决 Play Engage SDK 实现问题。当添加 Engage SDK 支持、生成发布代码、将数据类映射到实体,或修复 SDK 相关错误时使用。
SkillAFreshness: A★ 3Claude Code +9 - 0.596score
navigation-3
Google LLC
学习如何安装并迁移到 Jetpack Navigation 3,以及如何实现 deep links、多个 backstack、scenes(对话框、底部表、list-detail、two-pane、supporting pane)、条件导航(如已登录导航与匿名导航的区别)、从流程返回结果、与…
SkillAFreshness: A★ 3Claude Code +9 - 0.586score
android-intent-security
Google LLC
Android Intent 安全最佳实践。当审计 AndroidManifest.xml 中的组件配置(activities、services、receivers)或处理传入 Intent 的源码(getIntent、getParcelableExtra)以防止 Intent 重定向(Intent…
SkillAFreshness: A★ 3Claude Code +9 - 0.579score
android-permissions-security
Google LLC
审计、发现缺口并修复 Android 权限与 IPC 组件安全漏洞。当审查 AndroidManifest.xml、定义权限、暴露组件(activity/service/receiver/provider)或加固 IPC 攻击面时使用。
SkillAFreshness: A★ 3Claude Code +9 - 0.560score
android-profiler
Google LLC
管理 Android 性能剖析与调试。当用户要求录制或分析 Android 性能数据(如系统 trace、堆转储、方法录制、调用栈采样、内存分配),排查 Android 上的瓶颈、卡顿(jank)、内存泄漏、应用启动问题,或要求编写、调试、执行临时 SQL 查询时触发。适用于用户应用和系统应用/服务。
SkillBFreshness: B★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 15, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- GPL-3.0
- Repository
- github.com/IsKenKenYa/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Google LLC
- 0.861score
secops-triage
Google LLCOfficial
Expert guidance for security alert triage in Google SecOps.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-investigate
Google LLCOfficial
Expert guidance for deep security incident and entity investigations in Google SecOps.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-hunt
Google LLCOfficial
Expert guidance for proactive threat hunting in Google SecOps.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-detection-engineering
Google LLCOfficial
Author, validate, test, and deploy YARA-L 2.0 detection rules and evaluate end-to-end detection coverage gaps in Google SecOps.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-cases
Google LLCOfficial
Manage Google Security Operations (SecOps) SOAR cases throughout their lifecycle.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.815score
ima-sdk-client-side
Google LLCOfficial
Supports Interactive Media Ads (IMA) SDK.
SkillBFreshness: B★ 21.5KClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get restore-credentials running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
restore-credentials skill. Agent Mart. https://agentmart.dev/skills/iskenkenya-restore-credentials (last updated 2026-10-24)