axiom-swiftdata

axiom-swiftdata is a skill for Claude Code, Codex from ComeOnOliver/skillshub. It costs 56 tokens per session (7,194 once invoked), scanned A, original, MIT.

Guidance for using SwiftData, Apple's built-in system for storing app data, with SwiftUI, Apple's user-interface framework. It covers data models, queries, relationships, CloudKit synchronisation, and concurrency.

In plain words
What is it for?
Use it to define @Model classes, fetch data with @Query, manage ModelContext and relationships, connect CloudKit synchronisation, and handle Swift concurrency.
Why use it?
It helps developers choose and use SwiftData patterns for saving records, connecting related data, and keeping SwiftUI screens updated when stored data changes.

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 @Model classes, fetch data with @Query, manage ModelContext and relationships, connect CloudKit synchronisation, and handle Swift concurrency.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/comeonoliver/skillshub/axiom-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 ComeOnOliver/skillshub --skill axiom-swiftdata
Clone the repo
git clone --depth 1 https://github.com/ComeOnOliver/skillshub

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 axiom-swiftdata

README.md
[![agentmods](https://agentmods.dev/badge/skills/comeonoliver/skillshub/axiom-swiftdata/github.svg)](https://agentmods.dev/skills/comeonoliver/skillshub/axiom-swiftdata)
Your own site
<a href="https://agentmods.dev/skills/comeonoliver/skillshub/axiom-swiftdata"><img src="https://agentmods.dev/badge/skills/comeonoliver/skillshub/axiom-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 axiom-swiftdata

Your own site · 80×15
<a href="https://agentmods.dev/skills/comeonoliver/skillshub/axiom-swiftdata"><img src="https://agentmods.dev/badge/skills/comeonoliver/skillshub/axiom-swiftdata.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,194 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.00056 $0.07194
Opus 5 $0.00028 $0.03597
Sonnet 5 $0.00011 $0.01439
Haiku 4.5 $0.00006 $0.00719

Measured 7d ago against content hash b56a88e88b82, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

axiom-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 7d 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 rockTracks = try modelContext.fetch(descriptor)
skills/CharlesWiltgen/Axiom/axiom-swiftdata/SKILL.md · 1,111 lines

How it starts

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

SwiftData

Overview

Apple's native persistence framework using @Model classes and declarative queries. Built on Core Data, designed for SwiftUI.

Core principle Reference types (class) + @Model macro + declarative @Query for reactive SwiftUI integration.

Requires iOS 17+, Swift 5.9+ Target iOS 26+ (this skill focuses on latest features) License Proprietary (Apple)

When to Use SwiftData

Choose SwiftData when you need
  • ✅ Native Apple integration with SwiftUI
  • ✅ Simple CRUD operations
  • ✅ Automatic UI updates with @Query
  • ✅ CloudKit sync (iOS 17+)
  • ✅ Reference types (classes) with relationships
Use SQLiteData instead when
  • Need value types (structs)
  • CloudKit record sharing (not just sync)
  • Large datasets (50k+ records) with specific performance needs
Use GRDB when
  • Complex raw SQL required
  • Fine-grained migration control needed

For migrations See the axiom-swiftdata-migration skill for custom schema migrations with VersionedSchema and SchemaMigrationPlan. For migration debugging, see axiom-swiftdata-migration-diag.

Example Prompts

These are real questions developers ask that this skill is designed to answer:

Basic Operations
1. "I have a notes app with folders. I need to filter notes by folder and sort by last modified. How do I set up the @Query?"

→ The skill shows how to use @Query with predicates, sorting, and automatic view updates

2. "When a user deletes a task list, all tasks should auto-delete too. How do I set up the relationship?"

→ The skill explains @Relationship with deleteRule: .cascade and inverse relationships

3. "I have a relationship between User → Messages → Attachments. How do I prevent orphaned data when deleting?"

→ The skill shows cascading deletes, inverse relationships, and safe deletion patterns

CloudKit & Sync
4. "My chat app syncs messages to other devices via CloudKit. Sometimes messages conflict. How do I handle sync conflicts?"

→ The skill covers CloudKit integration, conflict resolution strategies (last-write-wins, custom resolution), and sync patterns

Read the full file on GitHub · 1,111 lines

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. 7d ago First seen · 1,111 lines · 56 tokens per session scan A b56a88e88b82

Subscribe to this mod's changes

axiom-swiftdata is a skill published in the GitHub repository ComeOnOliver/skillshub (63 stars, last pushed 2mo ago), licensed MIT. It adds 56 tokens to every session and 7,194 once invoked, about $0.0003 per session on Opus 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-09-03.