swiftdata

swiftdata is a skill for Claude Code, Codex from The-Artificer-of-Ciphers-LLC/skills-from-the-artificer. It costs 106 tokens per session (3,496 once invoked), scanned A, original, MIT.

A guide for storing, querying, and syncing structured data in iOS apps with SwiftData, Apple's persistence framework. It covers data models, relationships, migrations, and background access.

In plain words
What is it for?
Use it to define SwiftData models, configure storage, write queries, add CloudKit sync, migrate schemas, and review persistence code.
Why use it?
It helps avoid common errors when saving app data, changing its structure, or using it from SwiftUI and background code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to define SwiftData models, configure storage, write queries, add CloudKit sync, migrate schemas, and review persistence code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/the-artificer-of-ciphers-llc/skills-from-the-artificer/swiftdata
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add The-Artificer-of-Ciphers-LLC/skills-from-the-artificer --skill swiftdata
Clone the repo
git clone --depth 1 https://github.com/The-Artificer-of-Ciphers-LLC/skills-from-the-artificer

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for swiftdata

README.md
[![agentmods](https://agentmods.dev/badge/skills/the-artificer-of-ciphers-llc/skills-from-the-artificer/swiftdata/github.svg)](https://agentmods.dev/skills/the-artificer-of-ciphers-llc/skills-from-the-artificer/swiftdata)
Your own site
<a href="https://agentmods.dev/skills/the-artificer-of-ciphers-llc/skills-from-the-artificer/swiftdata"><img src="https://agentmods.dev/badge/skills/the-artificer-of-ciphers-llc/skills-from-the-artificer/swiftdata/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for swiftdata

Your own site · 80×15
<a href="https://agentmods.dev/skills/the-artificer-of-ciphers-llc/skills-from-the-artificer/swiftdata"><img src="https://agentmods.dev/badge/skills/the-artificer-of-ciphers-llc/skills-from-the-artificer/swiftdata.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,496 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00106 $0.03496
Opus 5.5 $0.00042 $0.01398
Sonnet 5.5 $0.00021 $0.00699
Haiku 4.5 $0.00011 $0.00350

Measured 9d ago against content hash 396a896951aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

swiftdata scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

let trips = try modelContext.fetch(FetchDescriptor<Trip>(
swiftdata/SKILL.md · 356 lines

How it starts

The opening of the file, as written. The whole thing — 356 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SwiftData

Persist, query, and manage structured data in iOS 26+ apps using SwiftData with Swift 6.3.

Contents

Model Definition

Apply @Model to a class (not struct). Generates PersistentModel, Observable, Sendable.

@Model
class Trip {
    var name: String
    var destination: String
    var startDate: Date
    var endDate: Date
    var isFavorite: Bool = false
    @Attribute(.externalStorage) var imageData: Data?
    @Relationship(deleteRule: .cascade, inverse: \LivingAccommodation.trip)
    var accommodation: LivingAccommodation?
    @Transient var isSelected: Bool = false  // Always provide default

    init(name: String, destination: String, startDate: Date, endDate: Date) {
        self.name = name; self.destination = destination
        self.startDate = startDate; self.endDate = endDate
    }
}

@Attribute options: .externalStorage, .unique, .spotlight, .allowsCloudEncryption, .preserveValueOnDeletion (iOS 18+), .ephemeral, .transformable(by:). Rename: @Attribute(originalName: "old_name").

@Relationship: deleteRule: .cascade/.nullify(default)/.deny/.noAction. Specify inverse: for reliable behavior. Unidirectional (iOS 18+): inverse: nil.

#Unique (iOS 18+): #Unique<Person>([\.firstName, \.lastName]) -- compound uniqueness.

Inheritance (iOS 26+): @Model class BusinessTrip: Trip { var company: String }.

Supported types: Bool, Int/UInt variants, Float, Double, String, Date, Data, URL, UUID, Decimal, Array, Dictionary, Set, Codable enums, Codable structs and other compatible Codable value types, and relationships to @Model classes.

Read the full file on GitHub · 356 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 356 lines · 106 tokens per session scan A 396a896951aa

Subscribe to this mod's changes

swiftdata is a skill published in the GitHub repository The-Artificer-of-Ciphers-LLC/skills-from-the-artificer (6 stars, last pushed 7d ago), licensed MIT. It adds 106 tokens to every session and 3,496 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-15.

Related

Other skills, from other repositories

offensive-mobile

Mobile (Android + iOS) application penetration testing methodology. Covers static analysis (apktool/jadx for Android, class-dump/Hopper/IDA for iOS), dynamic instrumentation with Frida and Objection, SSL pinning bypass strategies, root/jailbreak detection bypass, deep-link / URL-scheme abuse, exported component…

SnailSploit/Claude-Red · 185 tokens

offensive-sqli

SQL injection testing skill for offensive security assessments and bug bounty hunting. Covers error-based, UNION-based, boolean/time-based blind, out-of-band, second-order, NoSQL, GraphQL, WebSocket, and JSON-operator SQLi. Includes WAF bypass techniques, database-specific exploitation (MySQL, MSSQL, PostgreSQL…

SnailSploit/Claude-Red · 117 tokens

sqlite-to-fast-sql

Migrates SQLite and SQL-style Capacitor storage (@capacitor-community/sqlite, cordova-sqlite-storage, @ionic/storage with a SQLite driver, TypeORM/Drizzle/Kysely capacitor drivers, and other bridge-based SQL plugins) to @capgo/capacitor-fast-sql. Use when replacing createConnection/open/query/run/executeSet calls…

Cap-go/capgo-skills · 206 tokens

android-dev

Production-grade Android app development guide covering native (Kotlin/Java), cross-platform (Flutter, RN, KMM), and hybrid architectures.

lingxling/awesome-skills-cn · 31 tokens

datarobot-connectivity-datastore-sql

Query, explore, and update databases through existing DataRobot data connections (datastores) with the connection's stored credentials: no connection strings, no app scaffolding. Use when the user wants to list DataRobot data connections, browse schemas, tables, or columns, preview a table, or run a SQL SELECT against…

datarobot-oss/datarobot-agent-skills · 190 tokens

datarobot-connectivity-jdbc-sql

Run SQL against a database through DataRobot with a JDBC URL (or host, port, and database) and credentials you supply; no DataRobot data connection needed. Also use it to point an existing app such as Talk to My Data at DataRobot's low-latency /jdbcDataPreview/ route (/jdbcExecution/ only for user-approved writes).…

datarobot-oss/datarobot-agent-skills · 181 tokens