mobile-biometrics
Use when the user asks about Face ID, Touch ID, fingerprint login, BiometricPrompt, LocalAuthentication, local_auth or keys bound to biometrics in the…
от j4flmao★ 47 звёзд на GitHub
Установить mobile-biometrics в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Mobile Biometrics
Purpose
Guide for implementing biometric authentication (Face ID, Touch ID, fingerprint) with secure storage and fallback UX.
Agent Protocol
Trigger
Phrases: "biometrics", "Face ID", "Touch ID", "fingerprint", "fingerprint auth", "biometric auth", "face unlock", "local authentication", "biometric prompt", "device credential"
Input Context
- Target platforms (iOS, Android, or cross-platform)
- Sensitivity level of protected operations
- Existing auth system (if any)
- UX requirements for lockout and fallback
Output Artifact
Biometric auth module: availability check, prompt flow, secure storage with biometric protection, fallback to device credential, UX handling.
Response Format
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.
Completion Criteria
- Biometric prompt appears and resolves correctly
- Data encrypted with biometric key — inaccessible without auth
- Device credential fallback works when biometrics unavailable
- User can opt in/out of biometric auth
- 5-failure lockout enforced
Max Response Length
6000 tokens
Architecture / Decision Trees
Biometric Use Case Decision Tree
What operation are you protecting?
├── App unlock (every launch) → Biometric + device credential
│ iOS: LAContext(.deviceOwnerAuthentication)
│ Android: BiometricPrompt with DEVICE_CREDENTIAL
├── High-sensitivity (payments, passwords, personal data)
│ → Class 3 (Strong) biometric required
│ Fallback to device credential
├── Low-sensitivity (dashboard view, quick action)
│ → Class 2 (Weak) biometric acceptable
│ No fallback needed — just require re-auth
└── Data decryption (read stored secrets)
→ Biometric key (Android: setUserAuthenticationRequired, iOS: biometryCurrentSet)
Key invalidated on biometric enrollment change
Biometric Class Selection
Which Android biometric class?
├── Class 3 (Strong) → BIOMETRIC_STRONG
│ Pin/pattern + hardware-backed biometric
│ Used for: payments, auth tokens, PII
├── Class 2 (Weak) → BIOMETRIC_WEAK
│ Face recognition, iris — less secure
│ Used for: convenience unlock, non-sensitive
└── Device credential → DEVICE_CREDENTIAL
PIN, pattern, password — always available
Workflow
Biometric type detection — Three categories of biometric authentication with varying security levels. Class 3 (Strong): Face ID (iPhone X+), Touch ID (iPhone 5s+), Pixel Imprint, ultrasonic fingerprint. Class 2 (Weak): face unlock on budget Android devices, iris scanner. Class 1: convenience face unlock. Android: Check with
BiometricManager.canAuthenticate(BIOMETRIC_STRONG)vsBIOMETRIC_WEAK. iOS:LAContext.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics)— Face ID on devices with TrueDepth camera, Touch ID on devices with Touch ID sensor. Device credential (PIN, pattern, password) is always available as fallback and is considered a biometric alternative on iOS (deviceOwnerAuthentication), but not equivalent to biometric on Android (DEVICE_CREDENTIALflag).Biometric availability check — Before showing a biometric prompt, check: (a) Is biometric hardware available? (hardware present). (b) Is biometric enrolled? (user has registered at least one fingerprint/face). (c) Is device credential configured? (PIN/password set — required fallback). (d) Are there any transient issues? (security update required, sensor dirty, too many attempts — lockout). Handle each failure case with a specific user-facing message. On Android,
BiometricManagerreturns distinct error codes. On iOS,LAContext.canEvaluatePolicyreturnsNSErrorwithLAErrorcodes. Never show biometric prompt without first checking availability.Authentication prompt flow — Flow: user triggers protected action -> check availability -> if biometric available -> show biometric prompt with reason string -> user authenticates -> on success -> grant access -> on failure -> allow retry (up to 5 attempts) -> on 5th failure -> lockout -> force device credential. If biometric not available at start -> fall through to device credential. The reason string is mandatory on both platforms and displayed prominently. On iOS,
localizedReasonis shown in the Face ID dialog. On Android,setTitleandsetSubtitleare shown in the system prompt. After successful authentication, the app receives a callback with (optionally) aCryptoObjectfor decryption.Secure storage with biometric protection — Store sensitive data (auth tokens, encryption keys, passwords) in platform secure stores with biometric access control. Android: use a Keystore
SecretKey(Jetpack SecurityEncryptedSharedPreferencesis deprecated) withsetUserAuthenticationRequired(true)and encrypt/decrypt data throughCryptoObject.setInvalidatedByBiometricEnrollment(true)ensures key is destroyed if new biometric is enrolled (prevents stolen biometric from acces
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/auth-flow.md
- references/biometric-apis.md
- references/biometric-auth.md
- references/biometric-security.md
- references/biometric-types.md
- references/biometrics-advanced.md
- references/biometrics-fundamentals.md
- references/biometrics-testing.md
- references/multi-factor.md
- references/secure-storage.md
FAQ
Что делает скилл mobile-biometrics?
Use when the user asks about Face ID, Touch ID, fingerprint login, BiometricPrompt, LocalAuthentication, local_auth or keys bound to biometrics in the Keychain/Keystore. Produces biometric gating with secure key storage and fallbacks. Not for server-side login flows (use backend-auth-patterns) or general app hardening (use mobile-security).
Как установить скилл mobile-biometrics?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mobile-biometrics запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…