browser-automation
Reliable, composable browser automation using minimal OpenCode Browser primitives.
When & Why to Use This Skill
This Claude skill provides a robust and reliable framework for composable browser automation using OpenCode Browser primitives. It enables agents to perform complex web-based tasks by navigating pages, interacting with UI elements through precise index-based selection, and verifying state changes to ensure high success rates in dynamic web environments.
Use Cases
- Complex Web Navigation: Automating multi-step journeys across various websites, including managing multiple tabs and navigating through nested menus.
- Dynamic Data Extraction: Retrieving specific information from modern web applications that require user interactions like clicking buttons or selecting dropdown values before data is displayed.
- Automated Form Interaction: Filling out and submitting web forms reliably by identifying elements through text, value, or index, and confirming successful submission through state snapshots.
- Web-Based Task Orchestration: Executing end-to-end workflows such as setting up cloud resources, managing SaaS dashboard configurations, or performing routine web audits.
| name | browser-automation |
|---|---|
| description | Reliable, composable browser automation using minimal OpenCode Browser primitives. |
| license | MIT |
| compatibility | opencode |
| audience | agents |
| domain | browser |
What I do
- Provide a safe, composable workflow for browsing tasks
- Use
browser_querylist 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_tabwhen needed - Navigate with
browser_navigateif needed - Wait for UI using
browser_querywithtimeoutMs - Discover candidates using
browser_querywithmode=list - Click, type, or select using
index - Confirm using
browser_queryorbrowser_snapshot
Selecting options
- Use
browser_selectfor native<select>elements - Prefer
valueorlabel; useoptionIndexwhen needed - Example:
browser_select({ selector: "select", value: "plugin" })
Query modes
text: read visible text from a matched elementvalue: read input valueslist: list many matches with text/metadataexists: check presence and countpage_text: extract visible page text
Opening tabs
- Use
browser_open_tabto create a new tab, optionally withurlandactive - Example:
browser_open_tab({ url: "https://example.com", active: false })
Troubleshooting
- If a selector fails, run
browser_querywithmode=page_textto confirm the content exists - Use
mode=liston broad selectors (button,a,*[role="button"]) and choose by index - Confirm results after each action