Agent skill

Swiftdata Inheritance

by gustavscirulis in gustavscirulis/snapgrid

SwiftData class inheritance patterns for hierarchical models with type-based querying, polymorphic relationships, and when to choose inheritance vs enums.

Custom licenceAuto-check passed

Install Swiftdata Inheritance

skills CLI
$ npx skills add gustavscirulis/snapgrid --skill swiftdata-inheritance -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gustavscirulis/snapgrid swiftdata-inheritance --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/gustavscirulis/snapgrid.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/skills/swiftdata/inheritance .claude/skills/swiftdata-inheritance && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
swiftdata-inheritance
GitHub stars
117
Used in
1 other repo
Token cost
~2.7k tokens
SKILL.md length
655 words
Files
1
Skills in repo
118
Repo updated
First seen
Licence
Custom licence

At a glance

SwiftData class inheritance patterns for hierarchical models with type-based querying, polymorphic relationships, and when to choose inheritance vs enums.

  • Works in 5 steps: Missing @Model on Subclass → Deep Hierarchies → Using Inheritance When an Enum Would… → …
  • Designing SwiftData model hierarchies
  • SKILL.md covers When This Skill Activates, Decision Tree, API Patterns and Querying Hierarchies, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Swiftdata Inheritance is an agent skill from gustavscirulis/snapgrid. SwiftData class inheritance patterns for hierarchical models with type-based querying, polymorphic relationships, and when to choose inheritance vs enums. Use when designing SwiftData model hierarchies.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: SnapGrid is an open-source Mac app for collecting, organizing, and analyzing UI screenshots. It uses AI to automatically detect UI components and patterns, making it a powerful…

When your agent uses it

  • Designing SwiftData model hierarchies

Example prompts

  • “/swiftdata-inheritance”

Requirements

  • Pre-approved tools (allowed-tools): Read, Glob, Grep

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Missing @Model on Subclass
  2. Deep Hierarchies
  3. Using Inheritance When an Enum Would Suffice
  4. Forgetting super.init()
  5. Registering Subclasses Separately in ModelContainer

What it can do on your machine

Read from SKILL.md and the folder at commit eb7eaf4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Glob
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are swift).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • developer.apple.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Swiftdata Inheritance loads about 2.7k tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 655 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~56
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 655 words (~2,734 tokens).

“Guide for implementing class inheritance in SwiftData models. Covers when to use inheritance versus enums or protocols, how to annotate subclasses, query across hierarchies, and avoid common pitfalls with schema migrations and relationship modeling.”

— opening of SKILL.md by gustavscirulis, Custom licence
name
swiftdata-inheritance
allowed-tools
Read, Glob, Grep

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .claude/skills/skills/swiftdata/inheritance of gustavscirulis/snapgrid.

Open the folder on GitHubat commit eb7eaf4

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in gustavscirulis/snapgrid, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Swiftdata Inheritance next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Swiftdata Inheritance compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Swiftdata Inheritance this skillgustavscirulis/snapgrid1171 repos~2.7kAutomated safety check: PassCustom licence
Agent Hierarchical Coordinatorruvnet/ruflo74k2 repos~2.8kAutomated safety check: PassMIT
Swiftdatadpearson2699/swift-ios-skills1.2k—~3.9kAutomated safety check: PassCustom licence
Tabler Class Reference Tablestabler/tabler42k—~1.4kAutomated safety check: PassMIT
Inherit Legacy Styleaffaan-m/ECC276k1 repos~2.1kAutomated safety check: NotesMIT
Large Class Stylesgl-project/sglang37k2 repos~1.9kAutomated safety check: PassApache-2.0

Similar skills

  • Agent skill for hierarchical-coordinator - invoke with $agent-hierarchical-coordinator

    74k GitHub starsUsed in 2 repos~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Swiftdata

    dpearson2699/swift-ios-skills

    Implement, review, or improve data persistence using SwiftData.

    1.2k GitHub stars~3.9k tokensUpdated 2 mo ago
    MobileAuto-check passed
  • Writes or updates the classnames front matter that renders the class table at the end of a Tabler component docs page.

    42k GitHub stars~1.4k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Prevent AI style drift on legacy projects by scanning the codebase for implicit conventions, resolving conflicts with the operator one at a time, and writing an enforceable .ai-style-rules.md…

    276k GitHub starsUsed in 1 repo~2.1k tokens
    Agent WorkflowsAuto-check: notes
  • Large Class Style

    sgl-project/sglang

    Code style for SGLang large classes Scheduler, TokenizerManager, and ModelRunner: frozen-code conventions and init orchestration style.

    37k GitHub starsUsed in 2 repos~1.9k tokens
    AI & LLM EngineeringAuto-check passed
  • How to treat conclusions inherited from an earlier session — handover notes, prepared comments, verdict files, plans.

    4.7k GitHub stars~669 tokensUpdated today
    DevOps & CloudAuto-check passed

