/account-deletion
Generates an Apple-compliant account deletion flow with multi-step confirmation UI, optional data export, configurable grace period, Keychain cleanup, and server-side deletion request. Use when user needs account deletion, right-to-delete, or Apple App Review compliance for
$ npx -y skills add rshankras/claude-code-apple-skills --skill account-deletion --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
/account-deletion
Context preview
The summary Claude sees to decide when to auto-load this skill.
Generates an Apple-compliant account deletion flow with multi-step confirmation UI, optional data export, configurable grace period, Keychain cleanup, and server-side deletion request. Use when user needs account deletion, right-to-delete, or Apple App Review compliance for
SKILL.md
account-deletion.SKILL.mdname: account-deletion
description: Generates an Apple-compliant account deletion flow with multi-step confirmation UI, optional data export, configurable grace period, Keychain cleanup, and server-side deletion request. Use when user needs account deletion, right-to-delete, or Apple App Review compliance for account removal.
allowed-tools: [Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion]
last_verified: 2026-07-16
review_by: 2027-06-22
os_version: iOS 27 / macOS 27
Account Deletion Generator
Generate a production account deletion flow compliant with Apple's App Store requirement (effective June 30, 2022) that any app offering account creation must also offer account deletion from within the app. Includes multi-step confirmation UI, optional data export, configurable grace period, Keychain cleanup, and Sign in with Apple token revocation.
When This Skill Activates
Use this skill when the user:
- Asks to "add account deletion" or "delete account"
- Wants to "remove account" or implement "account removal"
- Mentions "right to delete" or "user data deletion"
- Asks about "Apple account deletion requirement"
- Needs App Store compliance for account management
- Wants to implement GDPR/privacy right-to-erasure
Pre-Generation Checks
1. Project Context Detection
- [ ] Check Swift version (requires Swift 5.9+)
- [ ] Check deployment target (iOS 16+ / macOS 13+)
- [ ] Check for @Observable support (iOS 17+ / macOS 14+)
- [ ] Identify source file locations
2. Existing Auth/Account Code
Search for existing account management:
Glob: **/*Auth*.swift, **/*Account*.swift, **/*User*.swift, **/*Profile*.swift
Grep: "ASAuthorizationAppleIDProvider" or "SignInWithApple" or "Keychain" or "deleteAccount"
If existing deletion flow found:
- Ask if user wants to replace or enhance it
- If enhancing, integrate with existing auth architecture
3. Keychain Usage Detection
Grep: "SecItemAdd" or "SecItemDelete" or "SecItemCopyMatching" or "KeychainWrapper" or "keychain"
If Keychain usage found, ensure cleanup covers all stored items.
4. CloudKit / Server Sync Detection
Grep: "CKContainer" or "CloudKit" or "CKRecord" or "NSPersistentCloudKitContainer"
Glob: **/*CloudKit*.swift, **/*Sync*.swift
If CloudKit or server sync found, include remote data cleanup steps.
Configuration Questions
Ask user via AskUserQuestion:
1. **Deletion type?**
- Immediate — account deleted right away after confirmation
- Grace period — account scheduled for deletion, user can cancel
2. **Grace period duration?** (if grace period selected)
- 7 days
- 14 days — recommended
- 30 days
3. **Include data export before deletion?**
- Yes — generate DataExportService with JSON/ZIP archive and ShareLink
- No — skip data export
4. **Server-side API call needed?**
- Yes — generate server deletion request with configurable endpoint
- No — local-only deletion (Keychain, UserDefaults, SwiftData/CoreData, files)
Generation Process
Step 1: Read Templates
Read `templates.md` for production Swift code.
Step 2: Create Core Files
Generate these files: 1. `AccountDeletionManager.swift` — @Observable orchestrator for the full deletion lifecycle 2. `DeletionConfirmationView.swift` — Multi-step confirmation UI with NavigationStack 3. `KeychainCleanup.swift` — Utility to remove all app Keychain items
Step 3: Create Optional Files
Based on configuration:
- `DataExportService.swift` — If data export selected
- `DeletionGracePeriodView.swift` — If grace period selected
- `SignInWithAppleRevocation.swift` — If SIWA detected in project
Step 4: Determine File Location
Check project structure:
- If `Sources/` exists -> `Sources/AccountDeletion/`
- If `App/` exists -> `App/AccountDeletion/`
- Otherwise -> `AccountDeletion/`
Output Format
After generation, provide:
Files Created
AccountDeletion/
├── AccountDeletionManager.swift # Orchestrator for deletion lifecycle
├── DeletionConfirmationView.swift # Multi-step confirmation UI
├── KeychainCleanup.swift # Keychain item cleanup
├── DataExportService.swift # Data export before deletion (optional)
├── DeletionGracePeriodView.swift # Grace period countdown UI (optional)
└── SignInWithAppleRevocation.swift # SIWA token revocation (optional)
Integration Steps
**Add to Settings or Account screen:**
// In your Settings or Account view
struct AccountSettingsView: View {
@State private var showDeletionFlow = false
var body: some View {
Form {
// ... other settings ...
Section {
Button(role: .destructive) {
showDeletionFlow = true
} label: {
Label("Delete Account", systemImage: "person.crop.circle.badge.minus")
}
} footer: {
Text("Permanently removes your account and all associated data.")
}
}
.sheet(isPresented: $showDeletionFlow) {
DeletionConfirmationView()
}
}
}**With grace period (check on app launch):**
@main
struct MyApp: App {
@State private var deletionManager = AccountDeletionManager()
var body: some Scene {
WindowGroup {
ContentView()
.environment(deletionManager)
.task {
await deletionManager.checkPendingDeletion()
}
}
}
}**With data export:**
// User can export before deleting
DeletionConfirmationView()
.environment(DataExportService())Testing
@Test
func deletionFlowCompletesSuccessfully() async throws {
let manager = AccountDeletionManager(
serverClient: MockDeletionClient(),
keychainCleanup: MockKeychainCleanup()
)
try await manager.confirmWithReauthentication()
try await manager.executeDeletion()
#expect(manager.deletioRead more
name: account-deletion description: Generates an Apple-compliant account deletion flow with multi-step confirmation UI, optional data export, configurable grace period, Keychain cleanup, and server-side deletion request. Use when user needs account deletion, right-to-delete, or Apple App Review compliance for account removal. allowed-tools: [Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion] last_verified: 2026-07-16 review_by: 2027-06-22 os_version: iOS 27 / macOS 27
Account Deletion Generator
Generate a production account deletion flow compliant with Apple's App Store requirement (effective June 30, 2022) that any app offering account creation must also offer account deletion from within the app. Includes multi-step confirmation UI, optional data export, configurable grace period, Keychain cleanup, and Sign in with Apple token revocation.
When This Skill Activates
Use this skill when the user:
- Asks to "add account deletion" or "delete account"
- Wants to "remove account" or implement "account removal"
- Mentions "right to delete" or "user data deletion"
- Asks about "Apple account deletion requirement"
- Needs App Store compliance for account management
- Wants to implement GDPR/privacy right-to-erasure
Pre-Generation Checks
1. Project Context Detection
- [ ] Check Swift version (requires Swift 5.9+)
- [ ] Check deployment target (iOS 16+ / macOS 13+)
- [ ] Check for @Observable support (iOS 17+ / macOS 14+)
- [ ] Identify source file locations
2. Existing Auth/Account Code
Search for existing account management:
Glob: **/*Auth*.swift, **/*Account*.swift, **/*User*.swift, **/*Profile*.swift Grep: "ASAuthorizationAppleIDProvider" or "SignInWithApple" or "Keychain" or "deleteAccount"
If existing deletion flow found:
- Ask if user wants to replace or enhance it
- If enhancing, integrate with existing auth architecture
3. Keychain Usage Detection
Grep: "SecItemAdd" or "SecItemDelete" or "SecItemCopyMatching" or "KeychainWrapper" or "keychain"
If Keychain usage found, ensure cleanup covers all stored items.
4. CloudKit / Server Sync Detection
Grep: "CKContainer" or "CloudKit" or "CKRecord" or "NSPersistentCloudKitContainer" Glob: **/*CloudKit*.swift, **/*Sync*.swift
If CloudKit or server sync found, include remote data cleanup steps.
Configuration Questions
Ask user via AskUserQuestion:
1. **Deletion type?**
- Immediate — account deleted right away after confirmation
- Grace period — account scheduled for deletion, user can cancel
2. **Grace period duration?** (if grace period selected)
- 7 days
- 14 days — recommended
- 30 days
3. **Include data export before deletion?**
- Yes — generate DataExportService with JSON/ZIP archive and ShareLink
- No — skip data export
4. **Server-side API call needed?**
- Yes — generate server deletion request with configurable endpoint
- No — local-only deletion (Keychain, UserDefaults, SwiftData/CoreData, files)
Generation Process
Step 1: Read Templates
Read `templates.md` for production Swift code.
Step 2: Create Core Files
Generate these files: 1. `AccountDeletionManager.swift` — @Observable orchestrator for the full deletion lifecycle 2. `DeletionConfirmationView.swift` — Multi-step confirmation UI with NavigationStack 3. `KeychainCleanup.swift` — Utility to remove all app Keychain items
Step 3: Create Optional Files
Based on configuration:
- `DataExportService.swift` — If data export selected
- `DeletionGracePeriodView.swift` — If grace period selected
- `SignInWithAppleRevocation.swift` — If SIWA detected in project
Step 4: Determine File Location
Check project structure:
- If `Sources/` exists -> `Sources/AccountDeletion/`
- If `App/` exists -> `App/AccountDeletion/`
- Otherwise -> `AccountDeletion/`
Output Format
After generation, provide:
Files Created
AccountDeletion/ ├── AccountDeletionManager.swift # Orchestrator for deletion lifecycle ├── DeletionConfirmationView.swift # Multi-step confirmation UI ├── KeychainCleanup.swift # Keychain item cleanup ├── DataExportService.swift # Data export before deletion (optional) ├── DeletionGracePeriodView.swift # Grace period countdown UI (optional) └── SignInWithAppleRevocation.swift # SIWA token revocation (optional)
Integration Steps
**Add to Settings or Account screen:**
// In your Settings or Account view
struct AccountSettingsView: View {
@State private var showDeletionFlow = false
var body: some View {
Form {
// ... other settings ...
Section {
Button(role: .destructive) {
showDeletionFlow = true
} label: {
Label("Delete Account", systemImage: "person.crop.circle.badge.minus")
}
} footer: {
Text("Permanently removes your account and all associated data.")
}
}
.sheet(isPresented: $showDeletionFlow) {
DeletionConfirmationView()
}
}
}**With grace period (check on app launch):**
@main
struct MyApp: App {
@State private var deletionManager = AccountDeletionManager()
var body: some Scene {
WindowGroup {
ContentView()
.environment(deletionManager)
.task {
await deletionManager.checkPendingDeletion()
}
}
}
}**With data export:**
// User can export before deleting
DeletionConfirmationView()
.environment(DataExportService())Testing
@Test
func deletionFlowCompletesSuccessfully() async throws {
let manager = AccountDeletionManager(
serverClient: MockDeletionClient(),
keychainCleanup: MockKeychainCleanup()
)
try await manager.confirmWithReauthentication()
try await manager.executeDeletion()
#expect(manager.deletioA 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

