--- name: atr-browser description: Control browser, automate browser interactions, navigate to URLs, click on webpages, fill forms, take screenshots, inspect webpages, web scraping with browser, test websites manually, or interact with web pages programmatically using ATR browser server mode. Pairs with the atr-computer skill when a workflow needs the OS desktop too (drag-and-drop from the file manager, system dialogs, native apps). allowed-tools: Bash(atr browser:*) --- > **Companion skill — `atr-computer`** controls the OS desktop (mouse, keyboard, screen, windows, app launch, plus an in-process LLM agent via `atr computer ask`). Load both when: > > - The browser action needs an OS file picker, drag from the file manager, or anything outside the page (e.g. authentication via 1Password desktop app). > - You want a single high-level instruction to span web + desktop — `atr computer ask ""` can call `atr browser` along the way. > > Browser daemon listens on port 9333; computer daemon on 9334. Both can run simultaneously. # ATR Browser Automation Skill This skill provides browser automation capabilities through ATR's browser server mode. The browser server runs as a daemon process and accepts CLI commands for browser control. ## Architecture ``` Claude Code --> atr CLI (client) --> ATR Server + Browser ``` The browser runs in visible (non-headless) mode by default for debugging and verification. ## Getting Started ### Step 1: Check Browser Status and Start if Needed Before any browser operations, verify the browser server is running: ```bash atr browser status ``` If the server is not running, start it: ```bash atr browser start ``` The server stores state at `~/.atr/browser.state` which allows subsequent commands to discover the endpoint automatically. ### Step 2: Navigate and Interact Once running, use navigation and interaction commands to control the browser. ## Command Categories ### Lifecycle Commands | Command | Description | |---------|-------------| | `atr browser start [--port PORT]` | Start browser daemon (default port: 9333) | | `atr browser stop` | Stop browser daemon | | `atr browser status` | Check if browser is running | ### Navigation Commands | Command | Description | |---------|-------------| | `atr browser navigate ` | Navigate to URL | | `atr browser back` | Go back in history | | `atr browser forward` | Go forward in history | | `atr browser reload` | Reload current page | ### Page Management Commands | Command | Description | |---------|-------------| | `atr browser new-page [url]` | Open new tab | | `atr browser list-pages` | List all tabs | | `atr browser select-page ` | Switch to tab (0-based) | | `atr browser close-page ` | Close tab | ### Interaction Commands | Command | Description | |---------|-------------| | `atr browser click [--double]` | Click element (use --double for double-click) | | `atr browser fill ` | Type into input field | | `atr browser hover ` | Hover over element | | `atr browser press-key ` | Press keyboard key (e.g., Enter, Tab, Control+A) | | `atr browser drag ` | Drag element | | `atr browser wait [--timeout] [--visible]` | Wait for element to appear | | `atr browser scroll --selector "" [--y N] [--to-bottom]` | Scroll inside an element | | `atr browser download-images "" [--output-dir] [--fallback-screenshot]` | Download/screenshot images within elements | | `atr browser viewport [W H] [--preset mobile\|tablet\|desktop\|wide]` | Get or set viewport size | | `atr browser batch [--file F] [--on-error stop\|continue\|retry:N]` | Execute multiple commands from stdin/file | ### Recording Commands | Command | Description | |---------|-------------| | `atr browser record [--url URL] [-o FILE]` | Record browser interactions as a behavior test | ### Inspection Commands | Command | Description | |---------|-------------| | `atr browser snapshot [--verbose]` | Get page elements with UIDs | | `atr browser screenshot --file [--full] [-s SELECTOR]` | Capture screenshot (saves to /tmp/) | | `atr browser screenshot --file --selector-all ""` | Screenshot all matching elements | | `atr browser computed-styles "" [--properties]` | Get computed CSS styles for single element | | `atr browser computed-styles --selector-all ""` | Get computed CSS styles for all matching elements | | `atr browser computed-styles-diff "" --against N` | Compare styles between pages | | `atr browser text "" [--flat\|--links\|--headings]` | Extract text content | | `atr browser font-check ""` | Check if font is loaded and rendering | | `atr browser clean-snapshot "" [--depth N] [--max-length N]` | Get cleaned DOM subtree (no noise/tracking attrs) | | `atr browser computed-styles --selector "h1" --selector "p"` | Batch computed styles for multiple selectors | | `atr browser computed-styles-diff --selector "h1" --selector "p" --against 0` | Batch style diff with overall score | | `atr browser html` | Get page HTML | | `atr browser url` | Get current URL | | `atr browser title` | Get page title | | `atr browser eval