Skip to content
Back to search

swiftdata-agent-skill

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

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/twostraws-swiftdata-agent-skill/badge.svg)](/listings/twostraws-swiftdata-agent-skill)

HTML

<a href="/listings/twostraws-swiftdata-agent-skill"><img src="/api/listings/twostraws-swiftdata-agent-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Claude Code

Add the SwiftData Pro Skill marketplace, then install the plugin:

/plugin marketplace add twostraws/SwiftData-Agent-Skill
/plugin install swiftdata-pro@swiftdata-agent-skill

Codex, Gemini, Cursor, and others

You can install this skill into Claude Code, Codex, Gemini, Cursor, and more by using `npx`:

npx skills add https://github.com/twostraws/swiftdata-agent-skill --skill swiftdata-pro

If you get the error `npx: command not found`, it means you don’t currently have Node installed. You need to run this command to install Node through Homebrew:

brew install node

And if *that* fails it usually means you need to [install Homebrew](https://brew.sh) first.

When using `npx`, you can select exactly which agents you want to use during the installation. You can also select whether the skill should be installed just for one project, or whether it should be made available for all your projects.

Alternatively, you can clone this whole repository and install it however you want.

If you're using Xcode, watch the YouTube video on [How to Install and Use Agent Skills in Xcode](https://www.youtube.com/watch?v=nKVZBKoB6P4) for a walkthrough.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 21 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "name": "swiftdata-agent-skill",
  3. "owner": { "name": "Paul Hudson" },
  4. "metadata": {
  5. "description": "Agent skills for SwiftData usage on Apple platforms",
  6. "version": "1.0.0"
  7. },
  8. "plugins": [
  9. {
  10. "name": "swiftdata-pro",
  11. "source": "./swiftdata-pro",
  12. "description": "Reviews Swift code for best practices using SwiftData persistence.",
  13. "version": "1.0.0",
  14. "author": { "name": "Paul Hudson" },
  15. "homepage": "https://github.com/twostraws/SwiftData-Agent-Skill",
  16. "repository": "https://github.com/twostraws/SwiftData-Agent-Skill",
  17. "license": "MIT",
  18. "keywords": ["swiftdata", "swift", "ios", "apple", "code-review"]
  19. }
  20. ]
  21. }
