Swift Data
ListedHelps with Swift, data as part of building frontend UIs and user experiences workflows.
Install on your platform
Showing Claude Code. One command installs this skill into any of the agents below.
- 1
Run this in your project
terminal$ npx skills add pproenca/dot-skills --skill swift-data -a claude-code Uses the open-source
skillsCLI and needs Node.js. Add-gto install it for your user instead of this project.
What we know about this skill
Publisher
pproenca
Taken from the source listing. We haven't verified who controls this account.
Install target
Live repository
Not pinned. Installing fetches whatever the repository holds at the time you run the command.
Automated safety checks
We could not read this skill's source, so none of the checks below were run.
About this skill
What it does
This skill provides a comprehensive guide to using SwiftData for building frontend user interfaces and experiences within a modular MVVM-C architecture. It focuses on best practices for data modeling, persistence, synchronization, and error handling specifically when working with the "clinic" modular approach. The skill ensures that SwiftData types are isolated to Data layer implementations, promoting clean separation of concerns between feature modules, domain logic, and data access.
When to use it
- When defining
@Modelentity classes and mapping them to corresponding domain structs. - When setting up the
ModelContainerandModelContextwithin your application's Data layer. - When implementing repository protocols using SwiftData as the underlying persistence mechanism.
- When designing stale-while-revalidate data fetching strategies.
Key capabilities
- Provides guidance on defining
@Modelentities and mapping them to domain structs. - Covers setup of
ModelContainerandModelContext. - Explains how to implement repository protocols using SwiftData.
- Details best practices for stale-while-revalidate data fetching.
- Enforces a strict architectural separation: Feature modules import only Domain and DesignSystem, while Data owns SwiftData implementation.
Example prompts
- "How should I structure my
@Modelentities to align with the clinic architecture?" - "Can you explain how to implement repository protocols using SwiftData in this skill's recommended approach?"
- "What are the best practices for setting up
ModelContextwithin a Data layer following these guidelines?"
Tips & gotchas
- This skill assumes familiarity with the clinic modular MVVM-C architecture. Ensure your project is structured accordingly before applying its guidance.
SwiftDatatypes (@Model,ModelContext,@Query) are strictly confined to Data layer implementations; avoid importing them into Feature or Domain modules.- The skill emphasizes a direct ViewModel call to repository protocols, bypassing default use-case/interactor layers.