Agent 浏览器
- 作者仓库星标 3,082
- 作者仓库 grok-cli
agent-browser
Use this skill when verification needs a real browser after the app is booted from the sandbox.
This project uses agent-browser on the host, not inside Shuru. The usual flow is:
- Start the app with sandboxed bash.
- Expose it through a forwarded localhost port.
- Use
agent-browseragainst that localhost URL.
Requirements
- The
agent-browserCLI must be installed and available onPATH. - Prefer
http://127.0.0.1:<port>or another explicit localhost URL. - Use a named browser session when there is any chance of concurrent runs.
Core flow
agent-browser --session verify open http://127.0.0.1:3000
agent-browser --session verify wait --load networkidle
agent-browser --session verify snapshot -i
After any click or navigation, re-snapshot before using old refs again.
Common commands
# Open and wait for readiness
agent-browser --session verify open <url>
agent-browser --session verify wait --load networkidle
# Inspect the page
agent-browser --session verify snapshot -i
agent-browser --session verify get title
agent-browser --session verify get url
# Interact with elements from snapshot refs
agent-browser --session verify click @e1
agent-browser --session verify fill @e2 "text"
agent-browser --session verify press Enter
# Record the smoke test as video
agent-browser record start .grok/verify-artifacts/verify-smoke.webm
# Capture screenshot proof (use --screenshot-dir, not a positional path)
mkdir -p .grok/verify-artifacts
agent-browser --screenshot-dir .grok/verify-artifacts screenshot
agent-browser --screenshot-dir .grok/verify-artifacts screenshot --full
# Stop recording and clean up
agent-browser record stop
agent-browser close
Guidance
- Keep browser checks narrow in phase 1: page load, one or two critical controls, and optional screenshot evidence.
- Save screenshots to stable workspace-relative paths under
.grok/verify-artifacts/so verify can report them back to the user. - Prefer
wait --load networkidleafteropen. - If the page is dynamic, use
snapshot -iagain after each meaningful DOM change. - If the target URL is ambiguous because multiple forwarded ports exist, stop and report the ambiguity instead of guessing.
- If
agent-browseris unavailable, fall back to bash-only verification and say so clearly.
- 流狐分类
- AI 智能
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @superagent-ai · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 即装即用
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 The agent-browser CLI must be installed and available on PATH. Prefer http://127.0.0.1:<port> or another explicit localhost URL. Use a named browser session when there is any chance of concurrent runs.
After any click or navigation, re-snapshot before using old refs again.
Common commands
Keep browser checks narrow in phase 1: page load, one or two critical controls, and optional screenshot evidence. Save screenshots to stable workspace-relative paths under .grok/verify-artifacts/ so verify can report them back to the user.
# agent-browser
Use this skill when verification needs a real browser after the app is booted from the sandbox.
This project uses `agent-browser` on the host, not inside Shuru. The usual flow is:
1. Start the app with sandboxed bash.
2. Expose it through a forwarded localhost port.
3. Use `agent-browser` against that localhost URL.
## Requirements
- The `agent-browser` CLI must be installed and available on `PATH`.
- Prefer `http://127.0.0.1:<port>` or another explicit localhost URL.
- Use a named browser session when there is any chance of concurrent runs.
## Core flow
```bash
agent-browser --session verify open http://127.0.0.1:3000
agent-browser --session verify wait --load networkidle
agent-browser --session verify snapshot -i
```
After any click or navigation, re-snapshot before using old refs again.
## Common commands
```bash
# Open and wait for readiness
agent-browser --session verify open <url>
agent-browser --session verify wait --load networkidle
# Inspect the page
agent-browser --session verify snapshot -i
agent-browser --session verify get title
agent-browser --session verify get url
# Interact with elements from snapshot refs
agent-browser --session verify click @e1
agent-browser --session verify fill @e2 "text"
agent-browser --session verify press Enter
# Record the smoke test as video
agent-browser record start .grok/verify-artifacts/verify-smoke.webm
# Capture screenshot proof (use --screenshot-dir, not a positional path)
mkdir -p .grok/verify-artifacts
agent-browser --screenshot-dir .grok/verify-artifacts screenshot
agent-browser --screenshot-dir .grok/verify-artifacts screenshot --full
# Stop recording and clean up
agent-browser record stop
agent-browser close
```
## Guidance
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Requirements → Core flow → Common commands → Guidance
要点 -> Use this skill when verification needs a real browser after the app is booted from the sandbox. · This project uses agent-browser on the host, not inside Shuru. · 1. Start the app with sandboxed bash. · - The agent-browser CLI must be installed and available on PATH. · After any click or navigation, re-snapshot before using old refs again. · - Keep browser checks narrow in phase 1: page load, one or two critical controls, and optional screenshot evidence.
文件/命令 -> agent-browser · PATH · http://127.0.0.1:<port> · .grok/verify-artifacts/ · wait --load networkidle · open · snapshot -i
内容 SHA-256 -> 0ef65b37de27
原文结构
适用与边界
原文中的明确线索
agent-browser、PATH、http://127.0.0.1:<port>、.grok/verify-artifacts/、wait --load networkidle、open、snapshot -i