swiftdata · prisma-labs-dev — Claude Code skill: SwiftData API reference
A reference skill for SwiftData. The agent searches four markdown files for answers on @Model, ModelContext, @Query and schema migrations.
npx skills add Prisma-Labs-Dev/apple-skills --skill swiftdata -a claude-codeWhat swiftdata does
The skill is user-invocable and runs in a forked context: it spins up an Explore subagent and hands it the doc search. Answers come back in two parts — a short summary plus the file paths holding the details. For @Model that is swiftdata-model.md, for @Query it is swiftdata-query.md.
Four files ship with it. swiftdata-index.md covers the framework overview and the API list, swiftdata-model.md the @Model macro, swiftdata-modelcontext.md CRUD through ModelContext, and swiftdata-query.md the @Query property wrapper. There is no dedicated file for schema migrations even though the description mentions them, so those questions land on the general material.
Worth installing if you write Swift and keep tabbing over to Apple's docs. Nothing beyond the markdown files gets pulled in.
What it helps with
- find how to declare a model with @Model
- recall the ModelContext methods for insert and delete
- work out how @Query filters and sorts a fetch
- get the file list with details on a specific API
Example prompts for the agent
- show me how to declare a model with @Model and a one-to-many relation
- how do I insert and delete an object through ModelContext?
- what does @Query do and how do I give it a predicate
How to install swiftdata
1Skills CLI (Vercel)
npx skills add Prisma-Labs-Dev/apple-skills --skill swiftdata -a claude-code2Manually: put the files in place
~/.claude/skills/swiftdata/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/swiftdata/
1Skills CLI (Vercel)
npx skills add Prisma-Labs-Dev/apple-skills --skill swiftdata -a codex2Manually: put the files in place
.agents/skills/swiftdata/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Prisma-Labs-Dev/apple-skills --skill swiftdata -a cursor2Manually: put the files in place
.cursor/skills/swiftdata/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Prisma-Labs-Dev/apple-skills swiftdata2Manually: put the files in place
.github/skills/swiftdata/SKILL.md1Skills CLI (Vercel)
npx skills add Prisma-Labs-Dev/apple-skills --skill swiftdata -a gemini-cli2Platform CLI
gemini skills install https://github.com/Prisma-Labs-Dev/apple-skills --path skills/swiftdataManually: put the files in place
.devin/skills/swiftdata/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Prisma-Labs-Dev/apple-skills --skill swiftdata -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about swiftdata
How do I install swiftdata in Claude?
Run npx skills add Prisma-Labs-Dev/apple-skills --skill swiftdata -a claude-code. The skill file lands at ~/.claude/skills/swiftdata/SKILL.md.
What does the swiftdata skill do?
It searches the bundled docs for SwiftData API answers. You get a concise summary and the paths to the files with the full detail.
What does the skill need to run?
It calls the Explore subagent, so you need Claude with subagent support. The files themselves are plain markdown with no dependencies.
Source text
SKILL.md · MIT
--- name: swiftdata user-invocable: true description: "API reference: SwiftData. Query for @Model, ModelContext, @Query, schema migrations." context: fork agent: Explore --- # SwiftData Documentation Search these docs to answer questions about SwiftData APIs. ## Return Format Always include: 1. **Summary** - Answer the question concisely 2. **File paths** - List relevant files for full details, e.g.: - `swiftdata-model.md` for @Model macro - `swiftdata-query.md` for @Query usage ## Files - `swiftdata-index.md` - Framework overview and all available APIs - `swiftdata-model.md` - @Model macro and model definition - `swiftdata-modelcontext.md` - ModelContext for CRUD operations - `swiftdata-query.md` - @Query property wrapper for fetching data
© Prisma-Labs-Dev · MIT · Prisma-Labs-Dev/apple-skills
Similar skills
Everything for Mobile →swiftdata by other authors comes first.