Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Prisma-Labs-Dev/apple-skills --skill swiftdata -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/swiftdata/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/swiftdata/

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.

From the same set22

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor