core-data — Claude Code skill: Core Data without SwiftData
A skill for Core Data work in apps that have not moved to SwiftData: stack setup, concurrency, batch operations and migrations.
npx skills add dpearson2699/swift-ios-skills --skill core-data -a claude-codeWhat core-data does
The skill covers building a stack on NSPersistentContainer and keeping contexts off each other's queues. Its rules are blunt: reach a context through perform, hand NSManagedObjectID across threads and re-fetch, and turn on change merging for viewContext.
Other sections deal with NSFetchedResultsController driving a UITableView or UICollectionView, bulk inserts and deletes, persistent history tracking, staged schema migration and testing. There is a common-mistakes list and a review checklist. One hard requirement: a fetched results controller needs at least one sort descriptor, so a request without one will not work.
This is Swift work. Without familiarity with NSManagedObject and NSFetchRequest the material will not carry you far. If Core Data and SwiftData have to live together, the author points you to the swiftdata skill.
What it helps with
- Set up a Core Data stack that survives background writes
- Drive a list view from
NSFetchedResultsController - Run a bulk import without loading objects into memory
- Wire persistent history for multi-target sync
- Break a schema migration into stages
Example prompts for the agent
- Set up a Core Data stack with a background context for writes
- Review my
NSFetchedResultsController, the list does not refresh after a save - Rewrite this import as a batch insert with
NSBatchInsertRequest
How to install core-data
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill core-data -a claude-code2Manually: put the files in place
~/.claude/skills/core-data/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/core-data/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill core-data -a codex2Manually: put the files in place
.agents/skills/core-data/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill core-data -a cursor2Manually: put the files in place
.cursor/skills/core-data/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills core-data2Manually: put the files in place
.github/skills/core-data/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill core-data -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/core-dataManually: put the files in place
.devin/skills/core-data/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill core-data -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about core-data
How do I install core-data in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill core-data -a claude-code. The skill file then lives at ~/.claude/skills/core-data/SKILL.md.
What does core-data do?
It guides writing and reviewing Core Data persistence code: stack, threading, batch requests, history tracking, migrations and testing.
How is core-data different from the swiftdata skill?
core-data targets apps that still use Core Data. Coexistence with SwiftData and migration between the two belong to swiftdata.