AGENT SKILL
browser-automation
browser-automation 是面向测试与安全的 Agent Skill,来自 different-ai/agent-bank。查看技能说明、操作步骤与使用约定,并通过原项目了解详细用法。
Reliable, composable browser automation using minimal OpenCode Browser primitives.
| name | browser-automation |
|---|
| description | Reliable, composable browser automation using minimal OpenCode Browser primitives. |
|---|
| license | MIT |
|---|
| compatibility | opencode |
|---|
| metadata | {"audience": "agents", "domain": "browser"} |
|---|
What I do
- Provide a safe, composable workflow for browsing tasks
- Use
browser_query list and index selection to click reliably
- Confirm state changes after each action
Best-practice workflow
- Inspect tabs with
browser_get_tabs
- Open new tabs with
browser_open_tab when needed
- Navigate with
browser_navigate if needed
- Wait for UI using
browser_query with timeoutMs
- Discover candidates using
browser_query with mode=list
- Click, type, or select using
index
- Confirm using
browser_query or browser_snapshot
Selecting options
- Use
browser_select for native <select> elements
- Prefer
value or label; use optionIndex when needed
- Example:
browser_select({ selector: "select", value: "plugin" })
Query modes
text: read visible text from a matched element
value: read input values
list: list many matches with text/metadata
exists: check presence and count
page_text: extract visible page text
Opening tabs
- Use
browser_open_tab to create a new tab, optionally with url and active
- Example:
browser_open_tab({ url: "https://example.com", active: false })
Troubleshooting
- If a selector fails, run
browser_query with mode=page_text to confirm the content exists
- Use
mode=list on broad selectors (button, a, *[role="button"]) and choose by index
- Confirm results after each action
来源:different-ai/agent-bank · MIT 许可 · 许可原文 · MD 为来源页保存的历史版本