swiftdata-models

Design SwiftData @Model classes with relationships, migrations, and queries.

5|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/nsnguyen/ios_app_rag_calendar --skill swiftdata-models
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftdata-models
Source: https://github.com/nsnguyen/ios_app_rag_calendar/tree/main/.claude/skills/swiftdata-models
Command: npx skills add https://github.com/nsnguyen/ios_app_rag_calendar --skill swiftdata-models

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a blueprint for modeling SwiftData @Model classes with relationships and queries for an iOS 18+ planner app, enabling robust data persistence and scalable schemas.

Core Features & Use Cases

  • Define @Model classes (MeetingRecord, Note, Person, EmbeddingRecord, Tag) with relationships and cascade rules.
  • Implement schema versioning and lightweight migrations to evolve the data model over app updates.
  • Outline common query patterns for fetching meetings, notes, and embeddings to support RAG workflows.

Quick Start

Use the swiftdata-models skill to outline and implement the SwiftData models and migrations described in SKILL.md.

Frequently Asked Questions about swiftdata-models

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design SwiftData models with relationships for an iOS planner app?

Design SwiftData models by defining @Model classes for entities like MeetingRecord, Note, and Person with explicit relationships and cascade rules to ensure robust data persistence for iOS 18+ planners.

What is the best way to handle SwiftData schema migrations over app updates?

Handle SwiftData schema migrations by implementing schema versioning and lightweight migration plans to evolve your data model safely over app updates without losing existing persisted data.

How do I set up query patterns for fetching SwiftData notes and embeddings?

Set up SwiftData query patterns by configuring fetch descriptors and predicates to retrieve notes and EmbeddingRecord objects, directly supporting retrieval workflows within your iOS application.

Does this SwiftData modeling approach support iOS 18 features and tags?

This approach supports iOS 18+ by defining SwiftData @Model classes including Tag entities with relationships, enabling scalable schemas and robust data persistence for modern planner applications.

Why do I need schema versioning when building SwiftData models?

Schema versioning is needed to track structural changes to SwiftData models, allowing the persistent store to execute lightweight migrations automatically when users update to new app versions.

swiftdata-models: can it define cascade rules for relationships between people and notes?

It defines SwiftData relationship cascade rules between models like Person and Note, ensuring that deleting a parent object appropriately removes or orphans associated child data.