/browsercontrol:browsercontrolfrom browsercontrol
Drives a live browser via the BrowserControl MCP server using numbered Set-of-Marks screenshots. Use for testing web apps, debugging UI bugs, filling forms, extracting data from interactive pages, or converting browsing sessions into Playwright tests.
Ships in browsercontrol. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Every page action returns a screenshot with numbered red boxes over the
interactive elements, plus a text map of them ([7] button - Sign in). You
act by number: click(7). Tool names here are unprefixed; use whatever prefix
your tool list shows (e.g. mcp__browsercontrol__click).
navigate_to, click, type_text, act, ...).Notice: lines above it.The task is done when the latest screenshot shows the outcome the user asked for (the confirmation page, the saved value, the error you were reproducing). A tool returning without an error is not proof.
1. An ID stays with its element. An element keeps its number across
actions, scrolls, and screenshots while it stays on the page; new elements get
new numbers, and numbering restarts on a new page. So 7 is still the same
button after you type elsewhere, and act can use IDs after earlier steps
changed the page. An ID whose element left the page or the view is refused as
stale, and the error response carries a fresh map to pick from.
2. No number means hidden, not absent. Only elements visible in the viewport and not covered by something else get numbered.
find("Delete account") searches the
whole page (iframes and shadow DOM too), scrolls to it, and reports its ID.
find("", role="button") lists every button.scroll("down").3. The text map is ground truth. It names icon-only buttons the image
cannot, marks disabled controls (disabled) (drawn grey), and shows input
types (input[checkbox]). It lists the first 30 elements; higher IDs still work.
| You want to | Use |
|---|---|
| Reach a known element below the fold | find(query) |
| Fill several fields that are all on screen | act([...]): one call, one screenshot |
| Wait for slow content | wait_for(text=...), or wait_for_response(url_pattern) right after the action that fires the request |
| Read a table, links, or repeated cards | extract_table, extract_links, extract(schema) |
| Read prose | get_page_content() (Markdown) or get_text(id) |
| Use sites the user is already signed in to | connect_to_chrome() (see recipe below) |
| A second user, or a clean signed-out state | create_session(name), then switch_session("default") to come back |
| A faithful phone (pixel ratio, mobile layout) | create_session(name, device="iPhone 13") |
| A quick size, user agent, or touch check | emulate_device("Pixel 7"); dark mode: set_color_scheme("dark") |
| See how the UI handles failure or slowness | mock_route(...), throttle_network("slow-3g") |
| Find out why a page is broken | get_page_errors → get_console_logs → get_network_requests → get_request_details(id) |
| Leave behind a regression test | start_recording → the flow → export_test(name) |
Use the numbers to act on the page, and keep run_javascript /
run_in_console for reading state and debugging. Use click_at(x, y) only for
a spot with no number, such as a canvas.
type_text replaces the field's contents. To append, read the value with
get_text(id) and type the combined text.select_option is for native <select> only. It matches the visible
label or the value and lists the available options when nothing matches. For a
custom dropdown, click it, then click the option in the fresh map.check_checkbox(id, check) sets the state. It doesn't toggle, so calling
it twice is safe.wait_for
only when something takes longer. A fixed wait(seconds) is the last resort.Notice: lines report what happened off-screen. JS dialogs are answered
automatically (alerts acknowledged, confirms and prompts cancelled) and
downloads are saved. If a cancelled confirm was wrong, call
handle_dialog(accept=True) and repeat the action. list_downloads() gives
the saved paths.clear_mocks(). Emulation stays until reset_emulation(), and
throttle_network("none") restores the network.screenshot(full_page=True) is never annotated. Use it to review layout,
not to find targets.Form in one round-trip. Read the IDs from one map, then:
act([{"action": "type", "element_id": 3, "text": "Ada"},
{"action": "type", "element_id": 4, "text": "[email protected]"},
{"action": "select", "element_id": 5, "option": "United Kingdom"},
{"action": "check", "element_id": 6, "checked": true}])
Click submit as a separate step, after checking the screenshot. Batch actions on one page only: a step after a navigation finds its element gone and fails as stale.
The user's logged-in Chrome. Ask the user to start Chrome with remote debugging and a dedicated profile (Chrome 136+ ignores the flag on the default one), and to sign in there once:
google-chrome --remote-debugging-port=9222 --user-data-dir="$HOME/.chrome-agent"
Then connect_to_chrome(). You get a tab of your own; leave the user's other
tabs as they are unless asked. disconnect_chrome() detaches without closing
anything.
Debug a broken page. get_console_logs(clear=True) first, so what follows
covers only the reproduction. Reproduce, then read errors, console, network
(each request line has a #id), and get_request_details(id) for the headers
and body of the suspicious one. inspect_element(id) gives computed styles and
the box.
Test an error or loading state.
mock_route("/api/cart", status=500, body='{"error": "boom"}')
click(<checkout>) → does the UI show a useful error?
clear_mocks()
throttle_network("slow-3g") → are loading states shown?
throttle_network("none")
Regression test from a session. start_recording("checkout") (this also
restarts the action log), do the flow, stop_recording(), then
export_test("checkout"), or language="typescript". Elements are located by
role, label, or text, and typed passwords become BC_SECRET_n environment
variables. Show the user the file: exploratory steps may need pruning.
| Symptom | Do this |
|---|---|
Element N not found / is stale | Take the ID from the fresh map in the same response |
| Target has no number | Rule 2: find, scroll, or dismiss the overlay |
Grey box / (disabled) | Fill in whatever the form still requires |
| Content still loading | wait_for(text=...) or wait_for(network_idle=True) |
Notice: says a confirm was cancelled | handle_dialog(accept=True), then repeat the action |
| Map looks out of date | screenshot() re-marks without changing the page |
Server settings (headless mode, viewport, profile directory, CDP URL, settle timeout) are environment variables documented at https://adityasasidhar.github.io/browsercontrol/reference/configuration.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub adityasasidhar/browsercontrol --plugin browsercontrolOther plugins' skills for the same job