For apps still on Core Data rather than SwiftData, this covers the full persistence stack: setting up NSPersistentContainer, threading rules with perform blocks, NSFetchedResultsController for table views, and batch operations that run at SQL level. It includes iOS 17+ features like staged migrations and composite attributes, plus persistent history tracking for multi-target sync. The concurrency section is solid on the "never pass NSManagedObject across threads" rule and shows how to use objectID with Swift concurrency. If you're maintaining a Core Data codebase or need features SwiftData doesn't expose yet, this has the patterns you actually use in production, not just CRUD basics.

skills.sh installs
2.8K
GitHub stars
1.3K
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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

Sponsors

Details

Repository
github.com/dpearson2699/swift-ios-skills
Categories
DevOps & CI/CD, Git & Pull Requests, Code Review & Quality, Mobile Development
First seen
Jun 3, 2026

More from dpearson2699/swift-ios-skills

All 98
1juliusbrussee avatarcavemanjuliusbrussee/cavekitCaveman encoding for SPEC.md and spec-adjacent writes. Loaded by /spec, /build, /check. Cuts tokens ~75% vs prose while staying precise. Triggers on any write t2.8Kskills.sh installs
2apify avatarapify-lead-generationapify/agent-skillsGenerates B2B/B2C leads by scraping Google Maps, websites, Instagram, TikTok, Facebook, LinkedIn, YouTube, and Google Search. Use when user asks to find leads, 2.8Kskills.sh installs
3ar9av avatarwiki-dashboardar9av/obsidian-wikiCreate dynamic, queryable dashboard views of the Obsidian vault using Obsidian Bases or Dataview. Use this skill when the user says "create a dashboard", "vault2.8Kskills.sh installs
4nexu-io avatarpixelbin-medianexu-io/open-designGenerate and edit images and videos with an 85+ API portfolio and build visually appealing website pages via Pixelbin.2.8Kskills.sh installs
5marimo-team avatarimplement-papermarimo-team/skillsImplement a research paper as an interactive marimo notebook together with the user. Start by understanding what the user wants to explore, fetch the paper via 2.8Kskills.sh installs
6browserbase avatarautobrowsebrowserbase/skillsSelf-improving browser automation via the auto-research loop. Iteratively runs a browsing task, reads the trace, and improves the navigation skill (strategy.md)2.8Kskills.sh installs