core-data-expert

core-data-expert is a skill for Claude Code, Codex from AvdLee/Core-Data-Agent-Skill. It costs 58 tokens per session (1,082 once invoked), scanned A, original, MIT.

A specialist guide to Core Data, Apple's framework for storing and querying app data on iOS and macOS. It covers local databases, background work, migrations, and optional CloudKit syncing.

In plain words
What is it for?
Use it to set up Core Data, write fetches, resolve save conflicts, move work between contexts, perform batch operations, migrate schemas, or connect storage to CloudKit.
Why use it?
It helps avoid data-store crashes, thread-safety mistakes, slow database operations, and migration problems.

Skill for Claude CodeCodex

Part of the core-data-expert plugin — 1 skill shipped together

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.

agentmods
npx agentmods add skills/avdlee/core-data-agent-skill/core-data-expert
Any agent
npx skills add AvdLee/Core-Data-Agent-Skill --skill core-data-expert
Clone the repo
git clone --depth 1 https://github.com/AvdLee/Core-Data-Agent-Skill

Made for: Claude Code, Codex.

Or install core-data-expert, the plugin that ships this one along with the rest of its 1 skill.

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 core-data-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/avdlee/core-data-agent-skill/core-data-expert.svg)](https://agentmods.dev/skills/avdlee/core-data-agent-skill/core-data-expert)
Your own site
<a href="https://agentmods.dev/skills/avdlee/core-data-agent-skill/core-data-expert"><img src="https://agentmods.dev/badge/skills/avdlee/core-data-agent-skill/core-data-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,082 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00058 $0.01082
Opus 5 $0.00029 $0.00541
Sonnet 5 $0.00012 $0.00216
Haiku 4.5 $0.00006 $0.00108

Measured 4d ago against content hash 74cac8c2a868, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

core-data-expert 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 4d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

core-data-expert/SKILL.md · 83 lines

How it starts

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

Core Data Expert

Fast, production-oriented guidance for building correct, performant Core Data stacks and fixing common crashes.

Agent behavior contract (follow these rules)

  1. Determine OS/deployment target when advice depends on availability (iOS 14+/17+ features, etc.).
  2. Identify the context type before proposing fixes: view context (UI) vs background context (heavy work).
  3. Recommend NSManagedObjectID for cross-context/cross-task communication; never pass NSManagedObject instances across contexts.
  4. Prefer lightweight migration when possible; use staged migration (iOS 17+) for complex changes.
  5. When recommending batch operations, verify persistent history tracking is enabled (often required for UI updates).
  6. For CloudKit integration, remind developers that Production schema is immutable.
  7. Reference WWDC/external resources sparingly; prefer this skill’s references/.

First 60 seconds (triage template)

  • Clarify the goal: setup, bugfix, migration, performance, CloudKit?
  • Collect minimal facts:
    • platform + deployment target
    • store type (SQLite / in-memory) and whether CloudKit is enabled
    • context involved (view vs background) and whether Swift Concurrency is in use
    • exact error message + stack trace/logs
  • Branch immediately:
    • threading/crash → focus on context confinement + NSManagedObjectID handoff
    • migration error → identify model versions + migration strategy
    • batch ops not updating UI → persistent history tracking + merge pipeline

Routing map (pick the right reference fast)

  • Stack setup / merge policies / contextsreferences/stack-setup.md
  • Saving patternsreferences/saving.md
  • Fetch requests / list updates / aggregatesreferences/fetch-requests.md
  • Traditional threading (perform/performAndWait, object IDs)references/threading.md
  • Swift Concurrency (async/await, actors, Sendable, DAOs)references/concurrency.md
  • Batch insert/delete/updatereferences/batch-operations.md
  • Persistent history tracking + “batch ops not updating UI”references/persistent-history.md
  • Model configuration (constraints, validation, derived/composite, transformables)references/model-configuration.md
  • Schema migration (lightweight/staged/deferred)references/migration.md
  • CloudKit integration & debuggingreferences/cloudkit-integration.md
  • Performance profiling & memoryreferences/performance.md
  • Testing patternsreferences/testing.md
  • Terminologyreferences/glossary.md

Read the full file on GitHub · 83 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. 4d ago First seen · 83 lines · 58 tokens per session scan A 74cac8c2a868

Subscribe to this mod's changes

core-data-expert is a skill published in the GitHub repository AvdLee/Core-Data-Agent-Skill (303 stars, last pushed 28d ago), licensed MIT. It adds 58 tokens to every session and 1,082 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

data-persistence

Wire up SwiftData models, queries, and cross-screen state after screens are built with placeholder content. Use this skill when screens look right but have no real data, when you need to define your data models, or when you need to ensure state updates propagate across the app. Typically done as a single focused…

troyjthomas/ios-agent-skills · 76 tokens

swiftdata-workflow

Design, implement, migrate, test, and integrate SwiftData persistence in Apple apps using current Apple documentation. Use for @Model schemas, ModelContainer and ModelContext ownership, @Query integration, relationships, uniqueness, deletion, concurrency, migrations, preview or test stores, and boundaries between…

gaelic-ghost/socket · 74 tokens

swiftdata

Implement or review SwiftData models, containers, queries, relationships, migrations, CloudKit configuration, and background persistence work. Use for SwiftData-backed storage; route legacy Core Data-only work to core-data.

thiennc-tesoglobal/ios-skills · 44 tokens

sweetpad

Build, run, and test Xcode and Swift Package apps from the terminal with the sweetpad CLI ("xcodebuild for humans"). Use when the user wants to compile an iOS/macOS/Swift app, run it on a simulator or device, read build errors, run tests, or inspect resolved build settings from the command line — with agent-safe…

sweetpad-dev/sweetpad · 90 tokens

xcode-build-orchestrator

Orchestrate Xcode build optimization by benchmarking first, running the specialist analysis skills, prioritizing findings, requesting explicit approval, delegating approved fixes to xcode-build-fixer, and re-benchmarking after changes. Use when a developer wants an end-to-end build optimization workflow, asks to speed…

AvdLee/Xcode-Build-Optimization-Agent-Skill · 94 tokens

spm-build-analysis

Analyze Swift Package Manager dependencies, package plugins, module variants, and CI-oriented build overhead that slow Xcode builds. Use when a developer suspects packages, plugins, or dependency graph shape are hurting clean or incremental build performance, mentions SPM slowness, package resolution time, build…

AvdLee/Xcode-Build-Optimization-Agent-Skill · 87 tokens