Tooluck logoTooluck
SKILL.md

swiftdata

Agent skill fromrshankras/claude-code-apple-skills

SwiftData skills — class inheritance patterns for hierarchical models, type-based querying, polymorphic relationships, and inheritance-vs-enum decisions. Use when designing SwiftData model hierarchies.

How to install swiftdata

install swiftdata
# install the claude-code-apple-skills pack with the skills CLI
npx skills add rshankras/claude-code-apple-skills

# or add only this skill to Claude Code: copy the folder

skills/swiftdata/

# into

~/.claude/skills/swiftdata/ (all projects)

.claude/skills/swiftdata/ (one project)

skills/swiftdata/SKILL.md

MITFull file
1# SwiftData Skills
2
3SwiftData modeling patterns beyond the basics.
4
5## When This Skill Activates
6
7Use this skill when the user:
8- Designs **hierarchical SwiftData models** (class inheritance)
9- Needs **type-based or polymorphic queries**
10- Weighs **inheritance vs enum** for model variants
11
12## Available Skills
13
14Paths are relative to THIS file's directory — skills run with cwd set to the
15user's project, so resolve each path from this SKILL.md's own location.
16
17| Skill | Read | Covers |
18|-------|------|--------|
19| inheritance | `inheritance/SKILL.md` | Class inheritance, polymorphic relationships, type-based querying, inheritance-vs-enum |
20
21## How to Route
22
231. Read `inheritance/SKILL.md` (relative to this file) plus any reference files it lists.
242. Apply the guidance to the user's code. For broader macOS SwiftData architecture, see also `../macos/swiftdata-architecture/SKILL.md`.

Excerpt shown under the repository's MIT license.

More skills in claude-code-apple-skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates