coredata-swiftdata-specialist

coredata-swiftdata-specialist is an agent for Claude Code from Desquared/agents-rules-skills. It costs 76 tokens per session (400 once invoked), scanned A, original, MIT.

A specialist for storing app data with Apple’s Core Data or SwiftData frameworks. It helps design data models, save and fetch records, handle migrations, and connect Core Data stores to CloudKit for syncing.

In plain words
What is it for?
Use it to model entities and relationships, plan lightweight or custom migrations, improve fetch performance, handle background work and errors, and troubleshoot CloudKit synchronization.
Why use it?
It reduces the risk of data loss, broken upgrades, slow queries, and sync conflicts. It first checks which storage system the project already uses before suggesting changes.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to model entities and relationships, plan lightweight or custom migrations, improve fetch performance, handle background work and errors, and troubleshoot CloudKit synchronization.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/desquared/agents-rules-skills/ios-coredata-swiftdata-specialist
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.

Clone the repo
git clone --depth 1 https://github.com/Desquared/agents-rules-skills

Made for: Claude Code.

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 coredata-swiftdata-specialist

README.md
[![agentmods](https://agentmods.dev/badge/agents/desquared/agents-rules-skills/ios-coredata-swiftdata-specialist/github.svg)](https://agentmods.dev/agents/desquared/agents-rules-skills/ios-coredata-swiftdata-specialist)
Your own site
<a href="https://agentmods.dev/agents/desquared/agents-rules-skills/ios-coredata-swiftdata-specialist"><img src="https://agentmods.dev/badge/agents/desquared/agents-rules-skills/ios-coredata-swiftdata-specialist/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 coredata-swiftdata-specialist

Your own site · 80×15
<a href="https://agentmods.dev/agents/desquared/agents-rules-skills/ios-coredata-swiftdata-specialist"><img src="https://agentmods.dev/badge/agents/desquared/agents-rules-skills/ios-coredata-swiftdata-specialist.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 400 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00076 $0.00400
Opus 5 $0.00038 $0.00200
Sonnet 5 $0.00015 $0.00080
Haiku 4.5 $0.00008 $0.00040

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

Security

Grade A, and why

coredata-swiftdata-specialist scanned grade A with 0 findings 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 10d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/ios-coredata-swiftdata-specialist.md · 49 lines

What it actually says

Focus Areas

  • Modeling: entities, relationships, delete rules, indexes, constraints
  • Migrations: lightweight vs custom, versioning strategy
  • Persistence: store config, background contexts, error handling
  • CloudKit: sync, schema, conflict handling
  • Performance: predicates, batch ops, indexing, fetch limits

Workflow

CRITICAL: Discover project setup first

  1. Check project for: SwiftData, Core Data, Realm Swift, UserDefaults, custom persistence
  2. Scan existing models/stores to infer patterns
  3. Ask user if unclear which persistence layer to use
  4. Assess risks: data loss, concurrency, performance, CloudKit/sync pitfalls
  5. Propose minimal, safe changes with migration strategy
  6. Provide implementation checklist

Best Practices

After discovering persistence stack:

  • SwiftData: Prefer for iOS 17+ new features
  • Core Data: Mature, CloudKit integration, iOS 13+ support
  • Realm Swift: Cross-platform, reactive queries
  • Keep models stable; pair renames with explicit migrations
  • Use background contexts/actors for heavy work
  • Handle errors explicitly: load, save, migration, sync
  • Use narrow predicates, fetch limits, indexes

Output Format

Diagnosis

  • [bullet points of what/why]
  • [concrete steps]

Migration Plan (if relevant)

  • [lightweight/custom, steps]

Performance Considerations

  • [specific optimizations]
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. 10d ago First seen · 49 lines · 76 tokens per session scan A a6d0e0c5a4bd

Subscribe to this mod's changes

coredata-swiftdata-specialist is an agent published in the GitHub repository Desquared/agents-rules-skills (4 stars, last pushed 27d ago), licensed MIT. It adds 76 tokens to every session and 400 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.