More from gustavscirulis/snapgrid

All 118 skills in this repo
  • Interaction Design

    gustavscirulis/snapgrid

    Design and implement microinteractions, motion design, transitions, and user feedback patterns.

    117 GitHub starsUsed in 3 repos~2k tokens
    Auto-check passed
  • Account Deletion

    gustavscirulis/snapgrid

    Generates an Apple-compliant account deletion flow with multi-step confirmation UI, optional data export, configurable grace period, Keychain cleanup, and server-side deletion request.

    117 GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check: notes
  • Alarmkit

    gustavscirulis/snapgrid

    AlarmKit integration for scheduling alarms and timers with custom UI, Live Activities, and snooze support.

    117 GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Analytics Interpretation

    gustavscirulis/snapgrid

    Interpret app metrics and make data-driven decisions. An agent skill from gustavscirulis/snapgrid.

    117 GitHub starsUsed in 1 repo~4.1k tokens
    Auto-check passed
  • Analytics Setup

    gustavscirulis/snapgrid

    Generates protocol-based analytics infrastructure with swappable providers (TelemetryDeck, Firebase, Mixpanel).

    117 GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check: notes
  • Announcement Banner

    gustavscirulis/snapgrid

    Generates an in-app announcement banner system with remote configuration, scheduling, deep link actions, and dismiss tracking.

    117 GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check: notes

Questions about Swiftdata Inheritance

What does Swiftdata Inheritance do?

SwiftData class inheritance patterns for hierarchical models with type-based querying, polymorphic relationships, and when to choose inheritance vs enums. Swiftdata Inheritance is an agent skill from gustavscirulis/snapgrid. SwiftData class inheritance patterns for hierarchical models with type-based querying, polymorphic relationships, and when to choose inheritance vs enums.

When should I use Swiftdata Inheritance?

Swiftdata Inheritance fits situations like: designing SwiftData model hierarchies.

How do I install Swiftdata Inheritance in Claude Code?

Run `npx skills add gustavscirulis/snapgrid --skill swiftdata-inheritance -a claude-code`. Or copy the skill folder (.claude/skills/skills/swiftdata/inheritance in gustavscirulis/snapgrid) into .claude/skills/swiftdata-inheritance in your project. Claude Code loads it when a task matches its description.

How do I install Swiftdata Inheritance in Codex?

Run `npx skills add gustavscirulis/snapgrid --skill swiftdata-inheritance -a codex`. Or copy the skill folder (.claude/skills/skills/swiftdata/inheritance in gustavscirulis/snapgrid) into .agents/skills/swiftdata-inheritance in your project. Codex loads it when a task matches its description.

Can I use Swiftdata Inheritance in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gustavscirulis/snapgrid --skill swiftdata-inheritance -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/swiftdata-inheritance, .gemini/skills/swiftdata-inheritance, .github/skills/swiftdata-inheritance and .opencode/skills/swiftdata-inheritance in your project.

What does Swiftdata Inheritance need to run?

SKILL.md names no scripts, command-line tools or credentials: Swiftdata Inheritance is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Glob, Grep.

Does Swiftdata Inheritance access the network?

SKILL.md names 1 domain. As links in the text: developer.apple.com. This is read from the text; nothing was executed.

Is Swiftdata Inheritance safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Swiftdata Inheritance use?

Swiftdata Inheritance has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Swiftdata Inheritance use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Swiftdata Inheritance?

Skills that share tags, products or a category with Swiftdata Inheritance: Agent Hierarchical Coordinator (ruvnet/ruflo, 74k stars), Swiftdata (dpearson2699/swift-ios-skills, 1.2k stars), Tabler Class Reference Tables (tabler/tabler, 42k stars) and Inherit Legacy Style (affaan-m/ECC, 276k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Swiftdata Inheritance?

gustavscirulis (a GitHub user) maintains it in gustavscirulis/snapgrid, which has 117 GitHub stars. The repository holds 118 skills in this directory. The repository was last updated on April 30, 2026.

Source: gustavscirulis/snapgrid on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.