← ClaudeAtlas

core-datalisted

Route Core Data implementation tasks to the correct Knowledge Contracts -- subclassing NSManagedObject and choosing an .xcdatamodeld Codegen mode (Class Definition/Manual-None/Category+Extension) with @NSManaged properties, standing up NSPersistentContainer via loadPersistentStores(completionHandler:) and viewContext with NSPersistentStoreDescription store options, NSManagedObjectContext CRUD (insertNewObject(forEntityName:into:)/init(context:), delete(_:), save(), perform(_:)/performAndWait(_:), parent), fetching with NSFetchRequest<T>/NSPredicate/NSSortDescriptor/context.fetch(_:)/@FetchRequest, and NSDeleteRule referential integrity. Use when writing @NSManaged public var, NSEntityDescription.insertNewObject(forEntityName:into:), Task(context:), NSPersistentContainer(name:), container.loadPersistentStores { }, container.viewContext, NSPersistentStoreDescription, context.insert(_:)/delete(_:)/save(), context.perform { }/performAndWait { }, context.parent, NSFetchRequest<Item>(entityName:), NSPredicate(forma
caglarbaranbora/Apple-Agent-Kit · ★ 1 · Data & Documents · score 70
Install: claude install-skill caglarbaranbora/Apple-Agent-Kit
# Core Data — Foundations Skill ## Purpose Route Core Data implementation tasks to the minimum required Core Data Knowledge Contracts. v1 scope is subclassing `NSManagedObject` and choosing an `.xcdatamodeld` Codegen mode with `@NSManaged` properties, standing up and loading an `NSPersistentContainer`, performing CRUD through an `NSManagedObjectContext` with basic thread confinement and a basic parent-child context relationship, fetching with `NSFetchRequest`/ `@FetchRequest`, and `NSDeleteRule`/inverse-relationship referential integrity -- not CloudKit sync, not migration, not `NSFetchedResultsController`, not advanced multi-context concurrency, and not SwiftData interop. ## Routing Load only the contracts relevant to the task. All paths relative to knowledge/core-data/. - Subclassing `NSManagedObject`; choosing a Codegen mode (Class Definition/Category+Extension/Manual-None); declaring `@NSManaged` attribute or relationship properties; or asking what Xcode's generated code does and doesn't synthesize -> model-definition.md - Constructing `NSPersistentContainer(name:)`; calling `loadPersistentStores(completionHandler:)` and handling its error; reading `viewContext`; configuring a store via `NSPersistentStoreDescription`/`persistentStoreDescriptions`; or injecting a context with `.environment(\.managedObjectContext, ...)` -> persistent-container-setup.md - Inserting via `NSEntityDescription.insertNewObject(forEntityName:into:)` o