README.md · README · 114 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <p align="center">
  2. <img src="assets/logo.svg" alt="SwiftData Pro - Agent Skill for Claude Code, Codex, and Gemini" height="100" />
  3. </p>
  4. <h1 align="center">SwiftData Agent Skill for AI Coding Assistants</h1>
  5. <p align="center">
  6. <img src="https://img.shields.io/badge/iOS-26+-2980b9.svg" alt="Designed for iOS 26 and later." />
  7. <img src="https://img.shields.io/badge/swift-6.2+-8e44ad.svg" alt="Designed for Swift 6.2 and later." />
  8. <a href="https://twitter.com/twostraws">
  9. <img src="https://img.shields.io/badge/Contact-@twostraws-95a5a6.svg?style=flat" alt="Twitter: @twostraws" />
  10. </a>
  11. </p>
  12. An agent skill that helps AI coding assistants like Claude Code, Codex, Cursor, and Gemini write better SwiftData code. Covers `@Model`, `@Query`, predicates, indexes, migrations, relationships, iCloud sync, and more, targeting the mistakes LLMs actually make.
  13. Also available:
  14. - [SwiftUI Pro](https://github.com/twostraws/SwiftUI-Agent-Skill)
  15. - [Swift Concurrency Pro](https://github.com/twostraws/Swift-Concurrency-Agent-Skill)
  16. - [Swift Testing Pro](https://github.com/twostraws/Swift-Testing-Agent-Skill)
  17. Find more agent skills for Swift and Apple platform development at [Swift Agent Skills](https://github.com/twostraws/Swift-Agent-Skills).
  18. ## Installing SwiftData Pro
  19. ### Claude Code
  20. Add the SwiftData Pro Skill marketplace, then install the plugin:
  21. ```
  22. /plugin marketplace add twostraws/SwiftData-Agent-Skill
  23. /plugin install swiftdata-pro@swiftdata-agent-skill
  24. ```
  25. ### Codex, Gemini, Cursor, and others
  26. You can install this skill into Claude Code, Codex, Gemini, Cursor, and more by using `npx`:
  27. ```bash
  28. npx skills add https://github.com/twostraws/swiftdata-agent-skill --skill swiftdata-pro
  29. ```
  30. If you get the error `npx: command not found`, it means you don’t currently have Node installed. You need to run this command to install Node through Homebrew:
  31. ```bash
  32. brew install node
  33. ```
  34. And if *that* fails it usually means you need to [install Homebrew](https://brew.sh) first.
  35. When using `npx`, you can select exactly which agents you want to use during the installation. You can also select whether the skill should be installed just for one project, or whether it should be made available for all your projects.
  36. Alternatively, you can clone this whole repository and install it however you want.
  37. If you're using Xcode, watch the YouTube video on [How to Install and Use Agent Skills in Xcode](https://www.youtube.com/watch?v=nKVZBKoB6P4) for a walkthrough.
  38. ## Using SwiftData Pro
  39. The skill is called SwiftData Pro, and can be triggered in various ways. For example, in Claude Code you would use this:
  40. > /swiftdata-pro
  41. And in Codex you would use this:
  42. > $swiftdata-pro
  43. In both cases you can provide specific instructions if you want only a partial review. For example, `/swiftdata-pro Check my code for latest API usage` on Claude, or `$swiftdata-pro Check where indexes should be added to my SwiftData models` in Codex.
  44. You can also trigger the skill using natural language:
  45. > Use the SwiftData Pro skill to enable iCloud support in this project.
  46. ## Why Use an Agent Skill for SwiftData?
  47. I wrote a [book on SwiftData](https://www.hackingwithswift.com/quick-start/swiftdata), and update it regularly as new features are added, so I’ve made it my business to understand the ins and outs of SwiftData.
  48. This skill is the result of all that work. The rules contained here directly target common SwiftData mistakes made by LLMs, covering new features they aren’t trained on, older features they frequently make mistakes with, and patterns that help keep your code correct and efficient.
  49. What this is *not* is just a dumping ground for all SwiftData advice ever. Agents already have a solid grounding of the fundamentals of SwiftData, so skills that do little more than reteach them what they already know are just burning tokens.
  50. *This skill focuses on what actually has an impact.*
  51. ## Contributing
  52. I welcome all contributions, whether that's adding new checks, improving existing checks, or editing this README – everyone is welcome!
  53. - Keep your Markdown concise. There is a token cost to using skills, particularly with SKILL.md, so please respect the token budgets of users.
  54. - Do not repeat things that LLMs already know, because it burns tokens for no benefit. Focus on edge cases, surprises, soft deprecations, and similar.
  55. - All work must be licensed under the MIT license so it can benefit the most people.
  56. Please ensure you abide by the [Code of Conduct](CODE_OF_CONDUCT.md).
  57. ## License
  58. SwiftData Pro was originally created by [Paul Hudson](https://twitter.com/twostraws), who writes [free Swift tutorials over at Hacking with Swift](https://www.hackingwithswift.com). It’s available under the [MIT License](LICENSE), which permits commercial use, modification, distribution, and private use.
  59. <p align="center">
  60. <a href="https://www.hackingwithswift.com/plus">
  61. <img src="https://www.hackingwithswift.com/img/hws-plus-banner@2x.jpg" alt="Hacking with Swift+ logo" style="max-width: 100%;" /></a>
  62. </p>
  63. <p align="center">&nbsp;</p>
  64. <p align="center">
  65. <a href="https://www.hackingwithswift.com"><img src="https://www.hackingwithswift.com/img/hws-button@2x.png" alt="Hacking with Swift logo" width="66" height="75" /></a><br />
  66. A Hacking with Swift Project
  67. </p>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.