用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/L-LesterYu/OpenClaw-hot-skills-zh --skill browser-use-zh-remote-browser命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | browser-use-zh-remote-browser |
| description | 从沙箱远程机器控制本地浏览器。当代理在沙箱中运行(无 GUI)时,需要导航网站、与网页交互、填写表单、截图或通过隧道暴露本地开发服务器时使用。 |
| allowed-tools | Bash(browser-use:*) |
此技能适用于在沙箱远程机器(云虚拟机、CI、编码代理)上运行的代理,这些代理需要控制无头浏览器。
browser-use doctor # 验证安装
安装详情请参见 https://github.com/browser-use/browser-use/blob/main/browser_use/skill_cli/README.md
browser-use open <url> — 如需要则启动无头浏览器browser-use state — 返回可点击元素及其索引browser-use click 5、browser-use input 3 "text")browser-use state 或 browser-use screenshot 确认结果browser-use closebrowser-use open <url> # 默认:无头 Chromium
browser-use cloud connect # 配置云浏览器并连接
browser-use --connect open <url> # 通过 CDP 自动发现运行中的 Chrome
browser-use --cdp-url ws://localhost:9222/... open <url> # 通过 CDP URL 连接
# 导航
browser-use open <url> # 导航到 URL
browser-use back # 后退
browser-use scroll down # 向下滚动(--amount N 指定像素数)
browser-use scroll up # 向上滚动
browser-use switch <tab> # 按索引切换标签页
browser-use close-tab [tab] # 关闭标签页(不指定则关闭当前标签页)
# 页面状态 — 始终先运行 state 获取元素索引
browser-use state # URL、标题、可点击元素及索引
browser-use screenshot [path.png] # 截图(不指定路径返回 base64,--full 截取整页)
# 交互 — 使用 state 返回的索引
browser-use click <index> # 按索引点击元素
browser-use click <x> <y> # 按像素坐标点击
browser-use type "text" # 在聚焦元素中输入文本
browser-use input <index> "text" # 点击元素后输入文本
browser-use keys "Enter" # 发送键盘按键(也支持 "Control+a" 等)
browser-use select <index> "option" # 选择下拉菜单选项
browser-use upload <index> <path> # 上传文件到文件输入框
browser-use hover <index> # 悬停在元素上
browser-use dblclick <index> # 双击元素
browser-use rightclick <index> # 右键点击元素
# 数据提取
browser-use eval "js code" # 执行 JavaScript,返回结果
browser-use get title # 页面标题
browser-use get html [--selector "h1"] # 页面 HTML(或限定到选择器范围)
browser-use get text <index> # 元素文本内容
browser-use get value <index> # 输入框/文本域的值
browser-use get attributes <index> # 元素属性
browser-use get bbox <index>
browser-use selector
browser-use text
browser-use cookies get [--url <url>]
browser-use cookies <name> <value>
browser-use cookies clear [--url <url>]
browser-use cookies <file>
browser-use cookies import <file>
browser-use python
browser-use python --file script.py
browser-use python --vars
browser-use python --reset
browser-use close
browser-use sessions
browser-use close --all
Python 的 browser 对象提供:browser.url、browser.title、browser.html、browser.goto(url)、browser.back()、browser.click(index)、browser.type(text)、browser.input(index, text)、browser.keys(keys)、browser.upload(index, path)、browser.screenshot(path)、browser.scroll(direction, amount)、browser.wait(seconds)。
通过 Cloudflare 隧道将本地开发服务器暴露给浏览器。
browser-use tunnel <port> # 启动隧道(幂等操作)
browser-use tunnel list # 显示活跃隧道
browser-use tunnel stop <port> # 停止隧道
browser-use tunnel stop --all # 停止所有隧道
命令可以使用 && 链接。浏览器通过守护进程持久存在,因此链接是安全高效的。
browser-use open https://example.com && browser-use state
browser-use input 5 "user@example.com" && browser-use input 6 "password" && browser-use click 7
当不需要中间输出时可以链接命令。当需要解析 state 来发现索引时,应分别运行。
python -m http.server 3000 & # 启动开发服务器
browser-use tunnel 3000 # → https://abc.trycloudflare.com
browser-use open https://abc.trycloudflare.com # 浏览隧道
隧道独立于浏览器会话,在 browser-use close 后仍然存在。
| 选项 | 说明 |
|---|---|
--headed | 显示浏览器窗口 |
--connect | 通过 CDP 自动发现运行中的 Chrome |
--cdp-url <url> | 通过 CDP URL 连接(http:// 或 ws://) |
--session NAME | 指定命名会话(默认:"default") |
--json | 输出为 JSON 格式 |
state 以查看可用元素及其索引browser-use close 后仍然保留tunnel 是幂等的 — 对同一端口再次调用会返回已有的 URLbrowser-use close 再重试。运行 browser-use doctor 检查。browser-use scroll down 再 browser-use statewhich cloudflared 检查,用 browser-use tunnel list 查看活跃隧道browser-use close # 关闭浏览器会话
browser-use tunnel stop --all # 停止隧道(如果有)
基于 SOC 职业分类