browser-automation
它能做什么
它向 AI 智能体展示如何使用 OpenClaw 的浏览器工具完成多步骤任务,例如填写表单或检查登录状态。它适合希望智能体替自己处理网站的人。
适用场景
- ✓想让智能体打开网站并完成多个步骤的时候。
- ✓需要在操作前检查你是否已登录某个网站的时候。
- ✓浏览器任务卡住,或某个页面元素再也找不到的时候。
技能链接
https://github.com/openclaw/openclaw/blob/main/extensions/browser/skills/browser-automation/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请打开我的网店后台,查看今天的订单是否已列出,并告诉我总金额。”
每周 5 个新技能,1 分钟读完。
工作原理
技能先检查浏览器状态,记住正确的标签页,并在点击前先读取页面。如果某一步超时或元素失效,它会刷新视图并重试。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Browser Automation
Use this skill when you need the browser tool for anything beyond a single page check.
Operating Loop
- Check browser state before acting:
openclaw browser doctororaction="status"when the browser/plugin setup itself may be broken.action="status"for availability.action="profiles"if login state or profile choice matters.action="tabs"before opening a new tab if retries/timeouts may have left windows behind.
- Prefer stable tab handles:
- Open important tabs with
label, for examplelabel="meet". - After
action="tabs"oraction="open", storesuggestedTargetIdand pass it astargetIdin later calls. suggestedTargetIdis the label when one exists, otherwise the stabletabIdhandle liket1.- Avoid relying on raw DevTools
targetIdexcept for immediate diagnostics; it can change under Chromium target replacement.
- Open important tabs with
- Read before you click:
- For “read the page and answer X,” use
action="text"with optionalselectorandmaxCharsfor bounded visible prose (first selector match, otherwise article/main/body). On existing-session profiles, usesnapshotinstead. Efficient snapshots omit most prose. - For virtualized lists, scroll through each segment, capture only the relevant rows, then merge the results.
- Use
action="snapshot"on the intendedtargetId. - Add snapshot
queryto find lines containing all query tokens, ignoring case; matching lines keep their refs. - Use the same
targetIdfor follow-up actions so refs stay on the same tab. - For durable Playwright refs, request
refs="aria"when supported. If you receiveaxNrefs fromsnapshotFormat="aria", use them only after that same snapshot call; stale or unboundaxNrefs fail fast and need a fresh snapshot. - Use
urls=truewhen link text is ambiguous or a direct navigation target would avoid brittle clicks. - Use
labels=trueon snapshot or screenshot when visual position matters. On Playwright-backed profiles, the response includes anannotationsarray ({ref, number, role, name?, box}) with each ref's bounding box in the captured image's coordinate space, so you can reason about position without re-snapshotting; screenshot labels can also combine withfullPage=true(CLI:--full-page) to label the whole document, orref/elementto clip to one element.profile="user"and other existing-session (chrome-mcp) profiles render an overlay into page screenshots but do not attachannotationsor use the Playwright full-page/ref/element projection helper, so read positions from the labeled image itself on those profiles. The raw-CDP fallback (no Playwright) does not support labeled screenshots at all and returns a 501, so only requestlabelswhen Playwright is available.
- For “read the page and answer X,” use
- Act narrowly:
- Prefer
action="act"with a ref from the latest snapshot. navigatereturns the loaded page's compact snapshot inline, and batchactresults that report a cross-document navigation include fresh page state; use those refs directly instead of a follow-up snapshot call.- After a single act that triggers navigation, and after modal changes or form submissions, snapshot again before the next action.
- Avoid blind waits. Wait for visible UI state when possible.
- Use
action="emulate"withdevice,colorScheme,timezoneId, orlocalewhen testing those settings; snapshot again afterward. Existing-session profiles do not support emulation.
- Prefer
- Report real blockers:
- Debug network failures with
action="requests", optional URL/typefilter, andlimit(default 50 recent entries).clear=trueclears the collected log after reading. Use a managed profile; existing-session profiles do not support this log. - Debug page errors with
action="errors"andlimit(default 50 recent entries).clear=trueclears the collected log after reading. Existing-session profiles do not support this log. - If the page needs login, permission, captcha, 2FA, camera/microphone approval, or another manual step, stop and tell the user exactly what is needed.
- Do not claim the browser is not logged in just because the current page shows a permission or onboarding dialog. Inspect the visible UI first.
- Debug network failures with
Browser batch CLI
openclaw browser batch runs an array of nested /act actions in one /act call (the same kind="batch" runtime reached through the agent tool), so CLI users and scripts can combine actions lik
常见问题
它会保留我的登录状态吗?
它可以检查登录状态并选择浏览器配置文件,因此你已登录的网站可以保持登录。
出错后留下的标签页怎么办?
技能会先列出打开的标签页,因此可以复用正确的标签页,而不是打开更多。
它能读取很长的页面吗?
可以。它可以从页面读取有限量的文本,并分段处理长列表。
详情
作者的原始描述
Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.
repo: openclaw/openclaw
热度
- GitHub 星标
- 394k
- 排名
- #14
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
discord-user-post
394k让你的智能体通过 Discord 桌面应用,以你的身份发送你已批准的消息,并在发送前确认具体频道。
discrawl
394k让你的智能体搜索和总结本地保存的 Discord 消息档案,查看档案的新旧程度,并阅读私信。
gitcrawl
394k让你的智能体搜索已保存的 GitHub 议题和拉取请求档案,将重复内容归类,并在 GitHub 上核实它们的当前状态。
graincrawl
394k让你的智能体搜索已保存的 Granola 会议记录和转写稿,查看它们的新旧程度,并统计某段时间内的数量。