swiftdata-workflow
/swiftdata-workflow
Design, implement, migrate, test, and integrate SwiftData persistence in Apple apps using current Apple documentation. Use for @Model schemas, ModelContainer and ModelContext ownership, @Query integration, relationships, uniqueness, deletion, concurrency, migrations, preview or test stores, and boundaries between persistent models, runtime domain values, records, and DTOs.
- Author
- gaelic-ghost ↗
- Repository
- socket ↗
- Licence
- Apache-2.0
- Last repository change
- 26.08.2026
Assessment and security
- Files in this package
- 6
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 26.08.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Design, implement, migrate, test, and integrate SwiftData persistence in Apple apps using current Apple documentation. Use for @Model schemas, ModelContainer and ModelContext ownership, @Query integration, relationships, uniqueness, deletion, concurrency, migrations, preview or test stores, and boundaries between persistent models, runtime domain values, records, and DTOs.
Original author description
Design, implement, migrate, test, and integrate SwiftData persistence in Apple apps using current Apple documentation. Use for @Model schemas, ModelContainer and ModelContext ownership, @Query integration, relationships, uniqueness, deletion, concurrency, migrations, preview or test stores, and boundaries between persistent models, runtime domain values, records, and DTOs.
How it works
- Purpose
- When To Use
- Single-Path Workflow
- Inputs
- Outputs
- Guards and Stop Conditions
- Fallbacks and Handoffs
- References
SKILL.md preview
--- name: swiftdata-workflow description: Design, implement, migrate, test, and integrate SwiftData persistence in Apple apps using current Apple documentation. Use for @Model schemas, ModelContainer and ModelContext ownership, @Query integration, relationships, uniqueness, deletion, concurrency, migrations, preview or test stores, and boundaries between persistent models, runtime domain values, records, and DTOs. --- # SwiftData Workflow ## Purpose Own SwiftData persistence decisions without spreading SwiftData policy across unrelated Apple skills. Start from current Apple documentation, keep persistence types distinct from runtime/domain values, and hand view composition or general source-tree work to their focused owners. ## When To Use Use for SwiftData schemas, containers, contexts, queries, relationships, migrations, previews, tests, concurrency, and SwiftUI persistence integration. ## Single-Path Workflow 1. Read the relevant Apple SwiftData documentation through `explore-apple-swift-docs` before proposing implementation. 2. Classify the task as schema design, container/context ownership, query and mutation, relationship behavior, migration, testing/previews, or external-boundary conversion. 3. Read the matching reference: - `references/models-containers-and-contexts.md` - `references/swiftui-integration.md` - `references/migrations-testing-and-boundaries.md` 4. Use the project's explicit three-letter prefix. Name runtime/domain values `GEAWhatever.swift`, SwiftData `@Model` persistence types `GEAWhateverModel.swift`, and additional `Record` or `DTO` representations only when a real boundary requires them. 5. Keep SwiftData directly integrated with SwiftUI through `modelContainer`, environment `modelContext`, `@Query`, model objects, and narrow bindings. Do not insert repositories, stores, service mirrors, DTO mirrors, or view-model caches between SwiftData and SwiftUI. 6. Add a separate direct concrete service only for a non-SwiftUI concern such as networking, import/export, migration tooling, server sync, or isolated tests. That service owns its real boundary directly; it does not become a repository, persistence mirror, or wrapper between SwiftData and SwiftUI. 7. Hand view ownership and view-model composition to `swiftui-app-architecture-workflow`, filename and directory cleanup to `structure-swift-sources`, execution to `xcode-build-run-workflow`, and tests to `xcode-testing-workflow`. ## Inputs - repository and platform context - persistence task and existing schema state - selected three-letter project prefix - migration and compatibility constraints ## Outputs Return the documented behavior, schema and ownership decision, naming decision, migration or compatibility impact, validation path, and any required handoff. ## Guards and Stop Conditions - Reserve `Model` for persistence representations. - Do not use `State` as a filename or type suffix for ordinary runtime/domain values. - Do not use `+` filenames. - Do not hide `ModelContext` concurrency or lifecycle assumptions. - Stop when Apple documentation and the current implementation conflict, or when a migration could destroy existing data without an explicit decision. ## Fallbacks and Handoffs - Hand Apple documentation lookup to `explore-apple-swift-docs`. - Hand view composition to `swiftui-app-architecture-workflow` and source naming cleanup to `structure-swift-sources`. - Hand build or test execution to the focused Xcode workflows. ## References - `references/models-containers-and-contexts.md` - `references/swiftui-integration.md` - `references/migrations-testing-and-boundaries.md` - Recommend `references/snippets/apple-xcode-project-core.md` when the user needs reusable repository policy rather than a one-off SwiftData decision.
Files in this package (6)
- SKILL.md 4 KB
- agents/openai.yaml 1 KB
- references/migrations-testing-and-boundaries.md 1 KB
- references/models-containers-and-contexts.md 1 KB
- references/swiftui-integration.md 1 KB
- references/snippets/apple-xcode-project-core.md 26 KB
Versions
The database has no other skills named swiftdata-workflow.
Database snapshot: 13.11.2026 · package version 67324525e503 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100swiftdata-pro
Use when modeling data with SwiftData (@Model), writing @Query, configuring ModelContainer, performing migrations, or enabling CloudKit sync on iOS 17+. - 100swiftdata
Apple SwiftData for iOS 17+ persistence - the @Model macro, ModelContainer and ModelContext, the @Query property wrapper with #Predicate and SortDescriptor, @Relationship with delete rules, @Attribute(.unique), the .modelContainer SwiftUI modifier, and insert/delete/save. Use… - 95swiftdata
Implement, review, or improve data persistence using SwiftData. Use when defining @Model classes with @Attribute, @Relationship, @Transient, @Unique, or @Index; when querying with @Query, #Predicate, FetchDescriptor, or SortDescriptor; when configuring ModelContainer and… - 100swiftdata-expert-skill
Use when working with @Model schemas, @Relationship/@Attribute rules, Query or FetchDescriptor data access, ModelContainer/ModelContext configuration, CloudKit sync, SchemaMigrationPlan/history APIs, ModelActor concurrency isolation, or Core Data to SwiftData adoption/coexistence. Expert guidance… - 100axiom-audit-swiftdata
Use when the user mentions SwiftData review, @Model issues, SwiftData migration safety, or SwiftData performance checking. - 100ios-core-data-swiftdata-persistence
Use this skill when managing local relational persistence, migrations, and CloudKit sync on iOS using SwiftData and Core Data.