Skip to content

Swift data-layer skill for SwiftData repositories, stale-while-revalidate reads, and optimistic queued writes in MVVM-C apps.

CCM score
48 of 100
skills.sh installs
279
GitHub stars
228
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers @Model entities, repository implementations, sync and retry behavior, and SwiftUI integration within the Data layer
  • Provides a priority-ranked rule set spanning data modeling, persistence setup, querying, CRUD, sync, relationships, state flow, schema migration, and previews
  • Enforces that SwiftData types stay inside Data-only boundaries, with feature Views and ViewModels depending only on Domain protocols
  • Designed for iOS 26 and Swift 6.2 clinic modular MVVM-C apps that use stale-while-revalidate reads and optimistic queued writes

Install

$ npx -y skills add pproenca/dot-skills --skill swift-data -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

SwiftData Best Practices — Modular MVVM-C Data Layer

Comprehensive data modeling, persistence, sync architecture, and error handling guide for SwiftData aligned with the clinic modular MVVM-C stack.

Architecture Alignment

This skill enforces the same modular architecture mandated by swift-ui-architect:

┌───────────────────────────────────────────────────────────────┐
│ Feature modules: View + ViewModel, no SwiftData imports       │
├───────────────────────────────────────────────────────────────┤
│ Domain: models + repository/coordinator/error protocols        │
├───────────────────────────────────────────────────────────────┤
│ Data: @Model entities, SwiftData stores, repository impls,     │
│ remote clients, retry executor, sync queue, conflict handling  │
└───────────────────────────────────────────────────────────────┘

Key principle: SwiftData types (@Model, ModelContext, @Query, FetchDescriptor) live in Data-only implementation code. Feature Views/ViewModels work with Domain types and protocol dependencies.

Clinic Architecture Contract (iOS 26 / Swift 6.2)

All guidance in this skill assumes the clinic modular MVVM-C architecture:

Details

Repository
github.com/pproenca/dot-skills
Categories
Mobile Apps, Databases
First seen
Jun 3, 2026

Questions

What does the swift-data skill do?

The swift-data skill gives guidance on SwiftData persistence and data-layer architecture for iOS 26 and Swift 6.2 apps built with a modular MVVM-C structure. It covers writing and refactoring @Model entities, repository implementations, stale-while-revalidate reads, optimistic queued writes, and sync and retry behavior. It also keeps SwiftData types inside Data-only boundaries so feature views and view models use domain types and protocols.

Who is the swift-data skill for?

It is for iOS developers building apps on iOS 26 and Swift 6.2 with a clinic modular MVVM-C architecture who need to design or review a SwiftData data layer. It suits anyone writing or refactoring persistence, sync, or SwiftUI integration in that setup.

How do I install the swift-data skill?

Run npx -y skills add pproenca/dot-skills --skill swift-data -y in your project to install it. Once installed, the agent can write, review, and refactor SwiftData entities, repositories, and sync code that keeps SwiftData types inside the Data layer.

Where does swift-data stand among other Mobile Apps skills?

swift-data sits in the Mobile Apps category on Claude Marketplaces, alongside vercel-react-native-skills, animate-expo, write-swift, firebase-crashlytics and xcode-project-setup. Its focus is narrow: SwiftData persistence, stale-while-revalidate reads and optimistic queued writes for modular MVVM-C iOS apps.

More from pproenca/dot-skills

All 100

Similar to Swift Data

More Mobile Apps