Agent skill · software engineering · dpearson2699
cloudkit
Implement, review, or improve CloudKit and iCloud sync in iOS/macOS apps. Use when working with CKContainer, CKRecord, CKQuery, CKSubscription, CKSyncEngine, CKShare, NSUbiquitousKeyValueStore, or iCloud Drive file coordination; when syncing SwiftData models via ModelConfiguration with cloudKitDatabase; when handling CKError codes for conflict resolution, network failures, or quota limits; or when checking iCloud account status before performing sync operations.
Why this skill is useful
Provides specific integration patterns and error handling strategies for CloudKit that the AI wouldn't reliably generate on its own.
What it needs
About 8k tokens when loaded. Last updated 2026-07-31. 973 stars on the source repository.
What this skill does
CloudKit Sync data across devices using CloudKit, iCloud key-value storage, and iCloud Drive. Covers container setup, record CRUD, queries, subscriptions, CKSyncEngine, SwiftData integration, conflict resolution, and error handling. Contents Container and Database Setup Workflow CKRecord CRUD CKQuery CKSubscription CKSyncEngine (iOS 17+) SwiftData + CloudKit NSUbiquitousKeyValueStore iCloud Drive File Sync Account Status and Error Handling Conflict Resolution Common Mistakes Review Checklist References Workflow 1. Choose the database scope and sync owner; verify capability, container, account status, schema, and environment before writing records. 2. Make a local change durable, enqueue it, then let subscriptions or CKSyncEngine drive remote work rather than polling. 3. Persist change tokens or sync-engine state after successful application. 4. Test offline edits, partial failure, rate limiting, token expiry, conflict, account loss, zone deletion, and relaunch. 5. On failure, classify the CKError, restore the affected fixture or queue item, apply the documented retry/reset/merge action, and rerun the same scenario. Never restart a full sync blindly after partial success. Load references/cloudkit-patterns.md for incremental zone changes, shares, assets, batch operations, and Dashboard procedures. Container and Database Setup Enable iCloud + CloudKit in Signing & Capabilities. A container provides three databases: Database Scope Requires iCloud Storage Quota ---------- ------- ----------------- --------------- Public All users Read: No, Write: Yes App quota Private Current user Yes User quota Shared Shared records Yes Owner quota CKRecord CRUD Records are key-value pairs. Max 1 MB per record (excluding CKAsset data). Custom Record Zones Apps create custom zones in the private database. Shared databases expose zones that other users share with the current user. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills dpearson2699/cloudkit