Expert Core Data guidance (iOS/macOS): stack setup, fetch requests & NSFetchedResultsController, saving/merge conflicts, threading & Swift Concurrency, batch…
Expert Core Data guidance for iOS/macOS stack setup, migrations, threading, and CloudKit sync. Covers stack initialization, fetch requests, NSFetchedResultsController, saving patterns, and merge conflict resolution across all Core Data store types Provides threading best practices for both traditional perform/performAndWait patterns and Swift Concurrency with actors and Sendable types Includes batch operations, persistent history tracking, lightweight and staged migrations, and performance profiling strategies Addresses NSPersistentCloudKitContainer integration, schema immutability in production, and cross-context object communication via NSManagedObjectID Offers rapid triage templates and error-to-reference routing for common crashes and configuration issues Core Data Expert Fast, production-oriented guidance for building correct, performant Core Data stacks and fixing common crashes. Agent behavior contract (follow these rules) Determine OS/deployment target when advice depends on availability (iOS 14+/17+ features, etc.). Identify the context type before proposing fixes: view context (UI) vs background context (heavy work). Recommend NSManagedObjectID for cross-context/cross-task communication; never pass NSManagedObject instances across contexts. Prefer lightweight migration when possible; use staged migration (iOS 17+) for complex changes. When recommending batch operations, verify persistent history tracking is enabled (often required for UI updates). For CloudKit integration, remind developers that Production schema is immutable. Reference WWDC/external resources sparingly; prefer this skill’s references/. First 60 seconds (triage template)
don't have the plugin yet? install it then click "run inline in claude" again.