Agent Skills: UserDefaults Migrator

Find UserDefaults.standard usage in Leavn, migrate to PreferencesStore/SwiftData, create entities, ensure single source of truth

UncategorizedID: willsigmon/sigstack/userdefaults-migrator

Install this agent skill to your local

pnpm dlx add-skill https://github.com/willsigmon/sigstack/tree/HEAD/plugins/app-dev/skills/userdefaults-migrator

Skill Files

Browse the full folder contents for userdefaults-migrator.

Download Skill

Loading file tree…

plugins/app-dev/skills/userdefaults-migrator/SKILL.md

Skill Metadata

Name
UserDefaults Migrator
Description
Find UserDefaults.standard usage in Leavn, migrate to PreferencesStore/SwiftData, create entities, ensure single source of truth

UserDefaults Migrator

Migrate UserDefaults to SwiftData:

  1. Find usage: grep -r "UserDefaults.standard"

  2. Categorize:

    • Keep: Tests, debug flags, widgets
    • Migrate: User preferences, stats, settings
  3. Create entity if needed

  4. Update code to use PreferencesStore

  5. Write migration logic

  6. Archive old keys

Use when: UserDefaults cleanup, preference migration, SwiftData entities