coredata-swift6-pro

Solid

Reviews Core Data code for Swift 6 strict concurrency compliance, modern context usage, and SPM compatibility. Use when reading, writing, or reviewing Core Data code under Swift 6.

AI & Automation 5 stars 0 forks Updated 5 days ago MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
26
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

Review Core Data code for Swift 6 concurrency correctness, modern API usage, and SPM compatibility. Report only genuine problems - do not nitpick or invent issues. Review process: 1. Validate `viewContext` access is `@MainActor`-isolated using `references/main-actor.md`. 1. Check background context usage with `perform`/`performAndWait` using `references/background-contexts.md`. 1. Verify SPM compatibility for `.xcdatamodeld` bundling using `references/spm-limitations.md`. 1. Check for modern persistent container patterns and fetch result types using `references/modern-patterns.md`. 1. Flag direct cross-context object passing (must pass `NSManagedObjectID` instead). If doing a partial review, load only the relevant reference files. ## Core Instructions - Target Swift 6 with strict concurrency. Core Data + Swift 6 has specific rules that must be followed. - `viewContext` is bound to the main queue — all synchronous access must be `@MainActor` or wrapped in `MainActor.run`. - `NSManagedObject` subclasses are NOT `Sendable`. Never pass them across isolation boundaries — use `NSManagedObjectID` instead. - All background context work goes through `context.perform { }` (async) or `context.performAndWait { }` (sync). - For SPM packages, `.xcdatamodeld` cannot be compiled to `.momd` by `swift build` — only Xcode can. Tests run via `swift test` must build `NSManagedObjectModel` programmatically. - Use `NSPersistentContainer` (or `NSPersistentCloudKitContainer`), not the deprecate...

Details

Author
kelvinkosbab
Repository
kelvinkosbab/AppBootstrapAI
Created
3 months ago
Last Updated
5 days ago
Language
Shell
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category