skills/mobile-biometric-auth-expert/SKILL.md
Mobile biometric authentication expert for Face ID, Touch ID, BiometricPrompt, Keychain/Keystore, and WebAuthn. Activate on: biometric authentication, Face ID, Touch ID, BiometricPrompt, Keychain, Keystore, WebAuthn, passkeys, FIDO2, device authentication. NOT for: OAuth/OIDC flows (use oauth-oidc-implementer), secret management (use secret-management-expert), general security (use security-auditor).
npx skillsauth add curiositech/windags-skills mobile-biometric-auth-expertInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Expert in implementing biometric authentication with Face ID, Touch ID, Android BiometricPrompt, secure credential storage, and Passkeys/WebAuthn.
Biometric Availability Check:
If biometric hardware available AND enrolled:
→ Offer biometric as primary auth
If biometric hardware available BUT not enrolled:
→ Show enrollment prompt + fallback to password
If biometric hardware unavailable:
→ Use password/PIN only, hide biometric UI
Special cases:
- If user declined biometric permission: Store preference, don't re-prompt
- If biometric lockout (too many failures): Force device PIN, then re-enable
Authentication Flow Selection:
If first login on device:
→ Password auth → store token in secure storage → enable biometric gate
If returning user with stored credential:
→ Biometric prompt → decrypt stored token → validate/refresh if needed
If biometric prompt times out (>30s):
→ Show "Use Password" option → device PIN fallback
If biometric enrollment changed:
→ Invalidate stored credentials → require re-authentication
Storage Strategy:
If iOS:
→ Keychain with kSecAccessControlBiometryCurrentSet
If Android API 23+:
→ Keystore with setUserAuthenticationRequired(true)
If cross-platform framework:
→ Expo SecureStore or RN Keychain with biometric access control
Passkey vs Biometric-Gated Token:
If WebAuthn/Passkey supported AND user has existing account:
→ Offer passkey upgrade (future-proof, no token storage)
If new user registration:
→ Default to passkey flow, fallback to biometric-gated tokens
If enterprise/MDM environment:
→ Check policy for passkey allowlist before offering
Rubber Stamp Biometric - Using biometric UI without secure storage
Enrollment Invalidation Blind Spot - Ignoring biometric enrollment changes
Fallback Chain Break - No recovery path when biometrics fail
Prompt Fatigue - Biometric prompts for low-value actions
Custom UI Trust Gap - Building custom biometric interfaces
Passkey Implementation with Biometric Fallback:
// 1. Check WebAuthn support
guard ASAuthorizationPlatformPublicKeyCredentialProvider.isSupported else {
// Fall back to biometric-gated token storage
return authenticateWithStoredToken()
}
// 2. Create passkey request
let challenge = Data("server-challenge".utf8)
let request = ASAuthorizationPlatformPublicKeyCredentialProvider
.createCredentialRegistrationRequest(
challenge: challenge,
name: "[email protected]",
userID: Data("user-123".utf8)
)
// 3. Handle success/failure
func authorizationController(controller: ASAuthorizationController,
didCompleteWithAuthorization authorization: ASAuthorization) {
if let credential = authorization.credential as? ASAuthorizationPlatformPublicKeyCredentialRegistration {
// Passkey created - store credential ID, send public key to server
storeCredentialID(credential.credentialID)
sendPublicKeyToServer(credential.rawAttestationObject)
}
}
// 4. Graceful degradation
func authorizationController(controller: ASAuthorizationController,
didCompleteWithError error: Error) {
if case ASAuthorizationError.canceled = error {
// User canceled - offer biometric-gated password login
showBiometricPasswordFallback()
}
}
Trade-offs navigated:
Use other skills for:
oauth-oidc-implementerapi-security-expertsecret-management-expertmobile-payment-integration-specialistsecurity-auditordatabase-security-expertThis skill handles: Device-level biometric authentication, secure credential storage, WebAuthn/Passkey implementation, and biometric UX flows only.
data-ai
license: Apache-2.0 NOT for unrelated tasks outside this domain.
development
Use when designing caching strategies (cache-aside, write-through, write-behind), implementing distributed locks, building rate limiters, leaderboards, real-time streams (XADD/consumer groups), pub/sub, or tuning eviction policies. Triggers: thundering-herd on cache miss, dogpile on key expiry, Redlock vs SET-NX-PX choice, sliding-window rate limiter, hot-key on a single cluster slot, big-key blowup, MULTI/EXEC across slots, KEYS in production. NOT for Redis Cluster operations/admin (different domain), embedded KV (SQLite, leveldb), in-process LRU caches, or Memcached.
tools
Drawing the `'use client'` boundary correctly in React Server Components apps (Next.js App Router, RSC frameworks) — leaf-pushing, slot composition, serialization rules, and environment poisoning prevention. Grounded in react.dev and Next.js 16 docs.
development
Use when designing rate limiting for an API, choosing between token bucket / sliding window / leaky bucket / fixed window, implementing it in Redis, deciding edge (Cloudflare/Upstash) vs origin enforcement, sizing per-user vs per-IP vs per-endpoint quotas, returning the right 429 response with Retry-After, or fixing the boundary-burst bug in fixed-window limiters. Triggers: 429 too many requests, INCR + EXPIRE, ZADD + ZREMRANGEBYSCORE + ZCARD, X-RateLimit-Remaining header, Cloudflare WAF rate limiting rules, Upstash @upstash/ratelimit, leaky bucket shaping vs policing, distributed rate limiter consistency. NOT for DDoS mitigation specifically (different scale), CAPTCHA / bot management, full WAF design, or per-user quota billing.