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.
npx skills add rshankras/claude-code-apple-skills --skill persistence-setupgit clone --depth 1 https://github.com/rshankras/claude-code-apple-skillsWrote 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.
[](https://agentmods.dev/skills/rshankras/claude-code-apple-skills/persistence-setup)<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/persistence-setup"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/persistence-setup/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.
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/persistence-setup"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/persistence-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00036 | $0.01841 |
| Opus 5.5 | $0.00014 | $0.00736 |
| Sonnet 5.5 | $0.00007 | $0.00368 |
| Haiku 4.5 | $0.00004 | $0.00184 |
Grade A, and why
persistence-setup 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 1mo 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.
func fetch(predicate: Predicate<T>?, sortBy: [SortDescriptor<T>]) async throws -> [T] How it starts
The opening of the file, as written. The whole thing — 305 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Persistence Setup Generator
Generates a production-ready persistence layer using SwiftData (iOS 17+) or CoreData with optional iCloud (CloudKit) sync.
When This Skill Activates
- User asks to "add persistence" or "set up data storage"
- User mentions "SwiftData", "CoreData", or "local storage"
- User wants to "sync data to iCloud" or "enable cloud sync"
- User asks about "offline storage" or "data models"
Pre-Generation Checks (CRITICAL)
1. Project Context Detection
Before generating, ALWAYS check:
# Check deployment target
cat Package.swift | grep -i "platform"
# Or check project.pbxproj
# Find existing persistence implementations
rg -l "ModelContainer|NSPersistentContainer|@Model|@Entity" --type swift
# Check for existing SwiftData models
rg "@Model" --type swift | head -5
# Check for CoreData stack
rg "NSManagedObjectContext|NSPersistentStore" --type swift | head -5
# Check existing entitlements for iCloud
cat *.entitlements 2>/dev/null | grep -i "icloud"
2. Framework Selection
Use SwiftData if:
- Deployment target is iOS 17+ / macOS 14+
- User explicitly requests SwiftData
- No existing CoreData implementation
Use CoreData if:
- Deployment target < iOS 17
- Existing CoreData stack present
- User explicitly requests CoreData
3. Conflict Detection
If existing persistence found:
- Ask: Extend existing, migrate to SwiftData, or create separate?
Configuration Questions
Ask user via AskUserQuestion:
-
Framework choice?
- SwiftData (iOS 17+, recommended)
- CoreData (older targets)
-
Enable iCloud sync?
- Yes (requires CloudKit entitlement)
- No (local only)
-
Generate example model?
- Yes (with sample Item model)
- No (just infrastructure)
Generation Process
Step 1: Create Core Files
Always generate:
Sources/Persistence/
├── PersistenceController.swift # Container setup
├── Repository.swift # Repository protocol
└── SwiftDataRepository.swift # Concrete implementation
What ships with it
7 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.
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.
- 1mo ago First seen · 305 lines · 36 tokens per session scan A 071b9656c622
persistence-setup is a skill published in the GitHub repository rshankras/claude-code-apple-skills (816 stars, last pushed 2mo ago), licensed MIT. It adds 36 tokens to every session and 1,841 once invoked, about $0.0001 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-09-03.
Other skills, from other repositories
core-data-pro
Use when working with Core Data — modeling entities, NSPersistentContainer setup, background contexts, fetch requests, batch operations, and migrations.
swiftdata-pro
Use when modeling data with SwiftData (@Model), writing @Query, configuring ModelContainer, performing migrations, or enabling CloudKit sync on iOS 17+.
swift-actor-persistence
Thread-safe data persistence in Swift using actors — in-memory cache with file-backed storage, eliminating data races by design.
android-development
Android development with Kotlin, Jetpack Compose, and modern Android architecture. Use when building Android apps, implementing Material Design, or following Android best practices.
ios-development
Comprehensive guide for building native Apple platform applications.
agent-flutter-developer
Specialist subagent: Flutter/Dart cross-platform development, Riverpod state management, and platform channels specialist. Use when building Flutter apps, implementing state management, or working with native platform features. Trigger phrases: Flutter, Dart, Riverpod, Bloc, widget, MaterialApp, GoRouter, platform…