CloudKit 代码审查
cloudkit-code-review
审查 CloudKit 代码的容器配置、记录处理、订阅和共享模式。当审查包含 import CloudKit、CKContainer、CKRecord、CKShare 或 CKSubscription 的代码时使用。
- License 许可
- MIT
- 最近更新
- 2026-08-03
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- cloudkit-code-review
- description
- Reviews CloudKit code for container setup, record handling, subscriptions, and sharing patterns. Use when reviewing code with import CloudKit, CKContainer, CKRecord, CKShare, or CKSubscription.
02 资源文件 4
- 参考文档references/container-setup.md3.8 KB
- 参考文档references/records.md4.6 KB
- 参考文档references/sharing.md5.8 KB
- 参考文档references/subscriptions.md5.5 KB
03 SKILL.md 正文
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
retryAfterSecondsrespected - [ ]
serverRecordChangedconflicts handled with proper merge logic - [ ]
CKErrorPartialFailureparsed for individual record errors - [ ] Batch operations used (
CKModifyRecordsOperation) not individual saves - [ ] Large binary data stored as
CKAsset(records have 1MB limit) - [ ] Record keys type-safe (enums) not string literals
- [ ] UI updates dispatched to main thread from callbacks
- [ ]
CKAccountChangedNotificationobserved for account switches - [ ] 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)?
04 同仓库更多 Skills
next-workflow-step
Use this skill when the user wants to transition to the next workflow step, wrap up a session cleanly, prepare a handoff, or says things like "next step", "continue the workflow", "wrap up", "hand off", "move to the next phase", "what's next in embrace", or "prepare for /clear". Also triggers when the current octo:embrace phase appears complete and no explicit next action is set.
source-discovery
This skill should be used when the user asks to "find sources", "discover URLs", "catalog a source", "classify a URL", "search for libraries", "check what exists", or mentions source discovery, URL cataloging, source classification, or research source management.
review-synthesis
This skill should be used when the user asks to "summarize review findings", "prioritize fixes", "rank review issues", "combine reviewer feedback", "create action items from review", or mentions review synthesis, finding prioritization, severity ranking, or review result summarization.
research-scoring
This skill should be used when the user asks to "score research", "check research quality", "evaluate coverage", "measure improvement", "assess research completeness", or mentions research scoring, quality metrics, coverage gaps, improvement baseline, or research pipeline status.
notebooklm-integration
This skill should be used when the user asks to "ingest into NotebookLM", "query NotebookLM", "add sources to notebook", "cross-source synthesis", "check stale sources", or mentions NotebookLM, notebook integration, source ingestion, or knowledge consolidation.
evidence-synthesis
This skill should be used when the user asks to "synthesize findings", "combine research", "cross-reference sources", "summarize evidence", "write a deep review", or mentions evidence synthesis, finding consolidation, cross-source analysis, or research summarization.