agent-browserlisted
Install: claude install-skill mifunedev/openharness
# Agent Browser
Open a URL in the headless browser. Runs a health check first — if the browser is broken, errors out with a full diagnostic trace so the user can fix it.
## Instructions
### Step 1 — Parse arguments
Arguments received: `$ARGUMENTS`
- **URL**: `$0` (required)
- **VIEWPORT**: value after `--viewport` flag if present. Default: `desktop`
- **SESSION**: value after `--session` flag if present (optional, for session isolation)
If URL is missing, ask the user to provide it.
### Viewport defaults
| Name | Width | Height |
|------|-------|--------|
| `desktop` | 1280 | 720 |
| `mobile` | 414 | 896 |
Default is `desktop` if `--viewport` is not specified.
### Step 2 — Preflight health check
Run each check sequentially. If any check fails, **stop immediately** and report the full diagnostic trace to the user.
#### 2a. Check agent-browser is installed
```bash
command -v agent-browser && agent-browser --version 2>&1 || echo "FAIL: agent-browser not found in PATH"
```
If not found, install it — **use npm (not pnpm)** and **pin to 0.8.5**:
```bash
sudo npm install -g agent-browser@0.8.5
```
Then install Chromium + system deps. `agent-browser install --with-deps`
shells out to a `playwright` binary that isn't bundled with this package,
so on a fresh image you'll also need the playwright CLI available:
```bash
agent-browser install --with-deps # installs system libs (apt)
# If it ends with "sh: 1: playwright: not found":
sudo npm install -g playwright@latest