{/* 本页面由 website/scripts/generate-skill-docs.py 从技能 SKILL.md 自动生成。请编辑源 SKILL.md 而非本页面。 */}
Findmy
通过 macOS 上的 FindMy.app 跟踪 Apple 设备和 AirTags。
技能元数据
| 来源 | 内置(默认安装) |
| 路径 | skills/apple/findmy |
| 版本 | 1.0.0 |
| 作者 | Hermes Agent |
| 许可证 | MIT |
| 平台 | macos |
| 标签 | FindMy, AirTag, location, tracking, macOS, Apple |
参考:完整 SKILL.md
:::info 以下是此技能被触发时 Hermes 加载的完整技能定义。这是技能激活时代理所看到的指令。 :::
Find My(Apple)
通过 macOS 上的 FindMy.app 跟踪 Apple 设备和 AirTags。由于 Apple 不提供 FindMy 的 CLI,此技能使用 AppleScript 打开应用并通过屏幕截图读取设备位置。
前提条件
- macOS 且已登录 iCloud 和 Find My 应用
- 设备/AirTags 已在 Find My 中注册
- 终端的屏幕录制权限(系统设置 → 隐私 → 屏幕录制)
- 可选但推荐:安装
peekaboo以获得更好的 UI 自动化:brew install steipete/tap/peekaboo
使用时机
- 用户问”我的 [设备/猫/钥匙/包] 在哪里?”
- 跟踪 AirTag 位置
- 检查设备位置(iPhone、iPad、Mac、AirPods)
- 随时间监控宠物或物品的移动(AirTag 巡逻路线)
方法 1:AppleScript + 截图(基本)
打开 FindMy 并导航
# 打开 Find My 应用
osascript -e 'tell application "FindMy" to activate'
# 等待加载
sleep 3
# 截取 Find My 窗口的屏幕截图
screencapture -w -o /tmp/findmy.png然后使用 vision_analyze 读取屏幕截图:
vision_analyze(image_url="/tmp/findmy.png", question="What devices/items are shown and what are their locations?")
在标签页间切换
# 切换到设备标签页
osascript -e '
tell application "System Events"
tell process "FindMy"
click button "Devices" of toolbar 1 of window 1
end tell
end tell'
# 切换到物品标签页(AirTags)
osascript -e '
tell application "System Events"
tell process "FindMy"
click button "Items" of toolbar 1 of window 1
end tell
end tell'方法 2:Peekaboo UI 自动化(推荐)
如果安装了 peekaboo,使用它进行更可靠的 UI 交互:
# 打开 Find My
osascript -e 'tell application "FindMy" to activate'
sleep 3
# 捕获并标注 UI
peekaboo see --app "FindMy" --annotate --path /tmp/findmy-ui.png
# 按元素 ID 点击特定设备/物品
peekaboo click --on B3 --app "FindMy"
# 捕获详情视图
peekaboo image --app "FindMy" --path /tmp/findmy-detail.png然后使用视觉分析:
vision_analyze(image_url="/tmp/findmy-detail.png", question="What is the location shown for this device/item? Include address and coordinates if visible.")
工作流程:随时间跟踪 AirTag 位置
用于监控 AirTag(例如,跟踪猫的巡逻路线):
# 1. 打开 FindMy 到物品标签页
osascript -e 'tell application "FindMy" to activate'
sleep 3
# 2. 点击 AirTag 物品(保持在页面——AirTag 仅在页面打开时更新)
# 3. 定期捕获位置
while true; do
screencapture -w -o /tmp/findmy-$(date +%H%M%S).png
sleep 300 # 每 5 分钟
done使用视觉分析每张截图提取坐标,然后编译路线。
限制
- FindMy 没有 CLI 或 API——必须使用 UI 自动化
- AirTags 仅在 FindMy 页面活跃显示时更新位置
- 位置精度取决于 FindMy 网络中附近 Apple 设备的密度
- 屏幕截图需要屏幕录制权限
- AppleScript UI 自动化可能跨 macOS 版本失效
规则
- 跟踪 AirTags 时保持 FindMy 应用在前台(最小化时更新停止)
- 使用
vision_analyze读取截图像素——不要尝试解析像素 - 对于持续跟踪,使用 cronjob 定期捕获和记录位置
- 尊重隐私——仅跟踪用户拥有的设备/物品