Skip to content
alyn
rshankras

Swiftdata skill

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

$npx skills add rshankras/claude-code-apple-skills --skill swiftdata
View this skill on GitHubrshankras/claude-code-apple-skills/skills/swiftdata/SKILL.md
Pack stars
881
Pack installs
14k
Alyn Score
54/99
Updated
2 days ago
License
MIT
– views – installs via Alyn

rshankras

Swiftdata

Install Swiftdata

Pick your agent. Every command is ready to paste.

$npx skills add rshankras/claude-code-apple-skills --skill swiftdata

The open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.

01

Install it

Run the command above, or upload the folder in Claude.

02

Ask naturally

Describe the task. Your agent loads swiftdata when the request matches its description.

03

Name it if needed

If it does not trigger, say “use the swiftdata skill”. In Codex, type $swiftdata.

The skill itself

SKILL.md

FolderGitHub

SwiftData Skills

SwiftData modeling patterns beyond the basics.

When This Skill Activates

Use this skill when the user:

  • Designs hierarchical SwiftData models (class inheritance)
  • Needs type-based or polymorphic queries
  • Weighs inheritance vs enum for model variants

Available Skills

Paths are relative to THIS file's directory — skills run with cwd set to the user's project, so resolve each path from this SKILL.md's own location.

Skill Read Covers
inheritance inheritance/SKILL.md Class inheritance, polymorphic relationships, type-based querying, inheritance-vs-enum

How to Route

  1. Read inheritance/SKILL.md (relative to this file) plus any reference files it lists.
  2. Apply the guidance to the user's code. For broader macOS SwiftData architecture, see also ../macos/swiftdata-architecture/SKILL.md.

Tips for Swiftdata

  • • Start a fresh session after installing so your agent picks up the new skill.
  • • It is part of a pack with 30 skills. Install only the ones you need with --skill to keep triggers precise.
  • • If two skills overlap, mention the one you want by name.

Questions about Swiftdata

What does the Swiftdata skill do?

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 do I install Swiftdata?

Run "npx skills add rshankras/claude-code-apple-skills --skill swiftdata" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.

Does Swiftdata work in Cursor and Codex?

Yes. Swiftdata uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.

Is Swiftdata free?

Swiftdata is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.

Who made Swiftdata?

Swiftdata is published by rshankras in the rshankras/claude-code-apple-skills repository, together with 29 other skills.

Similar skills. From other creators.