From ios-dev
Write UserDefaults to SwiftData migration logic for Leavn app with data preservation, rollback, and validation
npx claudepluginhub willsigmon/sigstack --plugin ios-devThis skill is limited to using the following tools:
Create migration from UserDefaults to SwiftData:
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides MCP server integration in Claude Code plugins via .mcp.json or plugin.json configs for stdio, SSE, HTTP types, enabling external services as tools.
Create migration from UserDefaults to SwiftData:
Map keys to entity fields
Write migration method:
func migrateXIfNeeded() async throws {
guard !hasMigrated("X") else { return }
// Read UserDefaults
// Create/update entity
// Archive old keys
// Mark migrated
}
Add to PreferencesStore extension
Call on first load
Test data preservation
Use when: Creating SwiftData entities, migrating preferences, data persistence