# Account Deletion

Generates an Apple-compliant account deletion flow with multi-step confirmation UI...

- Repository: https://github.com/rshankras/claude-code-apple-skills (846 stars)
- Category: Design
- License: MIT
- Last updated: 2026-07-24
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add rshankras/claude-code-apple-skills --skill account-deletion -g -a claude-code -y`
Codex: `npx skills add rshankras/claude-code-apple-skills --skill account-deletion -g -a codex -y`
Cursor: `npx skills add rshankras/claude-code-apple-skills --skill account-deletion -g -a cursor -y`
Gemini CLI: `npx skills add rshankras/claude-code-apple-skills --skill account-deletion -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add rshankras/claude-code-apple-skills`

## 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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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:

The rest: https://github.com/rshankras/claude-code-apple-skills/blob/HEAD/skills/generators/account-deletion/SKILL.md
