SwiftData Pro skill for Claude: review and write SwiftData code
Makes Claude write and review SwiftData code against Paul Hudson's rules, aimed at the mistakes AI assistants often make.
- Installs
- 9.5K
- on skills.sh
- Stars
- 458
- on GitHub
- Files
- 8
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
Ask Claude to review your project and it checks the code against five reference files: core rules, predicates, CloudKit, indexing (iOS 18+) and class inheritance (iOS 26+). It reports only real problems, grouped by file, each with the rule broken and a before and after fix.
Ask it to write or improve code and it follows the same rules but makes the changes directly. SKILL.md targets Swift 6.2 or later and says to prefer SwiftData over Core Data. The folder bundles no scripts.
Good for
- iOS and macOS developers who use SwiftData with an AI assistant
- Teams reviewing @Model, @Query and predicate code
- Projects that use CloudKit sync, indexes or model subclasses
Install swiftdata-pro
Claude Code
- 1
Copy this prompt.
Install the swiftdata-pro skill in Claude Code. Run this command: /plugin marketplace add twostraws/SwiftData-Agent-Skill /plugin install swiftdata-pro@swiftdata-agent-skill Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Pick one route. The plugin route (Claude Code) and the skills CLI route both come from the README. The skills CLI needs Node.js; the README suggests brew install node if npx is missing. Choose which agents and whether to install per project or for all projects when the installer asks.
From the project README. Source.
What's in the skill
When it loads
Writes, reviews, and improves SwiftData code using modern APIs and best practices. Use when reading, writing, or reviewing projects that use SwiftData.
Sections in SKILL.md
- Core Instructions
- Output Format
- Destination.swift
- DestinationListView.swift
- Summary
- References
Key facts
- License
- MIT
- Installs on skills.sh
- 9,455 (Nov 2, 2026)
- Last repo commit
- Oct 19, 2026
- Audits on skills.sh
- Gen Agent Trust Hub: pass, Socket: pass, Snyk: pass
What it includes
Autosave, relationships, delete rules, property limits
references/core-rules.md covers autosaving, relationships, delete rules, property restrictions and FetchDescriptor optimization. Example rule: place @Relationship on one side only.
Try: “Use SwiftData Pro to review my project.”
Read ·
Core rulesSupported operations and ones that crash
references/predicates.md lists supported predicate operations, dangerous patterns that crash at runtime and unsupported methods, for example String.hasSuffix().
Read ·
PredicatesConstraints when the project syncs with iCloud
references/cloudkit.md: no @Attribute(.unique) or #Unique, defaults or optionals on every property, and optional relationships.
Try: “Use the SwiftData Pro skill to enable iCloud support in this project.”
Read ·
CloudKitWhere single and compound indexes help
Checked only when the project targets iOS 18 or later.
Read ·
Indexing (iOS 18+)Model subclassing, schema setup and predicates
Checked only when the project targets iOS 26 or later.
Read ·
Class inheritance (iOS 26+)Findings by file with rule and before/after fix
For each issue: file and lines, the rule broken, a short before and after. Files with no issues are skipped, and a prioritized summary comes last.
Read ·
Review outputEdits your SwiftData code directly
When you ask Claude to write or improve code instead of reviewing, SKILL.md says to make the changes directly rather than return a report.
Write ·
Write or improve mode
From the official docs
Permissions
Low risk
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
Write mode changes your files directly
SKILL.md says that when you ask it to write or improve code it makes the changes directly. Commit first, or ask for a review report only. github.com
Security advisories
No published security advisories as of Nov 2, 2026.
Technical details
| Turning on read-only | No read-only mode. Review requests return a findings report; write or improve requests make changes. |
|---|---|
| Sign-in and keys | No key or account. |
| Scopes |
|
Questions
What does SwiftData Pro do?
It makes Claude write and review SwiftData code using Paul Hudson's rules. It covers @Model, @Query, predicates, relationships, indexes, CloudKit and model inheritance, and reports only genuine problems.
How do I install it?
Use the install box at the top of this page. The README gives a plugin command for Claude Code and a skills CLI command for Codex, Gemini, Cursor and others.
How do I run it?
In Claude Code type /swiftdata-pro, optionally with an instruction such as "Check my code for latest API usage". In Codex use $swiftdata-pro. You can also say "Use the SwiftData Pro skill" in plain language.
Which iOS versions does it assume?
It targets Swift 6.2 or later. Indexing checks apply when the project targets iOS 18 or later and class inheritance checks apply for iOS 26 or later.
Will it change my code?
If you ask for a review, it returns findings by file. If you ask it to write or improve code, SKILL.md says it makes the changes directly. Commit first.
Is it safe?
The folder holds Markdown, a YAML file and two icon files, with no scripts. In write mode it edits your code, so keep your work committed and read the diff.
Why not just use Core Data?
SKILL.md says the user strongly prefers SwiftData and tells Claude not to suggest Core Data unless a feature cannot be solved with SwiftData.
Information
updated Nov 2, 2026
- Repository
- twostraws/swiftdata-agent-skill
- Folder
swiftdata-pro
Sources
Docs, issue trackers and discussions this page is built from.
Show all 8Hide
- swiftdata-pro SKILL.md · github.com
- SwiftData Agent Skill README · github.com
- swiftdata-agent-skill marketplace.json · github.com
- core-rules.md · github.com
- predicates.md · github.com
- cloudkit.md · github.com
- indexing.md · github.com
- class-inheritance.md · github.com