
Cloudkit
Have your agent review or correct iOS CloudKit and CKSyncEngine plans so private-zone sync, notifications, and SwiftData models match Apple’s integration rules.
Install
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill cloudkitWhat is this skill?
- Eval-driven review of CKSyncEngine scope (private/shared vs public database misuse)
- Requires CloudKit plus Remote notifications background mode for engine-driven delivery
- Async CKSyncEngineDelegate patterns for handleEvent and nextRecordZoneChangeBatch
- Context-scoped record-zone change batches instead of dumping all pending changes
- State persistence via stateSerialization across app launches
Adoption & trust: 1.2k installs on skills.sh; 713 GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Journey fit
CloudKit wiring is implementation work on the product itself, which maps to the Build phase rather than launch or grow analytics. Integrations is the right shelf because the skill governs external sync services (iCloud, CKSyncEngine, remote notifications), not UI layout or pure PM docs.
Common Questions / FAQ
Is Cloudkit safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Cloudkit
{ "skill_name": "cloudkit", "evals": [ { "id": 1, "prompt": "Review this iOS 26 CloudKit sync plan: a CKSyncEngine is configured against the public database, the app only enables iCloud + CloudKit, handleEvent and nextRecordZoneChangeBatch are implemented synchronously, nextRecordZoneChangeBatch returns every pending record-zone change, and the team expects automatic sync to run immediately after each local edit. Write concise corrected guidance with Swift snippets where useful.", "expected_output": "A review that corrects CKSyncEngine database scope, Remote notifications setup, async delegate signatures, context-scoped change batches, state persistence, and automatic sync timing.", "files": [], "assertions": [ "States that CKSyncEngine is for private or shared databases and must not sync the public database.", "States that CloudKit plus Remote notifications background mode are required for CKSyncEngine/background delivery.", "Uses async CKSyncEngineDelegate signatures for handleEvent and nextRecordZoneChangeBatch.", "Filters pending record-zone changes to the send context scope, such as context.options.zoneIDs.", "Explains that automatic sync timing is indeterminate and immediate sync requires fetchChanges or sendChanges.", "Mentions persisting CKSyncEngine stateSerialization across launches." ] }, { "id": 2, "prompt": "Review this SwiftData model for CloudKit sync: it uses @Unique on an email field, has a nonoptional @Relationship(deleteRule: .deny) to Owner, stores a large image Data property without .externalStorage, and the reviewer says every scalar property must be optional. Explain what should change and what should not be overcorrected.", "expected_output": "A review that flags SwiftData CloudKit schema incompatibilities without incorrectly requiring every scalar property to become optional.", "files": [], "assertions": [ "Flags @Unique or unique constraints as unsupported by SwiftData CloudKit sync.", "Flags nonoptional relationships as incompatible and recommends optional relationships.", "Flags the .deny relationship delete rule as incompatible with CloudKit sync.", "Recommends @Attribute(.externalStorage) for large Data fields.", "Does not claim every scalar property must be optional.", "Mentions CloudKit production schemas are additive or require schema promotion care." ] }, { "id": 3, "prompt": "Review this CloudKit data/query plan: the app stores sensitive profile fields in record.encryptedValues in the public database, adds a new encrypted field to an already-deployed field name, sorts and filters CKQuery results by that encrypted field, uses title CONTAINS 'road' for substring search, and stores image files as CKAsset. Give corrected guidance.", "expected_output": "A review that corrects encrypted field limits, query predicate semantics, and CKAsset handling.", "files": [], "assertions": [ "States that encryptedValues are not available for public database records.", "States that CloudKit can encrypt only new schema fields, not convert an existing field name to encrypted storage.", "States that encrypted fields cannot be indexed, queried, or sorted.", "Explains that CKQuery CONTAINS is list membership except self CONTAINS tokenized full-text search.", "Recommends BEGINSWITH or self CONTAINS where appropriate instead of title CONTAINS for substring search.", "States that CKAsset data is already encrypted by default or does not need encryptedValues." ] } ] } # CloudKit Patterns Advanced CloudKit patterns including incremental sync with CKFetchRecordZoneChangesOperation, sharing with CKShare, record zone management, CKAsset file storage, batch operations, and CloudKit Dashboard. ## Contents - [CKFetchRecordZoneChangesOperation (Inc