twostraws/SwiftData-Agent-Skill

SwiftData agent skill for Claude Code, Codex, and other AI tools.

What it solves

AI coding assistants like Claude Code, Codex, Cursor, and Gemini often make mistakes when writing SwiftData code, especially with newer features they weren't trained on or with older APIs they frequently get wrong. This skill packages expert-level SwiftData knowledge into a set of rules that directly target those common mistakes, so the assistants produce more correct and efficient code without wasting tokens on basics they already know.

How it works

SwiftData Pro is an "agent skill" — a bundle of rules and guidance that you install into your AI coding assistant. Once installed, you trigger it with a command like /swiftdata-pro in Claude Code or $swiftdata-pro in Codex, or by asking in natural language. You can also give specific instructions, such as "check my code for latest API usage" or "check where indexes should be added to my SwiftData models." The skill covers topics like @Model, @Query, predicates, indexes, migrations, relationships, and iCloud sync, focusing on edge cases and pitfalls that LLMs tend to get wrong.

Who it's for

Developers who use AI coding assistants to write Swift or Apple platform code, particularly those working with SwiftData on iOS 26+ and Swift 6.2+. It's also useful for anyone who wants to install a pre-built, expert-curated skill rather than writing their own rules.

Highlights

  • Created by Paul Hudson, author of a book on SwiftData, so the rules come from deep, up-to-date expertise.
  • Targets the specific mistakes LLMs actually make, not generic advice — it avoids burning tokens on fundamentals.
  • Works with multiple assistants: Claude Code, Codex, Gemini, Cursor, and more.
  • Installable via plugin marketplace (Claude Code) or npx (most others), and you can choose per-project or global installation.
  • Open-source under the MIT license, with contributions welcome to add or improve checks.

Related

  • Project
  • Project
  • Project
  • Project