This covers the full SwiftData lifecycle: defining @Model classes with attributes and relationships, querying with @Query and #Predicate, managing concurrency with @ModelActor, and planning schema migrations with VersionedSchema. You'll reach for it when setting up persistence in a new iOS app, migrating from Core Data, or debugging why your relationships cascade incorrectly. The predicate syntax takes getting used to,it's expressive but limited compared to arbitrary Swift,and the migration examples show both lightweight and custom stages, which is helpful since Apple's docs gloss over the custom case. Solid reference when you're past the hello-world phase and need to handle real schema evolution or background imports.

skills.sh installs
4.3K
GitHub stars
1.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add dpearson2699/swift-ios-skills --skill swiftdata --agent claude-code

Installs into .claude/skills of the current project.

Files

SwiftData

Persist, query, and manage structured data in iOS 26+ apps using SwiftData with Swift 6.3.

Contents

Model Definition

Apply @Model to a class (not struct). It synthesizes PersistentModel conformance. Model instances remain context/actor-bound; pass their PersistentIdentifier, not the instance, across actors.

Sponsors

Details

Repository
github.com/dpearson2699/swift-ios-skills
Categories
Git & Pull Requests, Code Review & Quality, Productivity & Planning, Marketing & SEO, Mobile Development
First seen
Apr 16, 2026

More from dpearson2699/swift-ios-skills

All 98
1getsentry avatarsentry-create-alertgetsentry/sentry-for-aiCreate Sentry alerts using the workflow engine API. Use when asked to create alerts, set up notifications, configure issue priority alerts, or build workflow au4.2Kskills.sh installs
2zc277584121 avatarremove-ai-stylezc277584121/marketing-skillsReview and rewrite Chinese or English prose to reduce AI-generated patterns. Use for de-AI polishing, natural-language rewrites, robotic or formulaic writing, a4.2Kskills.sh installs
3actionbook avatarcoding-guidelinesactionbook/rust-skillsUse when asking about Rust code style or best practices. Keywords: naming, formatting, comment, clippy, rustfmt, lint, code style, best practice, P.NAM, G.FMT, 4.2Kskills.sh installs
4forcedotcom avatargenerating-apexforcedotcom/sf-skillsPrimary Apex authoring skill for class generation, refactoring, and review. ALWAYS ACTIVATE when the user mentions Apex, .cls, triggers, or asks to create/refac4.2Kskills.sh installs
5agricidaniel avatarads-budgetagricidaniel/claude-adsPlan and review paid-media budgets, bidding, pacing, marginal return, forecasts, CPA, ROAS, MER, LTV:CAC, constraints, and allocation across supported platforms4.2Kskills.sh installs
6dpearson2699 avatarstorekitdpearson2699/swift-ios-skillsImplement, review, or improve in-app purchases and subscriptions using StoreKit 2. Use when building paywalls with SubscriptionStoreView or ProductView, process4.2Kskills.sh installs