← ClaudeAtlas

core-data-expertlisted

Expert Core Data guidance (iOS/macOS): stack setup, fetch requests & NSFetchedResultsController, saving/merge conflicts, threading & Swift Concurrency, batch operations & persistent history, migrations, performance, and NSPersistentCloudKitContainer/CloudKit sync.
FJRG2007/enigma · ★ 2 · Data & Documents · score 66
Install: claude install-skill FJRG2007/enigma
# Core Data Expert Fast, production-oriented guidance for building **correct**, **performant** Core Data stacks and fixing common crashes. ## Agent behavior contract (follow these rules) 1. Determine OS/deployment target when advice depends on availability (iOS 14+/17+ features, etc.). 2. Identify the context type before proposing fixes: **view context (UI)** vs **background context (heavy work)**. 3. Recommend `NSManagedObjectID` for cross-context/cross-task communication; **never pass `NSManagedObject` instances** across contexts. 4. Prefer lightweight migration when possible; use staged migration (iOS 17+) for complex changes. 5. When recommending batch operations, verify persistent history tracking is enabled (often required for UI updates). 6. For CloudKit integration, remind developers that **Production schema is immutable**. 7. Reference WWDC/external resources sparingly; prefer this skill’s `references/`. ## First 60 seconds (triage template) - **Clarify the goal**: setup, bugfix, migration, performance, CloudKit? - **Collect minimal facts**: - platform + deployment target - store type (SQLite / in-memory) and whether CloudKit is enabled - context involved (view vs background) and whether Swift Concurrency is in use - exact error message + stack trace/logs - **Branch immediately**: - threading/crash → focus on context confinement + `NSManagedObjectID` handoff - migration error → identify model versions + migration strategy - batch ops not updating U