owenleezy/agent-browser-skill/agent-browser-commands

Claude Code and agent skill by owenleezy/agent-browser-skill

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

[INTERNAL TEMPLATE] Command reference for agent-browser CLI. Used by agent-browser orchestrator during execution.

Install

npx vskill@latest install owenleezy/agent-browser-skill/agent-browser-commands

SKILL.md

The same SKILL.md was published earlier as owenleezy/agent-browser-skill/agent-browser-commands.

Agent Browser — Command Reference

Internal reference. For browser automation tasks, use agent-browser skill as entry point.

Navigation

CommandDescription适用场景
open <url>Navigate to URL (supports chrome:// and chrome-extension://)所有任务起点
back / forwardBrowser history多页流程回溯
reloadRefresh page强制刷新状态
closeClose browser任务结束清理

Discovery

CommandDescription适用场景
snapshotAccessibility tree with refs获取交互元素引用
snapshot -iInteractive elements only聚焦可操作元素
snapshot -cCompact (less noise)大页面减少输出噪音
snapshot -d <n>Limit tree depth只看顶层结构
snapshot -s <sel>Scope to CSS selector弹窗/局部区域聚焦

Interaction

CommandDescription适用场景
click @e1Click element按钮/链接触发
dblclick @e1Double-click element可编辑单元格/选中文本
fill @e1 "text"Clear and fill input表单输入(替换原值)
type @e1 "text"Type without clearing (appends)追加内容/受控组件
keyboard type "text"Type into focused element — fires keydown/keypress/input/keyup per character, but does NOT reliably trigger document-level keydown listeners; use eval dispatchEvent(new KeyboardEvent(...)) for document-scoped event handlers焦点已在目标时输入
keyboard inserttext "text"Insert text bypassing ALL key events (no keydown/keypress/keyup fired)绕过键盘事件拦截直接插入文本
press <key>Press named key: Enter, Tab, Control+a, ArrowDown提交表单/快捷键/方向键
focus @e1Focus element聚焦后再 keyboard type
check @e1 / uncheck @e1Checkbox/radio复选框/单选操作
select @e1 "option"Dropdown selection<select> 下拉菜单
hover @e1Mouse hover触发悬停菜单/Tooltip
drag @e1 @e2Drag source element onto target — uses Playwright's pointer-based drag; works for mouse-event draggable libraries (Sortable.js, jQueryUI). Does NOT dispatch HTML5 DragEvent (dragstart/dragover/drop); for HTML5 Drag API use eval to dispatch DragEvent manually看板排序/指针拖拽
upload @e1 <file>Upload file文件上传表单
download @e1 <path>Download file by clicking element导出按钮触发下载
scroll downScroll page (up/down/left/right)触发懒加载/加载更多
scroll down --selector ".modal"Scroll within a specific container弹窗内容滚动
scrollintoview @e1Scroll element into view元素不在视口时点击前
Dialog
CommandDescription适用场景
dialog acceptAccept alert/confirm dialog确认操作类弹窗
dialog accept "text"Accept prompt dialog with inputPrompt 输入后确认
dialog dismissDismiss/cancel dialog取消操作/关闭 alert
dialog statusCheck if a dialog is currently open断言弹窗是否存在

Mouse (fine control)

Dispatches pointer/mouse events at pixel coordinates. Use for canvas, drawing apps, and CSS/pointer-event-based draggable components. Does NOT trigger HTML5 Drag API events (dragstart/dragover/drop) — those require eval DragEvent.

CommandDescription适用场景
mouse move <x> <y>Move mouse to coordinatesCanvas/绘图应用
mouse down [btn]Mouse button down拖拽起点
mouse up [btn]Mouse button up拖拽终点
mouse wheel <dy> [dx]Scroll wheel精确滚动量控制

Get Info

CommandDescription适用场景
get text @e1Get element text断言显示内容
get html @e1Get inner HTML复杂结构检查
get value @e1Get input value表单当前值验证
get attr @e1 hrefGet attribute链接/data属性检查
get title / get urlPage info导航后路由验证
get count "selector"Count matching elements列表条目数量断言
get box @e1Bounding box (x, y, width, height)精确坐标/截图裁剪
get styles @e1Computed stylesCSS 样式调试
get cdp-urlCDP WebSocket URL for the active page高级 CDP 调试

State Check

CommandDescription适用场景
is visible @e1Check if visible元素显示断言
is enabled @e1Check if enabled按钮可交互断言
is checked @e1Check if checked复选框状态断言

Waiting

CommandDescription适用场景
wait @e1Wait for element to appear异步内容渲染
wait @e1 --state hiddenWait for element to disappearLoading spinner 消失
wait @e1 --state detachedWait for element to be removed from DOM弹窗关闭后继续
wait 1000Wait millisecondsCSS 过渡动画完成
wait --load networkidleWait for network to be idle页面加载/导航后
wait --url "**/dashboard"Wait for URL to match pattern登录后跳转验证
wait --fn "window.ready"Wait for JavaScript expression to be truthy自定义加载完成信号
wait --text "Welcome"Wait for text to appear on page异步文字渲染
wait --download [path]Wait for a download to complete触发下载后等待完成

Capture

CommandDescription适用场景
screenshot [path]Take screenshot当前视口快照
screenshot --fullFull page screenshot完整页面记录/证据
screenshot --annotateAnnotated screenshot with numbered labelsBug报告/文档截图
pdf <path>Save as PDF生成可打印报告

Screenshot options: --screenshot-dir <path> (default dir), --screenshot-quality <0-100> (JPEG), --screenshot-format png|jpeg


Diff & Visual Regression

diff snapshot
bash
agent-browser diff snapshot # vs last snapshot in session
agent-browser diff snapshot --baseline before.txt # vs saved snapshot file
agent-browser diff snapshot -s ".sidebar" # scope to selector
agent-browser diff snapshot -c -d 3 # compact + depth limit

适用场景:DOM 结构变化检测,前后对比

diff screenshot
bash
agent-browser diff screenshot --baseline before.png
agent-browser diff screenshot --baseline before.png --output diff.png --threshold 0.1
agent-browser diff screenshot --baseline before.png -s "#main-content" --full

适用场景:视觉回归测试,--threshold 0~1(默认 0.1,越小越严格)

diff url
bash
agent-browser diff url https://staging.example.com https://prod.example.com
agent-browser diff url https://v1.example.com https://v2.example.com --screenshot --full
agent-browser diff url <u1> <u2> --wait-until networkidle

适用场景:跨环境/版本对比,--screenshot 同时对比截图


Debug

CommandDescription适用场景
inspectOpen Chrome DevTools (CLI still works)交互式调试
consoleView console logs查看 JS 输出
console --pattern "err"Filter console logs快速定位错误日志
console --clearClear console log buffer重置观察窗口
errorsView JavaScript errors最先查,覆盖 80% 问题
errors --clearClear error buffer重置错误计数
highlight <sel>Highlight element visually可视化确认定位
network requestsView all network requests全量 API 调用记录
network requests --filter "api"Filter by URL pattern聚焦特定接口
network requests --type xhr,fetchFilter by resource type只看 XHR/Fetch
network requests --method POSTFilter by HTTP method只看写操作
network requests --status 4xxFilter by status code快速找失败请求
network requests --clearClear network log重置记录
network request <requestId>View full request + response body查完整 payload
network har start [path]Start HAR recording完整网络追踪起点
network har stopStop and save HAR file导出供 DevTools 分析
trace start [path]Start Playwright trace recordingPlaywright 调试追踪
trace stopStop trace用 Playwright Trace Viewer 打开
profiler start [path]Start Chrome DevTools profiler性能分析
profiler stopStop profiler导出性能报告
record start <path> [url]Start video recording (WebM)录制演示/Bug 复现
record stopStop and save video保存视频
record restart <path> [url]Stop current + start new recording重新录制(重拍)
eval "JS code"Execute JavaScript自定义查询/状态注入
clipboard readRead clipboard content验证复制结果
clipboard write "text"Write to clipboard注入剪贴板数据
clipboard copy <sel>Copy element text to clipboard提取内容
clipboard paste <sel>Paste clipboard into element粘贴到输入框

Network Mocking

CommandDescription适用场景
network route "**/*.png" --abortBlock matching requests屏蔽图片/广告加速加载
network route "**/api/**" --body '{"ok":true}'Mock response body测试特定 API 响应
network unroute [url]Remove route (all if no url)恢复真实网络

Storage

CommandDescription适用场景
cookiesView all cookies会话状态检查
cookies set <name> <val> --domain example.com --secure --httpOnlySet cookie注入 Auth 令牌
cookies clearClear all cookies重置会话状态
storage localView localStorage查看持久化数据
storage local get <key>Get localStorage key读取特定 key
storage local set <key> <val>Set localStorage key注入 token/配置
storage local clearClear localStorage重置前端状态
storage session get <key>SessionStorage (same API)会话级数据操作

Tabs

CommandDescription适用场景
tab newOpen new tab多标签流程
tab listList all tabs in current browser context查看已知标签
tab <n>Switch to tab by index (0-based)切换到目标标签
tab close <n>Close tab by index关闭辅助标签
`target="_blank"` 限制:点击 target="_blank" 链接时,浏览器可能在新的 BrowserContext 中打开,agent-browser 的 tab list 只跟踪当前 context 内的标签。如果新标签没有出现在 tab list 中,改用 tab new + open <url> 手动管理。

Sessions

CommandDescription适用场景
sessionShow current session name确认当前会话
session listList active sessions多会话并发查看

Auth Vault

Save and reuse login credentials — avoids manual login in every E2E run:

bash
# Save once
agent-browser auth save myapp --url http://localhost:5173/login --username admin --password secret
# Reuse in any test (auto-fills and submits login form)
agent-browser auth login myapp
# Manage
agent-browser auth list
agent-browser auth show myapp
agent-browser auth delete myapp
Credentials are encrypted with AES-256-GCM (AGENT_BROWSER_ENCRYPTION_KEY). Prefer --password-stdin over --password to avoid shell history exposure.

Batch Execution

Execute multiple commands from stdin as a JSON array — more efficient than sequential shell calls:

bash
echo '[["fill","@e1","user@example.com"],["fill","@e2","pass"],["click","@e3"]]' | agent-browser batch
agent-browser batch --bail # stop on first error (default: continue all)

Confirmation

For actions that require explicit approval (when --confirm-actions is set):

CommandDescription适用场景
confirm <id>Approve a pending action审批写操作
deny <id>Deny a pending action拒绝危险操作

Device / Emulation

CommandDescription适用场景
set viewport <w> <h>Set viewport size响应式测试
set viewport <w> <h> <scale>Set viewport with device pixel ratioRetina 屏测试
set device "iPhone 15 Pro"Preset device emulation移动端完整模拟
set geo <lat> <lng>Set geolocation地理位置功能测试
`set offline [on\off]`Toggle offline mode (always restore with `set offline off`)PWA/离线模式测试
set headers <json>Set HTTP headers scoped to page origin注入 Authorization
set credentials <user> <pass>HTTP basic authBasic Auth 站点
set media darkDark mode暗色主题测试
set media dark reduced-motionDark + reduced motion无障碍测试

iOS Simulator (requires Xcode + Appium): use -p ios flag

bash
agent-browser -p ios open http://localhost:3000
agent-browser -p ios --device "iPhone 15 Pro" snapshot
agent-browser -p ios device list
agent-browser -p ios swipe up

Setup

CommandDescription适用场景
installDownload Chromium (first time setup)首次安装
install --with-depsAlso install system dependencies (Linux)Linux CI 环境
upgradeUpgrade agent-browser to latest (npm only; Homebrew: brew upgrade agent-browser)版本更新

Semantic Locators (find)

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
4
7-day trend score
8

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/owenleezy/agent-browser-skill/agent-browser-commands/badge)](https://verified-skill.com/skills/owenleezy/agent-browser-skill/agent-browser-commands)

Something wrong with this skill or its page? Tell us.