返回 Skill 列表
extension
分类: 内容与媒体无需 API Key

browsing-web

使用agent-browser进行交互式浏览器自动化。在导航动态网站、身份验证、点击、输入以及复杂状态导航时使用。请勿用于简单的只读文本提取。

person作者: jakexiaohubgithub

Browser Interaction Protocol

Core Loop (The Ref Pattern)

You interact with the browser using References (@refs) derived from snapshots, not CSS selectors.

  1. Navigate: agent-browser open "url"
  2. Snapshot: agent-browser snapshot -i (Gets accessibility tree with @e refs)
  3. Interact: agent-browser click @e1 (Uses ref from snapshot)

Critical Constraints

  1. Never Guess Selectors: You cannot guess @e1. You MUST run snapshot to see current refs.
  2. Interactive Only: Always use snapshot -i to filter non-interactive elements (saves tokens).
  3. Stateful: The browser persists between commands. You do not need to re-open.

Common Patterns

Navigation & extraction

agent-browser open "https://google.com"
agent-browser snapshot -i
# Output shows: [ref=e4] button "Search"
agent-browser fill @e2 "Claude Code"
agent-browser click @e4
agent-browser wait --load networkidle

Visual Verification

Only if structure is confusing:

agent-browser screenshot page.png