core-data-pro — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited core-data-pro (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Use Core Data correctly: safe contexts, efficient fetches, clean migrations. (For new apps, also consider SwiftData — see swiftdata-pro.)
Trigger: /core-data-pro.
NSManagedObjects belong to their context — don't pass them across threads, pass IDs.let container = NSPersistentContainer(name: "Model")
container.loadPersistentStores { _, error in
if let error { fatalError("Store load failed: \(error)") }
}
container.viewContext.automaticallyMergesChangesFromParent = true❌ Background work on the view context (crashes / corruption)
DispatchQueue.global().async {
let obj = Item(context: container.viewContext) // wrong queue
}✅ Background context with perform
container.performBackgroundTask { context in
let obj = Item(context: context)
obj.title = "New"
try? context.save() // merges into viewContext automatically
}Pass object IDs across contexts, not objects:
let id = obj.objectID
container.performBackgroundTask { ctx in
let bgObj = ctx.object(with: id)
}❌ Fetch everything, filter in Swift
let all = try context.fetch(Item.fetchRequest())
let recent = all.filter { $0.date > cutoff } // loads the whole table✅ Predicate + sort + limit in the request
let req = Item.fetchRequest()
req.predicate = NSPredicate(format: "date > %@", cutoff as NSDate)
req.sortDescriptors = [NSSortDescriptor(key: "date", ascending: false)]
req.fetchLimit = 50
let recent = try context.fetch(req)Use fetchBatchSize for large lists; NSFetchedResultsController (UIKit) or @FetchRequest (SwiftUI) for table/list binding.
For bulk delete/update, skip loading objects into memory:
let delete = NSBatchDeleteRequest(fetchRequest: Item.fetchRequest())
try context.execute(delete)
// then merge changes into viewContextshouldInferMappingModelAutomatically = true.
NSEntityMigrationPolicy. Never edit ashipped model version in place; add a new version.
perform).NSManagedObjects across threads instead of objectID.NSPredicate.fetchLimit/fetchBatchSize on large fetches.NSBatchDeleteRequest.Per issue: file:line, rule, before/after. Lead with threading violations (crash risk) and migration hazards.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.