Skills cloudkit-code-review
Reviews CloudKit code for container setup, record handling, subscriptions, and sharing patterns. Use when reviewing code with import CloudKit, CKContainer, CKRecord, CKShare, or CKSubscription.
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/anderskev/cloudkit-code-review" ~/.claude/skills/openclaw-skills-cloudkit-code-review && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/anderskev/cloudkit-code-review" ~/.openclaw/skills/openclaw-skills-cloudkit-code-review && rm -rf "$T"
manifest:
skills/anderskev/cloudkit-code-review/SKILL.mdsource content
CloudKit Code Review
Quick Reference
| Issue Type | Reference |
|---|---|
| CKContainer, databases, zones, entitlements | references/container-setup.md |
| CKRecord, references, assets, batch operations | references/records.md |
| CKSubscription, push notifications, silent sync | references/subscriptions.md |
| CKShare, participants, permissions, acceptance | references/sharing.md |
Review Checklist
- Account status checked before private/shared database operations
- Custom zones used (not default zone) for production data
- All CloudKit errors handled with
respectedretryAfterSeconds -
conflicts handled with proper merge logicserverRecordChanged -
parsed for individual record errorsCKErrorPartialFailure - Batch operations used (
) not individual savesCKModifyRecordsOperation - Large binary data stored as
(records have 1MB limit)CKAsset - Record keys type-safe (enums) not string literals
- UI updates dispatched to main thread from callbacks
-
observed for account switchesCKAccountChangedNotification - Subscriptions have unique IDs to prevent duplicates
- CKShare uses custom zone (sharing requires custom zones)
When to Load References
- Reviewing container/database setup or zones -> container-setup.md
- Reviewing record CRUD or relationships -> records.md
- Reviewing push notifications or sync triggers -> subscriptions.md
- Reviewing sharing or collaboration features -> sharing.md
Output Format
Report issues using:
[FILE:LINE] ISSUE_TITLE
Examples:
[AppDelegate.swift:24] CKContainer not in custom zone[SyncManager.swift:156] Unhandled CKErrorPartialFailure[DataStore.swift:89] Missing retryAfterSeconds backoff
Review Questions
- What happens when the user is signed out of iCloud?
- Does error handling respect rate limiting (
)?retryAfterSeconds - Are conflicts resolved or does data get overwritten silently?
- Is the schema deployed to production before App Store release?
- Are shared records in custom zones (required for CKShare)?