← 返回列表
全部 Skill›工具 Tools›browser-automation

browser-automation

作者 @openclaw · 语言 en
Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.
工具 Tools自动化工具通用访问网络待翻译
最近源活动
2026-11-21 23:32
检测 SKILL.md 语言
en
星标 ★
395,109
分支 Fork
82,939
安装选项
提示
指令
使用 AI 助手安装
将下面的提示复制到你正在使用的 AI 助手中。
下载完整 Skill 目录(含全部配套文件)。 下载压缩包 ↓
SKILL.md 原文预览

Browser Automation

Use this skill when you need the browser tool for anything beyond a single page check.

Operating Loop

  1. Check browser state before acting:
  • openclaw browser doctor or action="status" when the browser/plugin setup itself may be broken.
  • action="status" for availability.
  • action="profiles" if login state or profile choice matters. Profiles describe the selected route; nodeRoutes advertises connected browser-node candidates, not verified browser access.
  • action="tabs" before opening a new tab if retries/timeouts may have left windows behind.
  1. Prefer stable tab handles:
  • Open important tabs with label, for example label="meet".
  • After action="tabs" or action="open", store suggestedTargetId and pass it as targetId in later calls.
  • suggestedTargetId is the label when one exists, otherwise the stable tabId handle like t1.
  • Avoid relying on raw DevTools targetId except for immediate diagnostics; it can change under Chromium target replacement.
  1. Read before you click:
  • For “read the page and answer X,” use action="text" with optional selector and maxChars for bounded visible prose (first selector match, otherwise article/main/body). On existing-session profiles, use snapshot instead. 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 intended targetId.
  • Add snapshot query to find lines containing all query tokens, ignoring case; matching lines keep their refs.
  • Use the same targetId for follow-up actions so refs stay on the same tab.
  • For durable Playwright refs, request refs="aria" when supported. If you receive axN refs from snapshotFormat="aria", use them only after that same snapshot call; stale or unbound axN refs fail fast and need a fresh snapshot.
  • Use urls=true when link text is ambiguous or a direct navigation target would avoid brittle clicks.
  • Use labels=true on snapshot or screenshot when visual position matters. On Playwright-backed profiles, the response includes an annotations array ({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 with fullPage=true (CLI: --full-page) to label the whole document, or ref / element to clip to one element. profile="user" and other existing-session (chrome-mcp) profiles render an overlay into page screenshots but do not attach annotations or 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 request labels when Playwright is available.
  1. Act narrowly:
  • Prefer action="act" with a ref from the latest snapshot.
  • navigate returns the loaded page's compact snapshot inline, and batch act results 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" with device, colorScheme, timezoneId, or locale when testing those settings; snapshot again afterward. Existing-session profiles do not support emulation.
  1. Report real blockers:
  • Debug network failures with action="requests", optional URL/type filter, and limit (default 50 recent entries). clear=true clears the collected log after reading. Use a managed profile; existing-session profiles do not support this log.
  • Debug page errors with action="errors" and limit (default 50 recent entries). clear=true clears the collected log after reading. Existing-session profiles do not support this log.
  • 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.

Route-local access recovery

Incident: #200327 — a running

host profile failed to attach while an authorized paired-node route remained usable.

An attach error (including macOS EPERM reading DevToolsActivePort), timeout,

or login/permission dialog is evidence about one route, not every browser.

Before claiming browser access is unavailable or asking the user to log in,

change permissions, or complete 2FA:

  1. Record the failed target, node, profile, action, and error. Do not

repeat the same failure or replay a mutation on another route.

  1. Use action="profiles" to inspect the selected route and nodeRoutes.

nodeRoutesUnavailable means discovery was blocked/failed, not that no

other browser exists. If profiles itself fails, use the available node

discovery tool to inspect connected browser-capable nodes.

  1. Only inspect alternatives within the user's authorized machine/account scope.

A configured pin or explicit route/account request is intent, not permission

to switch. Do not cross users, bypass a policy denial, import cookies, start

a fresh isolated login, or change permissions just to avoid an attach error.

  1. For a relevant authorized candidate, explicitly call

action="profiles", target="node", node="<id>". Discover its profile names;

the host's user and node's chrome may use different transports. Try each

relevant candidate once; stop on a policy denial rather than working around it.

5

评论
Oopenclaw
openclaw
openclaw/openclaw
查看 GitHub 仓库 查看作者的其他 Skill
来源信息
作者@openclaw
所属大类工具 Tools / 自动化工具
国内可用性通用
最近源活动2026-11-21 23:32
风险提示访问网络
提示:风险标签为程序静态扫描结果,仅作提示,不代表安全认证。安装前请阅读 SKILL.md 及其引用的脚本、权限,自行判断是否可信。