Swiftdata

This skill should be used when working with SwiftData — @Model definitions, @Query, @Relationship, ModelContext, ModelContainer, schema migration, Swift 6 concurrency, performance optimization, or architecture review. Also triggers on: "SwiftData audit", "@Model issues", "SwiftData crashes", "predicate problems", "background context patterns", "N+1 queries", "SwiftData vs SQLiteData vs GRDB", "CloudKit sync with SwiftData", "SwiftData migration fails", or "SwiftData migration diagnostics". Covers auditing existing code, writing new SwiftData code, migration debugging, and architecture review.

42 stars 2 forksAI, LLMs & Agents Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add robbyt/claude-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add robbyt/claude-skills --skill swiftdata
Manual install
git clone --depth 1 https://github.com/robbyt/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/plugins/swift/skills/swiftdata ~/.claude/skills/swiftdata

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# SwiftData — Architecture, Patterns, and Audit Guide

Swift 6 strict concurrency only. No Swift 5 patterns.

## Decision: SwiftData vs SQLiteData vs GRDB

| Need | Choose | Why |
|------|--------|-----|
| Simple local CRUD + SwiftUI | **SwiftData** | Native integration, @Query, automatic observation |
| Complex queries, JOINs, FTS | **GRDB** | Full SQL access, 11 years battle-tested |
| SwiftData ergonomics + SQL power | **SQLiteData** | @Table structs, @FetchAll, CloudKit sharing support |
| Cross-platform (Android/Linux) | **GRDB** or raw SQLite | No Apple framework dependency |
| CloudKit shared databases | **SQLiteData** or Core Data | SwiftData only supports private CloudKit databases |

SwiftData is viable for production IF the patterns in this guide are followed. Most "SwiftData is broken" complaints trace to bad data modeling or missing abstractions, not framework bugs.

## Core Rules (Non-Negotiable)

These five rules prevent the most common crashes and data corruption. Violating any one is a critical-severity finding. For detailed code examples, consult `references/core-rules.md`.

### 1. @Model must be final class — never struct

`@Model struct` compiles but crashes at runtime or silently corrupts data. Always use `@Model final class` (omit `final` only for class inheritance on iOS 26+).

### 2. Never pass @Model objects across actor boundaries
Read the full skill on GitHub

Details

Skill name
swiftdata
Path
plugins/swift/skills/swiftdata/SKILL.md
Repo updated
18 November 2026

FAQ

What does the Swiftdata skill do?

This skill should be used when working with SwiftData — @Model definitions, @Query, @Relationship, ModelContext, ModelContainer, schema migration, Swift 6 concurrency, performance optimization, or architecture review. Also triggers on: "SwiftData audit", "@Model issues", "SwiftData crashes", "predicate problems", "background context patterns", "N+1 queries", "SwiftData vs SQLiteData vs GRDB", "CloudKit sync with SwiftData", "SwiftData migration fails", or "SwiftData migration diagnostics". Covers auditing existing code, writing new SwiftData code, migration debugging, and architecture review.

How do I install the Swiftdata skill?

Claude Code plugin: /plugin marketplace add robbyt/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Swiftdata popular?

It lives in robbyt/claude-skills, which has 42 GitHub stars and 2 forks.

Related skills

Actions

42

robbyt/claude-skills

GitHub Actions workflow management using GitHub CLI. Trigger when user wants to check CI status ("check CI", "is the build passing"), view workflow runs ("show recent runs", "view action logs"), watch running workflows ("watch CI"), or rerun failed workflows ("rerun the build").

Productivity & Notes

Adversarial Review

42

robbyt/claude-skills

Have Codex try to break a change before it ships — a skeptical review that challenges the design, assumptions, and failure modes of a diff or branch and returns structured findings (verdict, severity, file:line, confidence). Trigger on "adversarial review", "challenge this change/design with Codex", "pressure-test this before I ship", "have Codex try to break this", "is this safe to merge", or a review focused on a risk area (auth, data loss, rollback, race conditions, retries). Do NOT use for a routine bug/style pass over a diff (that's diff-review), for critiquing a plan before code exists (

Software Development

API Review

42

robbyt/claude-skills

This skill should be used when reviewing API designs, auditing REST or gRPC endpoints, designing backend APIs, evaluating BFF architecture, or discussing API best practices. Also triggers on: "review this API", "API design review", "is this API correct", "REST API audit", "gRPC API review", "PATCH vs PUT", "etag", "idempotency", "pagination design", "API error handling", "backward compatibility", "BFF architecture", "resource-oriented design", "TOCTOU", "race condition", "optimistic concurrency", "field mask", "long-running operation", "custom method", "soft delete", "API naming conventions",

Software Development

Aba Plugin Updater

39

ShawhinT/non-coding-skills

Prepare a change to Shaw's aba-plugins marketplace repo (the public plugin clients install via /plugin install aba-skills@aba) as a handoff doc for Claude Code, which executes it natively in the repo. Use whenever he wants to edit, fix, or improve one of the plugin's skills (skill-helper, skill-updater, cost-optimizer), repackage dist/, validate the manifests, or land a commit there. Triggers: "update the plugin", "push a change to aba-plugins", "repackage dist", "cut a plugin release", "add this to the aba-skills plugin". Also fire whenever one of those three skill names comes up as something

AI, LLMs & Agents

Reflect

42

robbyt/claude-skills

Analyze recent conversation to identify improvements for CLAUDE.md memory files. Trigger when user says "reflect on this session", "reflect on this conversation", "reflect on this code", or "improve CLAUDE.md by reflecting on this session". The verb "reflect" combined with a session/conversation/code subject is the key trigger.

AI, LLMs & Agents

Claude Code Harness

13

dadwadw233/claude-code-harness

Design a real harness for an agentic system using Claude Code-inspired patterns. Use when the user needs a harness blueprint, request assembly design, execution loop, tool runtime, memory layering, permission model, transcript or recovery strategy, or wants to turn a vague agent idea into a harness-level architecture. Do not use for generic product brainstorming, simple prompt writing, or isolated code generation.

AI, LLMs & AgentsIn 1 list

Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.