使用 agent-browser CLI 进行浏览器自动化。用于签到、填表、截图、信息抓取等需要控制浏览器的任务。触发条件:(1) 用户要求自动化浏览器操作 (2) 需要签到、填表、点击按钮 (3) 需要抓取网页内容作为研究素材
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install agent-browser-cli或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install agent-browser-cli⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/agent-browser-cli/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: agent-browser description: 使用 agent-browser CLI 进行浏览器自动化。用于签到、填表、截图、信息抓取等需要控制浏览器的任务。触发条件:(1) 用户要求自动化浏览器操作 (2) 需要签到、填表、点击按钮 (3) 需要抓取网页内容作为研究素材 ---
Vercel 出品的浏览器自动化 CLI,基于 Playwright,比标准浏览器工具更快更灵活。
agent-browser open <url> # 打开网页
agent-browser snapshot # 获取页面可访问性树
agent-browser click @<ref> # 点击元素(用ref引用)
agent-browser fill @<ref> "内容" # 填入内容
agent-browser close # 关闭浏览器
agent-browser open <url> # 打开URL(别名:goto, navigate)
agent-browser back # 后退
agent-browser forward # 前进
agent-browser reload # 刷新
agent-browser click <sel> # 点击
agent-browser dblclick <sel> # 双击
agent-browser fill <sel> "text" # 填入(清空后填)
agent-browser type <sel> "text" # 输入(追加)
agent-browser select <sel> <value> # 选择下拉选项
agent-browser check <sel> # 勾选复选框
agent-browser uncheck <sel> # 取消勾选
agent-browser press <key> # 按键(Enter, Tab, Escape等)
agent-browser snapshot # 获取可访问性树(推荐)
agent-browser get text <sel> # 获取文本
agent-browser get html <sel> # 获取HTML
agent-browser get value <sel> # 获取输入值
agent-browser get title # 获取页面标题
agent-browser get url # 获取当前URL
agent-browser screenshot [path] # 截图
agent-browser screenshot --annotate # 带标注的截图
通过 snapshot 输出的 ref(如 @e14)直接引用:
agent-browser click @e14
agent-browser fill @e13 "hello"
或使用 CSS 选择器:
agent-browser click "#submit"
agent-browser fill "input[name='email']" "[email protected]"
或使用 ARIA 角色查找:
agent-browser find role button click --name "Submit"
agent-browser find text "Sign In" click
agent-browser find label "Email" fill "[email protected]"
agent-browser find placeholder "Search" type "query"
# 打开登录页
agent-browser open <签到页面URL>
# 获取页面结构
agent-browser snapshot
# 点击登录/签到按钮(用实际ref替换 @eXX)
agent-browser click @eXX
# 等待页面加载
sleep 2
agent-browser snapshot
agent-browser open <表单URL>
agent-browser snapshot
# 填入各字段
agent-browser find label "用户名" fill "myuser"
agent-browser find label "密码" fill "mypassword"
agent-browser find role button click --name "提交"
创建脚本 ~/.openclaw/scripts/daily-checkin.sh:
#!/bin/bash
agent-browser open <签到URL>
sleep 2
agent-browser find role button click --name "签到"
agent-browser screenshot /tmp/checkin_$(date +%Y%m%d).png
agent-browser close
sleep 2 或等待agent-browser close 释放资源如果 agent-browser 未安装:
npm install -g agent-browser
agent-browser install安装 Agent Browser CLI 后,可以对 AI 说这些话来触发它
Help me get started with Agent Browser CLI
Explains what Agent Browser CLI does, walks through the setup, and runs a quick demo based on your current project
Use Agent Browser CLI to browser automation using the agent-browser CLI
Invokes Agent Browser CLI with the right parameters and returns the result directly in the conversation
What can I do with Agent Browser CLI in my ai agent & automation workflow?
Lists the top use cases for Agent Browser CLI, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/agent-browser-cli/ 目录(个人级,所有项目可用),或 .claude/skills/agent-browser-cli/(项目级)。重启 AI 客户端后,用 /agent-browser-cli 主动调用,或让 AI 根据上下文自动发现并使用。
Agent Browser CLI 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Agent Browser CLI 可免费安装使用。请查阅仓库了解许可证信息。
使用 agent-browser CLI 进行浏览器自动化。用于签到、填表、截图、信息抓取等需要控制浏览器的任务。触发条件:(1) 用户要求自动化浏览器操作 (2) 需要签到、填表、点击按钮 (3) 需要抓取网页内容作为研究素材
Agent Browser CLI 属于「AI Agent & Automation」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my ai agent & automation tasks using Agent Browser CLI
Identifies repetitive steps in your workflow and sets up Agent Browser CLI to handle them automatically