词元之母TOK.MOM - 平台充值汇率 1:1 即 1 人民币充值到账 1 美元,支持一个 Key 调用近 600+ 海内外模型,限时特价模型低至 1 折,欢迎上岸!
computer_use 工具可用时加载此 skill。| 来源 | 内置(默认安装) |
| 路径 | skills/apple/macos-computer-use |
| 版本 | 1.0.0 |
| 平台 | macos |
| 标签 | computer-use, macos, desktop, automation, gui |
| 相关 skill | browser |
computer_use 工具,可在后台驱动 Mac。computer_use(action="capture", mode="som", app="Safari")#1 AXButton 'Back' @ (12, 80, 28, 28) [Safari]
#2 AXTextField 'Address and Search' @ (80, 80, 900, 32) [Safari]
#7 AXLink 'Sign In' @ (900, 420, 80, 24) [Safari]
...computer_use(action="click", element=7)computer_use(action="click", element=7, capture_after=True)mode | 返回内容 | 适用场景 |
|---|---|---|
som(默认) | 截图 + 编号覆盖层 + AX 索引 | 视觉模型;推荐默认使用 |
vision | 纯截图 | 当 SOM 覆盖层干扰验证内容时 |
ax | 仅 AX 树,无图像 | 纯文本模型,或不需要查看像素时 |
capture mode=som|vision|ax app=… (default: current app)
click element=N OR coordinate=[x, y]
double_click element=N OR coordinate=[x, y]
right_click element=N OR coordinate=[x, y]
middle_click element=N OR coordinate=[x, y]
drag from_element=N, to_element=M (or from/to_coordinate)
scroll direction=up|down|left|right amount=3 (ticks)
type text="…"
key keys="cmd+s" | "return" | "escape" | "ctrl+alt+t"
wait seconds=0.5
list_apps
focus_app app="Safari" raise_window=false (default: don't raise)capture_after=True,可在同一工具调用中获取后续截图。modifiers=["cmd","shift"] 用于按住修饰键。raise_window=True。 输入路由无需提升窗口即可工作。app="Safari")——噪音更少,元素更少,不会泄露用户打开的其他窗口。type 会按当前键盘布局发送你提供的任意字符串,支持 Unicode。key,以 + 连接各键名:cmd+s 保存cmd+t 新建标签页cmd+w 关闭标签页return / escape / tab / spacecmd+shift+g 前往路径(Finder)up、down、left、right,可选配修饰键。computer_use(action="drag", from_element=3, to_element=17)computer_use(action="drag",
from_coordinate=[100, 200],
to_coordinate=[400, 500])computer_use(action="scroll", direction="down", amount=5, element=12)computer_use(action="scroll", direction="down", amount=3, coordinate=[500, 400])list_apps 返回正在运行的应用,包含 bundle ID、PID 和窗口数量。focus_app 可将输入路由到某个应用而不提升其窗口。通常无需显式设置焦点——向 capture / click / type 传入 app=... 会自动定位该应用的最前窗口。MEDIA:/absolute/path.png。cua-driver 的截图为 PNG 字节;可用 write_file 或终端命令(base64 -d)写出。type 中的 fork bomb 等。触发防护时你会看到报错。hermes tools 并启用 Computer Use;安装程序会通过上游脚本安装 cua-driver。需要 macOS + Accessibility + Screen Recording 权限。capture 调用。如果 UI 发生变化(新标签页打开、对话框出现),点击前需重新截图。escape 或点击关闭按钮),再重试。type 的 shell 命令匹配了危险模式黑名单(curl ... | bash、sudo rm -rf 等)。请拆分命令或重新考虑方案。computer_usebrowser_* 工具完成的 Web 自动化——这些工具使用真实的无头 Chromium,比驱动用户的 GUI 浏览器更可靠。仅在任务需要用户实际 Mac 应用时才使用 computer_use(原生 Mail、Messages、Finder、Figma、Logic、游戏,以及任何非 Web 应用)。read_file / write_file / patch,而非在编辑器窗口中 type。terminal,而非在 Terminal.app 中 type。