Skip to content

Core Data persistence guidance for apps not yet on SwiftData, covering stack setup, concurrency, and staged migration.

CCM score
73 of 100
skills.sh installs
3K
GitHub stars
1.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers stack setup, Swift Concurrency threading, NSFetchedResultsController list UI, and batch operations on Core Data stores
  • Includes persistent history tracking for multi-target sync, staged schema migration (iOS 17+), and composite attributes (iOS 17+)
  • Enforces passing NSManagedObjectID across threads instead of managed objects, and requires sort descriptors on fetch requests
  • Designed for existing Core Data apps; defers Core Data and SwiftData coexistence or migration questions to the swiftdata skill

Install

$ npx -y skills add dpearson2699/swift-ios-skills --skill core-data -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Core Data

Build and maintain data persistence using Core Data for apps that have not adopted SwiftData. Covers stack setup, concurrency, batch operations, NSFetchedResultsController, persistent history tracking, staged migration, and testing.

Contents

Stack Setup

NSPersistentContainer encapsulates the Core Data stack.

Docs: NSPersistentContainer

import CoreData

final class CoreDataStack: @unchecked Sendable {
    static let shared = CoreDataStack()

    let container: NSPersistentContainer

Details

Repository
github.com/dpearson2699/swift-ios-skills
Categories
Mobile Apps, Databases
First seen
Jun 3, 2026

More from dpearson2699/swift-ios-skills

All 94

Similar to Core Data

More Mobile Apps