Give your AI coding agent eyes. Let it open a browser, see what's on the page, click buttons, fill forms, read console errors — and fix what's broken — all without leaving the terminal.
Works with Claude Code, Codex, and any CLI-based agent that can run shell commands.
Requires cmux — a free, open-source macOS terminal with a built-in WebKit browser. Download cmux
Build and verify in one shot — The agent writes a component, opens the browser, snapshots the page, and confirms it renders correctly. No more "it works on my machine" — the agent checks its own work.
Debug visually — Page blank after a deploy? The agent opens it, reads console errors and JS exceptions, traces the bug to the source, fixes it, reloads, and confirms the fix. All in one loop.
Drive full user flows — Login, checkout, onboarding — the agent fills forms, clicks through steps, waits for redirects, and verifies the final state. Like an E2E test, but ad hoc and in natural language.
Inspect anything — Accessibility tree snapshots, screenshots, element queries, computed styles, cookie values, localStorage — the agent can read whatever it needs from the page.
Run JavaScript — Eval expressions, inject scripts, add styles. The agent can poke at window state, trigger app-level functions, or hide debug banners.
browser/SKILL.md is a single self-contained file with the complete CLI reference:
| Category | Commands |
|---|---|
| Navigation | open, open-split, navigate, back, forward, reload |
| Waiting | wait --load-state, --selector, --text, --url-contains, --function |
| DOM interaction | click, dblclick, hover, fill, type, press, select, check, scroll |
| Inspection | snapshot, screenshot, get, is, find, highlight |
| JavaScript | eval, addscript, addinitscript, addstyle |
| Session state | cookies, storage, state save/load |
| Tabs & frames | tab list/new/switch/close, frame |
| Console & errors | console list, errors list |
| Dialogs & downloads | dialog accept/dismiss, download |
| General cmux | workspaces, splits, notifications, sidebar status |
You: Build a signup form with email and password fields.
Agent: (writes the component, then) Let me verify it renders correctly... (opens
http://localhost:3000/signupin a split, takes a snapshot, confirms the form fields are present, fills them in, submits, and checks for the success message)
You: The dashboard is showing a blank screen after the last deploy.
Agent: Let me check what's happening... (opens the page, runs
errors listandconsole list, finds aTypeError: Cannot read properties of undefined, traces it to the code, fixes it, reloads, and confirms it renders)
You: Make sure the login flow works after your auth changes.
Agent: I'll walk through it... (opens the login page, fills email and password, clicks submit, waits for the redirect, snapshots the dashboard to confirm the user is logged in)
You: What does the pricing page look like?
Agent: (opens
/pricingin a split, takes a screenshot, and reads the accessibility tree to describe the layout and content)
Open Claude Code (or Codex, or any agent) and tell it:
Download
https://raw.githubusercontent.com/darkspock/cmux-skill/main/browser.mdand save it to~/.claude/skills/browser/SKILL.md
For Codex, tell it to save it as browser.md in your project root and reference it in AGENTS.md.
Important: Restart your agent after installing. Skills are loaded at startup, so you need a fresh session for /browser to become available.
If you want it scoped to a single project (shared with your team), save it to .claude/skills/browser/SKILL.md in the project root and commit it.
Global (all projects):
mkdir -p ~/.claude/skills/browser && curl -fsSL https://raw.githubusercontent.com/darkspock/cmux-skill/main/browser.md -o ~/.claude/skills/browser/SKILL.mdProject-scoped (shared with your team):
mkdir -p .claude/skills/browser && curl -fsSL https://raw.githubusercontent.com/darkspock/cmux-skill/main/browser.md -o .claude/skills/browser/SKILL.mdImportant: Restart your agent after installing for the skill to be available.
Full command reference: SKILL.md
Official cmux docs: cmux.dev/docs/browser-automation
MIT