core-data
Build, review, or improve Core Data persistence in apps that have not adopted SwiftData. Use when working with NSManagedObject subclasses, NSFetchedResultsController for list-driven UI, NSBatchInsertRequest / NSBatchDeleteRequest / NSBatchUpdateRequest for bulk operations, NSPersistentHistoryChangeRequest for persistent history tracking and multi-target sync, NSStagedMigrationManager for staged schema migrations (iOS 17+), NSCompositeAttributeDescription for composite attributes (iOS 17+), or when integrating Core Data threading with Swift Concurrency. For Core Data + SwiftData coexistence or
npx skills add dpearson2699/swift-ios-skills --skill core-data --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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](#stack-setup) - [Concurrency and Threading](#concurrency-and-threading) - [NSFetchedResultsController](#nsfetchedresultscontroller) - [Batch Operations](#batch-operations) - [Persistent History Tracking](#persistent-history-tracking) - [Staged Migration](#staged-migration) - [Composite Attributes](#composite-attributes) - [SwiftData Boundary](#swiftdata-boundary) - [Testing](#testing) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Stack Setup `NSPersistentContainer` encapsulates the Core Data stack. Docs: [NSPersistentContainer](https://sosumi.ai/documentation/coredata/nspersistentcontainer) ```swift import CoreData final class CoreDataStack: @unchecked Sendable { static let shared = CoreDataStack() let container: NSPersistentContainer private init() { container = NSPersistentContainer(name: "MyAppModel") container.loadPersistentStores { _, error in if
- Contents
- Stack Setup
- Concurrency and Threading
- Swift Concurrency Integration
- NSFetchedResultsController
- Batch Operations
- NSBatchInsertRequest (iOS 13+)
- NSBatchDeleteRequest (iOS 9+)
- NSBatchUpdateRequest (iOS 8+)
- Persistent History Tracking
- Staged Migration
- Composite Attributes
- SwiftData Boundary
- Testing
What does the core-data skill do?
Build, review, or improve Core Data persistence in apps that have not adopted SwiftData. Use when working with NSManagedObject subclasses, NSFetchedResultsController for list-driven UI, NSBatchInsertRequest / NSBatchDeleteRequest / NSBatchUpdateRequest for bulk operations, NSPersistentHistoryChangeRequest for persistent history tracking and multi-target sync, NSStagedMigrationManager for staged schema migrations (iOS 17+), NSCompositeAttributeDescription for composite attributes (iOS 17+), or when integrating Core Data threading with Swift Concurrency. For Core Data + SwiftData coexistence or
How do I install it?
Run `npx skills add dpearson2699/swift-ios-skills --skill core-data --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From dpearson2699/swift-ios-skills, a repository with 963 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.