Swiftdata workflow
Skill gaelic-ghost/socket/plugins/apple-dev-skills/skills/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.From its SKILL.md
npx -y skills add gaelic-ghost/socket --skill swiftdata-workflowAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.9 KB, 719 tokens by cl100k_base, as published. Nobody here has run it
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
- Read the relevant Apple SwiftData documentation through
explore-apple-swift-docsbefore proposing implementation. - Classify the task as schema design, container/context ownership, query and mutation, relationship behavior, migration, testing/previews, or external-boundary conversion.
- Read the matching reference:
references/models-containers-and-contexts.mdreferences/swiftui-integration.mdreferences/migrations-testing-and-boundaries.md
- Use the project's explicit three-letter prefix. Name runtime/domain values
GEAWhatever.swift, SwiftData@Modelpersistence typesGEAWhateverModel.swift, and additionalRecordorDTOrepresentations only when a real boundary requires them. - Keep SwiftData directly integrated with SwiftUI through
modelContainer, environmentmodelContext,@Query, model objects, and narrow bindings. Do not insert repositories, stores, service mirrors, DTO mirrors, or view-model caches between SwiftData and SwiftUI. - 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.
- Hand view ownership and view-model composition to
swiftui-app-architecture-workflow, filename and directory cleanup tostructure-swift-sources, execution toxcode-build-run-workflow, and tests toxcode-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
Modelfor persistence representations. - Do not use
Stateas a filename or type suffix for ordinary runtime/domain values. - Do not use
+filenames. - Do not hide
ModelContextconcurrency 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-workflowand source naming cleanup tostructure-swift-sources. - Hand build or test execution to the focused Xcode workflows.
Customization
Use references/customization-flow.md. The first version has no runtime-enforced knobs; scripts/customization_config.py preserves the shared configuration contract.
References
references/models-containers-and-contexts.mdreferences/swiftui-integration.mdreferences/migrations-testing-and-boundaries.mdreferences/customization-flow.md- Recommend
references/snippets/apple-xcode-project-core.mdwhen the user needs reusable repository policy rather than a one-off SwiftData decision.
What ships with it: 8 files
35.7 KB alongside SKILL.md, 1 of them executable
agents/
- openai.yaml264 B
references/
scripts/
- customization_config.pyruns6.2 KB