Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generates authentication infrastructure with Sign in with Apple, biometrics, and Keychain storage. Use when user wants to add authentication, login, or Sign in with Apple.
.claude/skills/rshankras-auth-flow/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-09 | ✗→✓ | ▲ Improved | -4% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -18% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 8% | 0% |
| case-21 | ✗→✓ | ▲ Improved | -11% | 0% |
| case-22 | ✗→✓ | ▲ Improved | 7% | 0% |
Generate a complete authentication flow with Sign in with Apple, biometric authentication (Face ID/Touch ID), and secure Keychain storage.
Use this skill when the user:
Search for existing auth:
Glob: **/*Auth*.swift, **/*Keychain*.swift
Grep: "ASAuthorizationController" or "LAContext"If found, ask user:
Sign in with Apple requires:
com.apple.developer.applesigninAsk user via AskUserQuestion:
Generate these files:
AuthenticationManager.swift - Core auth orchestrationKeychainManager.swift - Secure storageSignInWithAppleManager.swift - SIWA handlingBiometricAuthManager.swift - Face ID/Touch IDBased on configuration:
SignInWithAppleButton.swift - SwiftUI button wrapperAuthenticationView.swift - Complete auth UICheck project structure:
Sources/ exists → Sources/Auth/App/ exists → App/Auth/Auth/xml<!-- YourApp.entitlements --> <key>com.apple.developer.applesignin</key> <array> <string>Default</string> </array>
xml<key>keychain-access-groups</key> <array> <string>$(AppIdentifierPrefix)com.yourcompany.shared</string> </array>
xml<key>NSFaceIDUsageDescription</key> <string>Use Face ID to securely sign in to your account</string>
After generation, provide:
Sources/Auth/
├── AuthenticationManager.swift # Core orchestration
├── KeychainManager.swift # Secure storage
├── SignInWithAppleManager.swift # SIWA delegate
├── BiometricAuthManager.swift # Face ID/Touch ID
├── AuthenticationState.swift # Auth state model
└── Views/
├── SignInWithAppleButton.swift # SwiftUI button
└── AuthenticationView.swift # Complete UIApp Entry Point:
swift@main struct MyApp: App { @State private var authManager = AuthenticationManager() // AuthenticationManager is @Observable var body: some Scene { WindowGroup { if authManager.isAuthenticated { ContentView() } else { AuthenticationView() } } .environment(authManager) } }
Sign in with Apple Button:
swiftSignInWithAppleButtonView { result in switch result { case .success(let user): print("Signed in: \(user.id)") case .failure(let error): print("Failed: \(error)") } }
Biometric Auth:
swiftButton("Unlock with Face ID") { Task { if await BiometricAuthManager.shared.authenticate() { // Authenticated } } }
NSFaceIDUsageDescriptionSign in with Apple:
Biometrics:
Other measured skills in the registry, with their headline benchmark lift.