realm-migration-ref

Migrate Realm schemas to SwiftData with threading and CloudKit sync transitions.

1.1k|81|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/CharlesWiltgen/Axiom --skill realm-migration-ref
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: realm-migration-ref
Source: https://github.com/CharlesWiltgen/Axiom/tree/main/.claude-plugin/plugins/axiom/skills/realm-migration-ref
Command: npx skills add https://github.com/CharlesWiltgen/Axiom --skill realm-migration-ref

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive guide for migrating from Realm to SwiftData, covering model conversion, relationships, threading, and CloudKit sync transitions.

Core Features & Use Cases

  • Model conversion patterns: From Realm Object models to SwiftData @Model classes.
  • Relationship mapping: One-to-many and many-to-many migrations with inverse relationships.
  • Threading conversion: Move to Swift Concurrency safely.

Quick Start

Outline a migration plan converting a Realm model with relationships to SwiftData, including a test harness.

Frequently Asked Questions about realm-migration-ref

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate a Realm database to SwiftData?

Migrate Realm to SwiftData by converting Realm Object models to SwiftData @Model classes, mapping relationships, and transitioning threading from Realm's dispatch to Swift Concurrency. The Skill covers schema translation, relationship patterns, and phased rollout strategies for production iOS apps.

What's the best way to handle relationships when converting from Realm to SwiftData?

SwiftData relationships differ from Realm's approach. Convert one-to-many and many-to-many relationships using inverse relationships, apply proper indexing strategies, and validate bidirectional links during migration testing to ensure data integrity.

Can I migrate Realm models with CloudKit sync to SwiftData?

Yes. SwiftData uses CloudKit for sync instead of Realm Device Sync. The migration covers sync transition patterns, including how to move subscription logic, conflict resolution, and account-tied data to SwiftData's CloudKit integration model.

How do I convert Realm's threading model to Swift Concurrency?

Replace Realm's dispatch-based threading with async/await patterns. The Skill covers safe conversion strategies, identifying thread-safety boundaries, and testing concurrent access to ensure data races don't occur post-migration.

What's involved in a phased Realm to SwiftData rollout?

Phased rollout runs Realm and SwiftData in parallel during transition. Strategies include dual persistence during staging, data verification between stores, gradual user cohort migration, and rollback plans for production safety.

Do I need to rewrite my app's entire data layer to migrate from Realm?

Not completely. Identify model conversion patterns first, then systematically migrate data access layer components. The Skill provides a test harness and migration phases to reduce rewrites and validate correctness incrementally.