Back to Skills

core-data-expert

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.

283stars16forksUpdated 6/22/2026

Security Assessment

Medium Risk(50/100)

Detected risks:

Secret Exposure([references/persistent-history.md] Token =, [references/persistent-history.md] token =)
Sensitive File Access([references/concurrency.md] .env, [references/stack-setup.md] .env)
Security Score50/100

About core-data-expert

The Core Data Expert skill provides fast, production-oriented guidance for building correct and performant Core Data stacks on iOS and macOS platforms. It specializes in diagnosing and fixing common Core Data crashes, threading issues, and performance bottlenecks. The skill focuses on practical, actionable advice rather than theoretical concepts, helping developers quickly identify problems and implement robust solutions.

This skill covers the full spectrum of Core Data development including stack setup with proper merge policies, fetch requests with NSFetchedResultsController, context management across view and background contexts, batch operations with persistent history tracking, schema migrations (lightweight, staged, and deferred), and CloudKit synchronization with NSPersistentCloudKitContainer. It emphasizes correct threading patterns using NSManagedObjectID for cross-context communication and provides specific guidance for Swift Concurrency integration with async/await and actors.

The skill is designed for iOS and macOS developers working with Core Data at any level—from those setting up their first persistent stack to experienced engineers debugging complex merge conflicts or optimizing fetch performance. It includes comprehensive references for common error scenarios like cross-context exceptions, migration failures, Sendable compliance issues, and batch operations that don't trigger UI updates. The skill's triage-first approach helps developers quickly route to the right solution based on their specific context, deployment target, and error patterns.

FAQ

What iOS/macOS versions does this skill cover?

This skill covers Core Data across different iOS and macOS deployment targets, with specific guidance for features available in iOS 14+, iOS 17+, and modern macOS versions. It identifies version-specific features like staged migrations (iOS 17+) and provides appropriate recommendations based on your deployment target.

How does this skill help with threading and concurrency issues?

The skill provides detailed guidance on both traditional threading patterns (perform/performAndWait) and modern Swift Concurrency (async/await, actors). It emphasizes using NSManagedObjectID for cross-context communication and never passing NSManagedObject instances between contexts. It includes specific references for handling Sendable compliance and actor-isolation warnings.

Can this skill help with CloudKit synchronization issues?

Yes, the skill includes comprehensive guidance on NSPersistentCloudKitContainer integration, CloudKit sync debugging, and schema management. It specifically reminds developers that Production CloudKit schemas are immutable and provides troubleshooting steps for common sync issues.

What should I do if batch operations aren't updating my UI?

The skill has dedicated references for persistent history tracking and batch operations. It guides you through enabling persistent history tracking (often required for UI updates) and setting up proper merge pipelines to ensure batch changes are reflected in your UI contexts.

How does this skill handle schema migrations?

The skill covers all migration strategies: lightweight migrations (preferred when possible), staged migrations for complex changes (iOS 17+), and deferred migrations. It helps diagnose version hash errors and provides step-by-step guidance for implementing the appropriate migration strategy based on your schema changes.

All Files

16 files
references/batch-operations.md14.4 KB
View
references/concurrency.md12.4 KB
View
references/fetch-requests.md17.1 KB
View
references/migration.md10.6 KB
View
references/saving.md13.6 KB
View
references/_index.md4.0 KB
View
references/cloudkit-integration.md6.2 KB
View
references/model-configuration.md14.1 KB
View
references/stack-setup.md17.5 KB
View
references/glossary.md5.6 KB
View
references/project-audit.md2.1 KB
View
SKILL.md4.7 KB
View
references/performance.md6.2 KB
View
references/testing.md7.8 KB
View
references/persistent-history.md17.1 KB
View
references/threading.md14.0 KB
View

Install core-data-expert

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill