Account deletion
Skill launch52-ai/flutter-template/.claude/skills/account-deletion
Implement GDPR/App Store/Play Store compliant account deletion with confirmation flow, data cleanup, and auth sign-out. Use when adding "delete account", "remove account", or "user data deletion" features. Required for both App Store and Play Store compliance.From its SKILL.md
npx -y skills add launch52-ai/flutter-template --skill account-deletionAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 2 commands, including `dart run .claude/skills/account-deletion/scripts/check.dart` and 1 more.
SKILL.md
6.7 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it
Account Deletion
Implements GDPR, App Store, and Play Store compliant account deletion with proper confirmation flows, backend data cleanup, and secure sign-out. Required by both Apple App Store and Google Play Store guidelines for apps with account creation.
When to Use This Skill
- Adding account deletion to settings screen
- App Store or Play Store review requires account deletion
- Implementing GDPR "right to erasure"
- User asks "add delete account", "remove account option"
- Settings feature needs user data deletion
When NOT to Use This Skill
- User just wants to sign out - Use
/authsignOut method - Deleting app data only (no account) - Manual implementation
- Admin user deletion - Custom admin feature
Questions to Ask
- Backend type: Supabase, Firebase, or Custom API?
- Confirmation method: Password re-entry, typed confirmation, or simple dialog?
- Grace period: Immediate deletion or scheduled (e.g., 30 days)?
- Data cleanup: What user data needs deletion? (storage, analytics, etc.)
Quick Reference
App Store & Play Store Requirements
| Requirement | Implementation |
|---|---|
| Easy to find | Settings > Account > Delete Account |
| Clear explanation | Show what data will be deleted |
| Confirmation | Require explicit user action |
| Complete deletion | Remove all user data from backend |
| In-app option | Must be accessible within the app (not just web) |
GDPR Compliance
| Right | Implementation |
|---|---|
| Right to erasure | Full account + data deletion |
| Clear consent | Explicit confirmation required |
| Data portability | (Optional) Export before deletion |
Confirmation Methods
| Method | Security | UX | Use Case |
|---|---|---|---|
| Password re-entry | High | Low | Financial/sensitive apps |
| Type "DELETE" | Medium | Medium | Standard apps |
| Simple dialog | Low | High | Low-risk apps |
Workflow
Phase 1: Ask Questions
Use AskUserQuestion to gather:
- Backend type (Supabase/Firebase/Custom)
- Confirmation method preference
- Grace period requirements
- Data cleanup scope
Phase 2: Domain Layer
Create in lib/features/settings/domain/:
AccountDeletionFailure- Failure types- Extend
SettingsRepositorywithdeleteAccount()method
See: implementation-guide.md for code.
Phase 3: Data Layer
Create in lib/features/settings/data/:
- Implement
deleteAccount()in repository - Add backend-specific deletion logic (Supabase/Firebase/API)
- Add data cleanup (storage, analytics reset)
See: reference/repositories/ for implementations.
Phase 4: Presentation Layer
Create in lib/features/settings/presentation/:
DeleteAccountButtonwidgetDeleteAccountDialogwith confirmationAccountDeletionNotifierfor state management- Add to Settings screen
See: reference/screens/ and reference/widgets/ for code.
Phase 5: Integration
- Add delete account option to settings screen
- Wire up confirmation dialog
- Handle success (navigate to login)
- Handle errors (show failure message)
Phase 6: Testing
dart run .claude/skills/account-deletion/scripts/check.dart
File Structure
lib/features/settings/domain/failures/account_deletion_failure.dartlib/features/settings/data/repositories/settings_repository_impl.dart(extended)lib/features/settings/presentation/providers/account_deletion_notifier.dartlib/features/settings/presentation/widgets/delete_account_button.dartlib/features/settings/presentation/widgets/delete_account_dialog.dart
Core API
See: reference/providers/account_deletion_notifier.dart for full usage.
| Method | Purpose |
|---|---|
deleteAccount({confirmation}) | Deletes account with optional confirmation |
reset() | Resets state to initial |
validateConfirmation(input) | Validates "DELETE" input |
Failure Types
| Type | When | UI Action |
|---|---|---|
AccountDeletionNetworkFailure | No connection | Retry button |
AccountDeletionServerFailure | Backend error | Generic error |
AccountDeletionAuthFailure | Not authenticated | Navigate to login |
AccountDeletionConfirmationFailure | Wrong confirmation | Show validation error |
Guides
| File | Content |
|---|---|
| implementation-guide.md | Step-by-step with code examples |
| checklist.md | Implementation verification |
Reference Files
See: reference/ for complete implementations:
reference/failures/- AccountDeletionFailure sealed classreference/repositories/- Supabase, Firebase, API implementationsreference/providers/- AccountDeletionNotifierreference/widgets/- DeleteAccountButton, DeleteAccountDialogreference/screens/- Settings screen integration
Commands
# Validate implementation
dart run .claude/skills/account-deletion/scripts/check.dart
# Check specific feature
dart run .claude/skills/account-deletion/scripts/check.dart --feature settings
Checklist
-
AccountDeletionFailuresealed class created -
deleteAccount()in repository with backend deletion - User data cleanup (storage, analytics) + auth sign-out
-
DeleteAccountButtonandDeleteAccountDialogwidgets -
AccountDeletionNotifierwith loading/error states - Settings screen integration with clear explanation
- Explicit confirmation required before deletion
- App Store/Play Store: Easy to find, complete deletion, in-app option
See: checklist.md for detailed verification.
Common Issues
| Issue | Solution |
|---|---|
| "User not authenticated" | Check auth state before deletion, handle expired session |
| Data remains after deletion | Clean up: Supabase/Firebase record, SecureStorage, SharedPrefs, Analytics |
| Dialog dismissed accidentally | Set barrierDismissible: false on showDialog |
| Stuck on loading | Add disposal check (if (_disposed) return) after async operations |
See: implementation-guide.md for detailed solutions.
Related Skills
/auth- Provides signOut method used after deletion/i18n- Localize deletion strings/testing- Write tests for deletion flow/design- UI polish for deletion flow
Next Steps
After /account-deletion: Run /i18n settings, /testing settings, then /design.
What ships with it: 13 files
65.0 KB alongside SKILL.md, 1 of them executable
reference/
- failures/account_deletion_failure.dart2.1 KB
- providers/account_deletion_notifier.dart3.6 KB
- repositories/settings_repository_api.dart3.6 KB
- repositories/settings_repository_firebase.dart3.8 KB
- repositories/settings_repository_interface.dart1.1 KB
- repositories/settings_repository_supabase.dart3.2 KB
- screens/settings_screen_integration.dart4.4 KB
- widgets/delete_account_button.dart2.4 KB
- widgets/delete_account_dialog.dart6.6 KB
scripts/
- check.dart20.0 KB
templates/
- supabase-delete-user-function.tsruns4.3 KB
- checklist.md4.0 KB
- implementation-guide.md5.9 KB