AvdLee/Core-Data-Agent-Skill / core-data-expert
core-data-expert
VerifiedExpert 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.8 KB |
| references/_index.md | markdown | 4.0 KB |
| references/batch-operations.md | markdown | 14.4 KB |
| references/cloudkit-integration.md | markdown | 6.2 KB |
| references/concurrency.md | markdown | 12.5 KB |
| references/fetch-requests.md | markdown | 17.1 KB |
| references/glossary.md | markdown | 5.6 KB |
| references/migration.md | markdown | 10.6 KB |
| references/model-configuration.md | markdown | 14.2 KB |
| references/performance.md | markdown | 6.2 KB |
| references/persistent-history.md | markdown | 17.1 KB |
| references/project-audit.md | markdown | 2.1 KB |
| references/saving.md | markdown | 13.7 KB |
| references/stack-setup.md | markdown | 17.5 KB |
| references/testing.md | markdown | 7.8 KB |
| references/threading.md | markdown | 14.1 KB |
references/project-audit.md
View on GitHub# Project Audit (Core Data)
Use this checklist to quickly discover how a project uses Core Data and which constraints apply (platform availability, CloudKit, history tracking, etc.).
## Determine platform constraints
- Find the deployment target (iOS/macOS version). Many recommendations depend on this (e.g. staged migration and composite attributes require iOS 17+/macOS 14+).
- Note whether the project is Swift 6 / strict concurrency enabled (Sendable and isolation warnings change the advice).
## Inspect the data model
- Open the model XML (`*.xcdatamodeld/*/contents`) and check:
- entities, attributes, relationships, constraints
- versioning setup (multiple model versions)
- renaming identifiers (for lightweight migration)
- composite attributes (iOS 17+)
## Identify stack setup
Search for:
- `NSPersistentContainer` vs `NSPersistentCloudKitContainer`
- `loadPersistentStores` configuration
- `persistentStoreDescriptions` (migration options, history tracking, CloudKit options)
- `viewContext` configuration (merge policy, `automaticallyMergesChangesFromParent`, query generations)
- background context creation (`newBackgroundContext`, `performBackgroundTask`)
Then consult:
- `stack-setup.md` for recommended defaults and merge policies
- `cloudkit-integration.md` if CloudKit is enabled
## Check for persistent history tracking (required for some flows)
Search for:
- `NSPersistentHistoryTrackingKey`
- `NSPersistentStoreRemoteChangeNotificationPostOptionKey`
- remote change notifications and history processing/merging
Then consult:
- `persistent-history.md` for the Observer/Fetcher/Merger/Cleaner pattern
## Spot risky concurrency patterns
Search for:
- cross-thread access to managed objects (look for passing `NSManagedObject` into async tasks/closures)
- `performAndWait` usage (risk of deadlocks / UI blocking)
- `@unchecked Sendable` applied to Core Data types (usually hides a real problem)
Then consult:
- `threading.md` and `concurrency.md`
## Useful debugging flags (for repro builds only)
- `-com.apple.CoreData.ConcurrencyDebug 1` (threading violations)
- `-com.apple.CoreData.SQLDebug 1` (SQL logging)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |