When to Use
User wants the agent to send a local file, export, screenshot, log bundle, or review artifact to a nearby Apple device with AirDrop.
Agent handles file staging, confirmation, local handoff, and mode selection between direct AppKit launch and Shortcut fallback.
Requirements
- - macOS with AirDrop enabled in Finder.
- Nearby Apple recipient available and visible to the current Mac.
- Direct mode uses
xcrun swift or swift to run airdrop-send.swift. - Shortcut mode uses the built-in
shortcuts CLI and a user-owned shortcut that accepts file input.
Architecture
Memory lives in ~/airdrop/. If ~/airdrop/ does not exist, run setup.md. See memory-template.md for structure.
CODEBLOCK0
Quick Reference
| Topic | File |
|---|
| First-run behavior and activation | INLINECODE8 |
| Memory structure |
memory-template.md |
| Direct CLI wrapper |
airdrop-send.sh |
| AppKit AirDrop launcher |
airdrop-send.swift |
| Common execution patterns |
workflow-recipes.md |
| Recovery and diagnostics |
troubleshooting.md |
Core Rules
1. Resolve Exact Files Before Sharing
- - Work only with explicit local file paths.
- For generated text or mixed output, stage to a user-approved file first, then share that file.
- Refuse vague requests like "send the project" until the exact payload is listed.
2. Use the Smallest Safe Payload
- - Prefer the exact artifact the recipient needs: one PDF, one ZIP, one screenshot set, one installer.
- When the source is a directory, curate or archive the approved subset before launch.
- Treat hidden files, secrets, and unrelated workspace state as excluded by default.
3. Keep Recipient Choice Interactive
- - AirDrop recipient selection stays in the macOS share UI.
- Do not claim silent recipient targeting, background delivery, or machine-verifiable recipient identity.
- If the user wants zero-click routing, use Shortcut mode only when they already built that behavior locally.
4. Pick the Right Execution Mode
- - Default to
airdrop-send.sh for direct local handoff because it launches the native AirDrop sharing service without inventing unsupported CLI verbs. - Use Shortcut mode when the user already has a Shortcut that renames, compresses, or routes files before AirDrop.
- If
swift is unavailable, fall back to the user's Shortcut flow or stop with a concrete requirement message.
5. Confirm Sensitive Shares
- - Before launching AirDrop for logs, source bundles, contracts, exports, or anything private, list the exact files and ask for confirmation.
- If the user says "only the final artifact", strip extras before sharing.
- Never include credential files, env files, database dumps, or hidden config unless the user explicitly requests them.
6. Report Handoff Honestly
- - Success means the AirDrop chooser launched with the requested files.
- Do not say the transfer completed unless the user confirms it on-device.
- If launch succeeds but the device does not appear, route to
troubleshooting.md instead of retrying blindly.
Common Traps
| Trap | Why It Fails | Better Move |
|---|
| Treating AirDrop like INLINECODE17 | No stable official recipient CLI targeting | Launch native chooser and keep recipient selection interactive |
| Sending raw text directly |
AirDrop works on shareable items, not vague chat content | Write the text to a file, then share that file |
| Sharing whole folders by reflex | Leaks unrelated files and slows discovery | Zip or curate the exact approved subset first |
| Claiming delivery success too early | Launching the chooser is not transfer confirmation | Report "handoff started" until the user confirms receipt |
| Retrying with the same bad payload | Hidden files or unsupported items keep failing | Reduce to one known-good file and retry once |
Data Storage
This skill can operate with no persistent local state.
If the user wants repeatable behavior, store only activation, confirmation, and staging preferences in ~/airdrop/memory.md.
Create ~/airdrop/staging/ only with user approval when temporary share files are useful.
Security & Privacy
Data that stays local:
- - Skill memory and optional staging files in INLINECODE20
- The source files until the user chooses a nearby AirDrop recipient
Data that may leave your machine:
- - Only the specific files the user approved for AirDrop
- Discovery and transfer metadata handled by macOS AirDrop services with nearby Apple devices
This skill does NOT:
- - Upload files to undeclared cloud services
- Select recipients silently in the background
- Confirm transfer completion without user-visible evidence
- Read or share files outside the approved payload list
Related Skills
Install with
clawhub install <slug> if user confirms:
- -
macos - General macOS command workflows, permissions checks, and native app automation patterns. - INLINECODE23 - Finder and app automation when AirDrop workflows need UI scripting around local files.
- INLINECODE24 - File selection, packaging, renaming, and cleanup before sharing the final payload.
- INLINECODE25 - Exporting and converting image assets before sending them to another Apple device.
Feedback
- - If useful: INLINECODE26
- Stay updated: INLINECODE27
何时使用
用户希望智能体将本地文件、导出内容、截图、日志包或审查工件通过AirDrop发送到附近的Apple设备。
智能体负责文件暂存、确认、本地交接以及直接AppKit启动与快捷指令备用方案之间的模式选择。
前提条件
- - macOS系统,且Finder中已启用AirDrop。
- 附近有可用的Apple接收方,且能被当前Mac检测到。
- 直接模式使用xcrun swift或swift运行airdrop-send.swift。
- 快捷指令模式使用内置的shortcuts命令行工具和用户拥有的、可接受文件输入的快捷指令。
架构
记忆文件存储在~/airdrop/目录下。如果~/airdrop/不存在,则运行setup.md。结构请参考memory-template.md。
text
~/airdrop/
|- memory.md # 激活和确认偏好设置
- - staging/ # 可选:分享前经用户批准的临时导出文件
快速参考
| 主题 | 文件 |
|---|
| 首次运行行为和激活 | setup.md |
| 记忆文件结构 |
memory-template.md |
| 直接CLI封装脚本 | airdrop-send.sh |
| AppKit AirDrop启动器 | airdrop-send.swift |
| 常见执行模式 | workflow-recipes.md |
| 恢复与诊断 | troubleshooting.md |
核心规则
1. 分享前确定具体文件
- - 仅处理明确的本地文件路径。
- 对于生成的文本或混合输出,先暂存到用户批准的文件,再分享该文件。
- 拒绝模糊请求(如“发送项目”),直到列出具体内容。
2. 使用最小安全载荷
- - 优先提供接收方确切需要的工件:一个PDF、一个ZIP、一组截图、一个安装程序。
- 如果源文件是目录,在启动前整理或归档已批准的子集。
- 默认排除隐藏文件、机密信息和不相关的工作区状态。
3. 保持接收方选择交互性
- - AirDrop接收方选择保留在macOS共享界面中。
- 不得声称静默选择接收方、后台传输或机器可验证的接收方身份。
- 如果用户希望零点击路由,仅在他们已在本地构建该行为时使用快捷指令模式。
4. 选择正确的执行模式
- - 默认使用airdrop-send.sh进行直接本地交接,因为它启动原生AirDrop共享服务,无需发明不支持的CLI命令。
- 当用户已有可在AirDrop前重命名、压缩或路由文件的快捷指令时,使用快捷指令模式。
- 如果swift不可用,则回退到用户的快捷指令流程,或停止并给出具体需求信息。
5. 确认敏感分享
- - 在启动AirDrop分享日志、源码包、合同、导出内容或任何私密文件前,列出具体文件并请求确认。
- 如果用户说“仅最终工件”,则在分享前移除额外内容。
- 除非用户明确要求,否则绝不包含凭证文件、环境文件、数据库转储或隐藏配置。
6. 如实报告交接状态
- - 成功意味着AirDrop选择器已启动并携带请求的文件。
- 除非用户在设备上确认,否则不得声称传输已完成。
- 如果启动成功但设备未出现,则引导至troubleshooting.md,而非盲目重试。
常见陷阱
| 陷阱 | 失败原因 | 更优做法 |
|---|
| 将AirDrop视为scp | 无稳定的官方接收方CLI定位 | 启动原生选择器,保持接收方选择交互性 |
| 直接发送原始文本 |
AirDrop处理可分享项目,而非模糊的聊天内容 | 将文本写入文件,再分享该文件 |
| 习惯性分享整个文件夹 | 泄露无关文件并降低发现速度 | 先压缩或整理已批准的精确子集 |
| 过早声称传输成功 | 启动选择器并非传输确认 | 报告“交接已开始”,直到用户确认收到 |
| 使用相同错误载荷重试 | 隐藏文件或不支持的项目持续失败 | 缩减为一个已知可用的文件并重试一次 |
数据存储
此技能可在无持久本地状态的情况下运行。
如果用户希望行为可重复,仅在~/airdrop/memory.md中存储激活、确认和暂存偏好。
仅在用户批准且临时分享文件有用时,创建~/airdrop/staging/目录。
安全与隐私
保留在本地设备的数据:
- - 技能记忆文件和可选的暂存文件(位于~/airdrop/)
- 源文件,直到用户选择附近的AirDrop接收方
可能离开设备的数据:
- - 仅限用户批准通过AirDrop分享的具体文件
- macOS AirDrop服务与附近Apple设备处理的发现和传输元数据
此技能不会:
- - 将文件上传至未声明的云服务
- 在后台静默选择接收方
- 在无用户可见证据的情况下确认传输完成
- 读取或分享批准载荷列表之外的文件
相关技能
如果用户确认,使用clawhub install
安装:
- - macos - 通用macOS命令工作流、权限检查和原生应用自动化模式。
- applescript - 当AirDrop工作流需要对本地文件进行UI脚本操作时的Finder和应用自动化。
- files - 分享最终载荷前的文件选择、打包、重命名和清理。
- photos - 在将图像资源发送到另一台Apple设备前进行导出和转换。
反馈
- - 如果觉得有用:clawhub star airdrop
- 保持更新:clawhub sync