--- name: "advai-browser" description: "Drives browser automation with `advai browser` for navigation, DOM actions, extraction, screenshots, cookies, tabs, and network capture. Invoke when a task needs live browser interaction or web scraping." --- # Advai Browser Use this skill to operate a live browser through `advai browser`. ## When to Invoke Invoke this skill when the user wants to: - Open or navigate real web pages - Click, type, fill, select, or scroll in a browser - Read DOM content, extract structured data, or execute JavaScript - Capture screenshots, inspect cookies, or manage tabs - Scrape public web content or validate browser-side behavior Do not use this skill for static codebase inspection or for platforms that already have a more specific native skill. ## Preconditions Before running browser actions: 1. This skill depends on the `advai` CLI from `https://github.com/Advai-X/advai-cli`. 2. Ensure `advai` is installed and available on PATH. 3. Ensure the `advai browser` subcommand is available in the current installation. 4. If `advai browser` is missing, stop and guide the user to install or upgrade `advai` from `https://github.com/Advai-X/advai-cli` before continuing. 5. Ensure the browser extension/runtime is installed and connected. 6. Start with: ```bash advai browser doctor ``` If browser support is unavailable, surface the doctor output and explain what is missing. ## Core Workflow Use a named session for each task, for example `demo`, `zhihu`, `checkout`, or `research`. Basic flow: ```bash advai browser open demo https://example.com advai browser wait demo --selector "h1" advai browser get demo advai browser exec demo "document.title" ``` Reuse the current tab instead of creating a new one: ```bash advai browser open demo https://example.com --replace ``` Important behavior: - `open` creates a new tab by default - `open --replace` reuses the current tab when the session already has one - If the session has no active page, `open --replace` falls back to opening a new tab - Tabs are not closed automatically after the action completes ## Common Commands Open and navigate: ```bash advai browser open advai browser open --replace advai browser navigate advai browser state ``` Interact with the page: ```bash advai browser click advai browser type advai browser fill advai browser select