Setup
On first use, read setup.md for secure integration guidelines.
When to Use
Use this skill when the user wants agents to interact with their own iCloud account: list devices, retrieve Find My status, inspect iCloud Drive, or pull photo metadata/files.
Use it for operational automation with strict safety gates, not for bypassing Apple account security.
Architecture
Memory lives in ~/icloud/. See memory-template.md for structure and status fields.
CODEBLOCK0
Quick Reference
Load only the file needed for the current task.
| Topic | File |
|---|
| Setup flow | INLINECODE3 |
| Memory template |
memory-template.md |
| Authentication and session handling |
auth-session.md |
| Find My operations |
findmy-ops.md |
| iCloud Drive operations |
drive-ops.md |
| Photos operations |
photos-ops.md |
| Safety boundaries and confirmations |
safety-boundaries.md |
Core Rules
1. Authenticate Locally, Never Through Chat
- - Never ask the user to paste Apple password, 2FA code, session token, or app password in conversation.
- Use interactive local auth with terminal prompts or secure local input prompts only.
2. Start Read-Only, Then Escalate
- - Run read-only discovery first: account reachability, device list, folder listing, metadata checks.
- Do not run write operations until read checks pass and scope is explicit.
3. Require Explicit Confirmation for Risky Actions
- - Treat lost mode, message push, file rename/delete, and bulk upload as risky.
- Before running risky actions, summarize target, effect, and rollback option, then request explicit confirmation.
4. Use Deterministic Verification After Every Action
- - After each operation, verify expected state with a second read call.
- Never report success from command exit code alone.
5. Keep Operations Narrow and Idempotent
- - Operate on one device ID or one file path per step when possible.
- Prefer repeat-safe commands and avoid broad wildcard operations.
6. Handle 2FA and Session Expiry as Normal State
- - If Apple invalidates the session, pause destructive operations and re-auth first.
- Continue only after session trust is restored and read checks succeed again.
7. Persist Only Minimal Operational Context
- - Store only what improves reliability (IDs, verified paths, successful patterns).
- Never persist secrets or raw credential material in local memory files.
Common Traps
- - Asking for Apple credentials in chat -> immediate privacy and trust failure.
- Running write operations before discovery -> wrong device/path targeted.
- Using device names without IDs -> ambiguous actions on similarly named devices.
- Assuming session validity across days -> sudden auth failures mid-workflow.
- Executing bulk file changes without snapshot -> difficult rollback after mistakes.
- Claiming action success without re-read verification -> silent failures reach users.
External Endpoints
| Endpoint | Data Sent | Purpose |
|---|
| https://idmsa.apple.com | Apple account auth payload during login | Apple ID authentication |
| https://setup.icloud.com |
Session and webservice negotiation | iCloud service bootstrap |
| https://www.icloud.com | Service API requests (Drive/Photos/Find My) | iCloud operations |
| https://idmsa.apple.com.cn | Apple account auth payload (China mainland accounts) | Regional Apple ID authentication |
| https://setup.icloud.com.cn | Session and webservice negotiation (China mainland accounts) | Regional iCloud bootstrap |
| https://pypi.org | Package metadata (install time only) | Install
pyicloud |
| https://files.pythonhosted.org | Package download (install time only) | Install
pyicloud |
No other data is sent externally by this skill's documented workflow.
Security & Privacy
Data that leaves your machine:
- - Apple account authentication and iCloud API requests needed for requested operations.
- Package install traffic only when installing dependencies.
Data that stays local:
- - Optional operational notes under
~/icloud/. - Local keyring entries managed by the
pyicloud tool if the user chooses to store password.
This skill does NOT:
- - Bypass Apple security flows or 2FA requirements.
- Request undeclared credentials in chat.
- Execute undeclared network endpoints.
- Modify its own SKILL file.
Trust
By using this skill, you trust Apple iCloud endpoints and the pyicloud package.
Only install and run this workflow if you trust these services with your account operations.
Related Skills
Install with
clawhub install <slug> if user confirms:
- -
cloud-storage - Cross-provider storage workflows and transfer safety checks - INLINECODE17 - Apple device settings, permissions, and account behavior troubleshooting
- INLINECODE18 - macOS security, keychain, and runtime diagnostics for Apple tooling
- INLINECODE19 - Media management strategies when iCloud Photos is the main workload
Feedback
- - If useful: INLINECODE20
- Stay updated: INLINECODE21
设置
首次使用时,请阅读 setup.md 以获取安全集成指南。
使用时机
当用户希望代理与其自己的 iCloud 账户交互时使用此技能:列出设备、检索“查找”状态、检查 iCloud 云盘或提取照片元数据/文件。
此技能用于带有严格安全闸门的操作自动化,而非绕过 Apple 账户安全。
架构
内存数据位于 ~/icloud/。请参阅 memory-template.md 了解结构和状态字段。
text
~/icloud/
|-- memory.md # 状态、集成模式和当前账户范围
|-- operations-log.md # 已执行命令、结果检查和回滚记录
|-- device-map.md # 已知设备别名和稳定 ID
|-- drive-map.md # iCloud 云盘文件夹映射和已验证路径
-- safety-events.md # 已确认的风险操作和明确授权
快速参考
仅加载当前任务所需的文件。
memory-template.md |
| 身份验证和会话处理 | auth-session.md |
| “查找”操作 | findmy-ops.md |
| iCloud 云盘操作 | drive-ops.md |
| 照片操作 | photos-ops.md |
| 安全边界和确认 | safety-boundaries.md |
核心规则
1. 本地验证,绝不在聊天中操作
- - 切勿要求用户在对话中粘贴 Apple 密码、双重认证码、会话令牌或应用专用密码。
- 仅使用终端提示或安全本地输入提示进行交互式本地验证。
2. 从只读开始,再逐步升级
- - 首先执行只读发现操作:账户可达性、设备列表、文件夹列表、元数据检查。
- 在只读检查通过且范围明确之前,不要执行写入操作。
3. 风险操作需明确确认
- - 将丢失模式、消息推送、文件重命名/删除和批量上传视为风险操作。
- 在执行风险操作前,总结目标、影响和回滚选项,然后请求明确确认。
4. 每次操作后使用确定性验证
- - 每次操作后,通过第二次读取调用来验证预期状态。
- 切勿仅凭命令退出代码报告成功。
5. 保持操作范围狭窄且幂等
- - 尽可能每次操作针对一个设备 ID 或一个文件路径。
- 优先使用可重复安全的命令,避免宽泛的通配符操作。
6. 将双重认证和会话过期视为正常状态
- - 如果 Apple 使会话失效,先暂停破坏性操作并重新进行身份验证。
- 仅在会话信任恢复且读取检查再次通过后继续操作。
7. 仅持久化最小操作上下文
- - 仅存储能提高可靠性的信息(ID、已验证路径、成功模式)。
- 切勿在本地内存文件中持久化密钥或原始凭证材料。
常见陷阱
- - 在聊天中索要 Apple 凭据 -> 立即导致隐私和信任失败。
- 在发现操作前执行写入操作 -> 目标设备/路径错误。
- 使用设备名称而非 ID -> 对名称相似的设备执行模糊操作。
- 假设会话跨天有效 -> 工作流中途突然出现验证失败。
- 执行批量文件更改前未创建快照 -> 出错后难以回滚。
- 未通过重新读取验证即声称操作成功 -> 静默失败影响用户。
外部端点
| 端点 | 发送的数据 | 目的 |
|---|
| https://idmsa.apple.com | 登录时的 Apple 账户验证负载 | Apple ID 身份验证 |
| https://setup.icloud.com |
会话和 Web 服务协商 | iCloud 服务引导 |
| https://www.icloud.com | 服务 API 请求(云盘/照片/查找) | iCloud 操作 |
| https://idmsa.apple.com.cn | Apple 账户验证负载(中国大陆账户) | 区域 Apple ID 身份验证 |
| https://setup.icloud.com.cn | 会话和 Web 服务协商(中国大陆账户) | 区域 iCloud 引导 |
| https://pypi.org | 包元数据(仅安装时) | 安装 pyicloud |
| https://files.pythonhosted.org | 包下载(仅安装时) | 安装 pyicloud |
此技能文档化的工作流不会向外部发送其他数据。
安全与隐私
离开您机器的数据:
- - 请求操作所需的 Apple 账户验证和 iCloud API 请求。
- 仅在安装依赖项时的包安装流量。
留在本地的数据:
- - ~/icloud/ 下的可选操作记录。
- 如果用户选择存储密码,由 pyicloud 工具管理的本地钥匙串条目。
此技能不会:
- - 绕过 Apple 安全流程或双重认证要求。
- 在聊天中请求未声明的凭据。
- 执行未声明的网络端点。
- 修改自身的 SKILL 文件。
信任
使用此技能即表示您信任 Apple iCloud 端点和 pyicloud 包。
仅当您信任这些服务处理您的账户操作时,才安装并运行此工作流。
相关技能
如果用户确认,使用 clawhub install 安装:
- - cloud-storage - 跨提供商存储工作流和传输安全检查
- ios - Apple 设备设置、权限和账户行为故障排除
- macos - macOS 安全、钥匙串和 Apple 工具运行时诊断
- photos - 当 iCloud 照片为主要工作负载时的媒体管理策略
反馈
- - 如果觉得有用:clawhub star icloud
- 保持更新:clawhub sync