What problem does it solve?
Provides practical patterns and guidance for modeling, querying, configuring, and migrating relational data using SwiftData so developers can avoid common pitfalls and build reliable persistence layers for Apple platform apps.
Core Features & Use Cases
- Model design: Best practices for declaring @Model reference types, attributes, transient properties, and sensible initializers.
- Relationships & consistency: Guidance on Relationship delete rules, inverse declarations, and keeping the object graph consistent.
- Queries & predicates: Examples for @Query, FetchDescriptor usage, SortDescriptor composition, and type-safe predicate construction.
- Container configuration & sync: Instructions for ModelContainer setup, in-memory previews, on-disk stores, and CloudKit-backed configurations.
- Migration & background work: VersionedSchema and SchemaMigrationPlan patterns, lightweight versus custom migrations, and background persistence using ModelActor.
Quick Start
Ask the skill to review your SwiftData model files and generate concrete Model, relationship, query, and migration recommendations for your app.