/auth-flow
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.
$ npx -y skills add rshankras/claude-code-apple-skills --skill auth-flow --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/auth-flow
Context preview
The summary Claude sees to decide when to auto-load this skill.
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.
SKILL.md
auth-flow.SKILL.mdname: auth-flow
description: 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.
allowed-tools: [Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion]
last_verified: 2026-07-16
review_by: 2027-06-22
Auth Flow Generator
Generate a complete authentication flow with Sign in with Apple, biometric authentication (Face ID/Touch ID), and secure Keychain storage.
When This Skill Activates
Use this skill when the user:
- Asks to "add authentication" or "add login"
- Mentions "Sign in with Apple" or "SIWA"
- Wants "Face ID login" or "biometric auth"
- Asks about "Keychain" or "secure storage"
- Mentions "user session" or "auth token"
Pre-Generation Checks
1. Project Context Detection
- [ ] Check for existing auth implementations
- [ ] Check for AuthenticationServices framework usage
- [ ] Verify entitlements file exists
- [ ] Identify source file locations
2. Conflict Detection
Search for existing auth:
Glob: **/*Auth*.swift, **/*Keychain*.swift
Grep: "ASAuthorizationController" or "LAContext"
If found, ask user:
- Replace existing implementation?
- Extend with additional methods?
3. Required Capabilities
**Sign in with Apple requires:**
- Add "Sign in with Apple" capability in Xcode
- Configure in App Store Connect
- Add entitlement: `com.apple.developer.applesignin`
Configuration Questions
Ask user via AskUserQuestion:
1. **Authentication methods?** (multi-select)
- Sign in with Apple
- Biometrics (Face ID/Touch ID)
- Both
2. **Session storage?**
- Keychain (secure, persists reinstall)
- UserDefaults (simple, cleared on reinstall)
3. **Session management?**
- Auto-refresh tokens
- Manual refresh
- No token refresh needed
Generation Process
Step 1: Create Core Files
Generate these files: 1. `AuthenticationManager.swift` - Core auth orchestration 2. `KeychainManager.swift` - Secure storage 3. `SignInWithAppleManager.swift` - SIWA handling 4. `BiometricAuthManager.swift` - Face ID/Touch ID
Step 2: Create SwiftUI Components
Based on configuration:
- `SignInWithAppleButton.swift` - SwiftUI button wrapper
- `AuthenticationView.swift` - Complete auth UI
Step 3: Determine File Location
Check project structure:
- If `Sources/` exists → `Sources/Auth/`
- If `App/` exists → `App/Auth/`
- Otherwise → `Auth/`
Entitlements Required
Sign in with Apple
<!-- YourApp.entitlements -->
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>Keychain Sharing (optional)
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)com.yourcompany.shared</string>
</array>Info.plist Required
Face ID Usage Description
<key>NSFaceIDUsageDescription</key>
<string>Use Face ID to securely sign in to your account</string>
Output Format
After generation, provide:
Files Created
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 UIIntegration Steps
**App Entry Point:**
@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:**
SignInWithAppleButtonView { result in
switch result {
case .success(let user):
print("Signed in: \(user.id)")
case .failure(let error):
print("Failed: \(error)")
}
}**Biometric Auth:**
Button("Unlock with Face ID") {
Task {
if await BiometricAuthManager.shared.authenticate() {
// Authenticated
}
}
}Required Setup
1. **Xcode Capabilities:**
- Add "Sign in with Apple" capability
- Enable Keychain Sharing (if needed)
2. **App Store Connect:**
- Configure Sign in with Apple for your App ID
3. **Info.plist:**
- Add `NSFaceIDUsageDescription`
Testing Instructions
**Sign in with Apple:**
- Use Simulator for basic testing
- Test on device for full flow
- Use sandbox Apple ID for testing
**Biometrics:**
- Simulator: Features > Face ID > Enrolled
- Test enrolled/not enrolled states
- Test failed authentication
References
- **auth-patterns.md** - Security best practices
- **templates/** - All template files
- Apple Docs: Authentication Services, LocalAuthentication
Read more
name: auth-flow description: 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. allowed-tools: [Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion] last_verified: 2026-07-16 review_by: 2027-06-22
Auth Flow Generator
Generate a complete authentication flow with Sign in with Apple, biometric authentication (Face ID/Touch ID), and secure Keychain storage.
When This Skill Activates
Use this skill when the user:
- Asks to "add authentication" or "add login"
- Mentions "Sign in with Apple" or "SIWA"
- Wants "Face ID login" or "biometric auth"
- Asks about "Keychain" or "secure storage"
- Mentions "user session" or "auth token"
Pre-Generation Checks
1. Project Context Detection
- [ ] Check for existing auth implementations
- [ ] Check for AuthenticationServices framework usage
- [ ] Verify entitlements file exists
- [ ] Identify source file locations
2. Conflict Detection
Search for existing auth:
Glob: **/*Auth*.swift, **/*Keychain*.swift Grep: "ASAuthorizationController" or "LAContext"
If found, ask user:
- Replace existing implementation?
- Extend with additional methods?
3. Required Capabilities
**Sign in with Apple requires:**
- Add "Sign in with Apple" capability in Xcode
- Configure in App Store Connect
- Add entitlement: `com.apple.developer.applesignin`
Configuration Questions
Ask user via AskUserQuestion:
1. **Authentication methods?** (multi-select)
- Sign in with Apple
- Biometrics (Face ID/Touch ID)
- Both
2. **Session storage?**
- Keychain (secure, persists reinstall)
- UserDefaults (simple, cleared on reinstall)
3. **Session management?**
- Auto-refresh tokens
- Manual refresh
- No token refresh needed
Generation Process
Step 1: Create Core Files
Generate these files: 1. `AuthenticationManager.swift` - Core auth orchestration 2. `KeychainManager.swift` - Secure storage 3. `SignInWithAppleManager.swift` - SIWA handling 4. `BiometricAuthManager.swift` - Face ID/Touch ID
Step 2: Create SwiftUI Components
Based on configuration:
- `SignInWithAppleButton.swift` - SwiftUI button wrapper
- `AuthenticationView.swift` - Complete auth UI
Step 3: Determine File Location
Check project structure:
- If `Sources/` exists → `Sources/Auth/`
- If `App/` exists → `App/Auth/`
- Otherwise → `Auth/`
Entitlements Required
Sign in with Apple
<!-- YourApp.entitlements -->
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>Keychain Sharing (optional)
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)com.yourcompany.shared</string>
</array>Info.plist Required
Face ID Usage Description
<key>NSFaceIDUsageDescription</key> <string>Use Face ID to securely sign in to your account</string>
Output Format
After generation, provide:
Files Created
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 UIIntegration Steps
**App Entry Point:**
@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:**
SignInWithAppleButtonView { result in
switch result {
case .success(let user):
print("Signed in: \(user.id)")
case .failure(let error):
print("Failed: \(error)")
}
}**Biometric Auth:**
Button("Unlock with Face ID") {
Task {
if await BiometricAuthManager.shared.authenticate() {
// Authenticated
}
}
}Required Setup
1. **Xcode Capabilities:**
- Add "Sign in with Apple" capability
- Enable Keychain Sharing (if needed)
2. **App Store Connect:**
- Configure Sign in with Apple for your App ID
3. **Info.plist:**
- Add `NSFaceIDUsageDescription`
Testing Instructions
**Sign in with Apple:**
- Use Simulator for basic testing
- Test on device for full flow
- Use sandbox Apple ID for testing
**Biometrics:**
- Simulator: Features > Face ID > Enrolled
- Test enrolled/not enrolled states
- Test failed authentication
References
- **auth-patterns.md** - Security best practices
- **templates/** - All template files
- Apple Docs: Authentication Services, LocalAuthentication
A collection of Claude Code skills for iOS, macOS, watchOS, visionOS, and Apple platform development. These skills help you plan and build apps, maintain code quality, ensure HIG compliance, and guide you from idea to App Store.
Repo: rshankras/claude-code-apple-skills
Other skills on rshankras-apple-skills.
- /app-store
App Store optimization and marketing skills for descriptions, screenshots, keywords, review responses, and comprehensive promotional strategy. Use when user needs help with App Store presence, ASO, marketing, or customer communication.
Open skill - /ad-attribution
Privacy-preserving ad measurement with AdAttributionKit (SKAdNetwork's successor) — install and re-engagement attribution, conversion-value strategy under crowd anonymity, and end-to-end postback testing. Use when running paid acquisition beyond Apple Ads, measuring
Open skill - /app-description-writer
Generate compelling App Store descriptions that convert browsers into users. Use when writing initial descriptions, improving existing copy, or drafting promotional text and What's New for a major update.
Open skill - /apple-search-ads
Apple Search Ads campaign strategy for indie developers — paid acquisition, keyword bidding, budget planning, and ROAS optimization. Use when user asks about running ads, paid user acquisition, or Apple Search Ads campaigns.
Open skill - /iap-finalizer
Take a one-time in-app purchase from MISSING_METADATA to READY_TO_SUBMIT in App Store Connect — set its price schedule and localized display name/description (and optional review screenshot) via the ASC REST API. Use at Phase 6 (Pre-Release), after the IAP is built in-app (Phase
Open skill - /keyword-optimizer
Optimize app title, subtitle, and keywords for maximum App Store discoverability. Use when launching a new app, improving search rankings, entering new markets/languages, or safely optimizing ASO for an app with existing traffic.
Open skill

