Home / Guides / The Best Claude Code Tools and / Browser Automation in Claude Code: Let C
Guide

Browser Automation in Claude Code: Let Claude Test Its Own Work

Updated July 15, 2026 · 8 min read · mAInframe

Dev Browser, BrowserBC, and browse.sh: Claude Code browser automation that opens a real browser to verify front-end work before calling it done.

← Part of: The Best Claude Code Tools and Skills (2026)

The confident narrator problem

Claude Code will tell you a feature works. The build passed, the types checked, maybe a unit test went green. Then you open the page yourself and the modal doesn't close, the form eats your input, or the layout collapses at 375px. The agent wasn't lying to you. It never looked. By default it writes front-end code the way an editor proofreads a manuscript blindfolded: checking the grammar, never seeing the page.

That's the confident narrator problem. An agent that can write React, CSS, and API routes but never renders any of it in a real browser has no way to catch the class of bugs that only show up visually or interactively: a hover state that never fires, an element buried behind a z-index fight, a click handler wired to the wrong node, a form that submits and silently fails anyway. Type checkers and unit tests catch logic errors. They don't catch "this looks wrong" or "nothing happens when you click it."

Browser automation closes that gap. Give Claude Code a way to open a real, or real enough, browser, click through the flow it just built, and read back the DOM or a screenshot, and "I think this works" turns into "I opened it and confirmed it." That's the difference between an agent that narrates and one that verifies.

What browser automation buys you

Once Claude can see its own output, the whole loop changes shape. It stops guessing whether a CSS change actually fixed the overlap you flagged, because it can screenshot the before and after. It catches its own regressions mid-task instead of shipping them for you to find later. And it can run longer stretches of autonomous work, because self-correction against what it actually observes replaces self-correction against what it assumed.

The honest tradeoff: a browser session costs real tokens and wall-clock time. This is not a replacement for unit tests, and it's not something you want firing on every keystroke. It's the check you want between "Claude finished writing the code" and "Claude tells you it's done," specifically for anything a user would see or click. For the fuller shortlist of tools this fits into, see our guide to the best Claude Code tools.

Dev Browser: a full browser Claude can drive itself

The most complete option in this space right now is Dev Browser, built by Sawyer Hood and surfaced through the community-maintained awesome-claude-code list. It gives Claude Code the full Playwright API: navigate, click, fill forms, run locators, evaluate JS, take screenshots. On top of that it layers two tiers built for an agent rather than a human test author. A computer-use style pixel tier lets Claude look at an actual screenshot and click exact pixel coordinates. A DOM tier snapshots the page into a list of interactive elements with stable IDs, so Claude can click or scroll by ID without hand-writing a selector.

You can point Dev Browser at your own running Chrome, so Claude inherits your logged-in sessions and cookies, or let it spin up a disposable Chromium instance instead. Either way, the scripts Claude writes to drive the browser execute inside a sandbox rather than directly on your machine: no host filesystem access, no network calls beyond what the browser itself makes. That containment matters, because you're letting an agent write and run its own test scripts, and you want a hard wall around what those scripts can touch.

The project's own benchmark repo reports Dev Browser beating both a generic Playwright MCP server and a plain Playwright skill on the same tasks: faster completion, lower token cost, and fewer turns to finish. Treat that as the author's self-reported comparison rather than an independently audited number, but directionally it tracks: a persistent browser session and tools built specifically for how an agent works beat re-deriving generic Playwright calls through an MCP layer every single time.

This is the tool most solo builders should reach for first. It's the fastest path from "Claude has no browser access" to "Claude can see what it built."

Record once, run cheap: BrowserBC

Dev Browser solves "give the agent a browser." A separate problem is cost: driving a frontier model through every click of a repetitive flow, log in, navigate to settings, upload a file, confirm the toast, gets expensive if you're running it on every commit. BrowserBC, an open source project from the ViDA team, attacks that from a different angle: record the flow once with a human at the wheel, distill what happened into a reusable skill, then hand execution of that skill to a cheaper model going forward.

The idea is straightforward once you see it. A human clicking through a site produces a trajectory that already encodes the efficient path and the site-specific quirks, this dropdown needs a second click, that toast disappears in two seconds, that a model would otherwise have to rediscover expensively, one exploratory step at a time. BrowserBC uses a stronger model to turn a single recorded trajectory into a skill description, then hands that skill to a smaller, cheaper model to execute on future runs. In the project's own reported results on WebArena-Hard tasks, tool calls per task dropped from an average of 31.2 to 22.7, about a 27 percent cut, and the cheaper executing model's success rate rose well above its baseline without the distilled skill.

The practical version for your own workflow: if there's one verification flow you run constantly, say, log in, create a project, confirm it shows up in the list, it's worth recording it once and turning it into a skill rather than asking Claude to re-derive the steps from a prompt every single time.

Skill catalogs: browse.sh

Recording your own skills is one option. Not reinventing them is another. browse.sh, from Browserbase, is an open catalog of 100-plus pre-built browser skills for real, specific sites: functionality Claude would otherwise have to work out from scratch every run, burning tokens rediscovering the same selectors and quirks each time. The Browse CLI installs a skill directly, and each one is a markdown playbook plus whatever helper scripts it needs, capturing selectors, API endpoints, and known gotchas for that site.

This matters less for verifying your own app (nobody's published a skill for your unreleased SaaS) and more for anything Claude does against third-party sites on your behalf: checking a competitor's pricing page, filing something on a government portal, pulling data from a listing site. Browserbase's own example is concrete: a Craigslist search that costs roughly $0.22 per run with cold discovery drops to about $0.12 with the installed skill, close to a 50 percent cut, because the agent isn't paying to rediscover the DOM from zero. If Claude needs to reliably operate against an established site that isn't yours, check the catalog before asking it to improvise.

Wire it into your workflow

None of this changes anything if "open the page and check" stays optional. What actually moves outcomes is making browser verification a default step, not a favor Claude does when it happens to remember.

A few concrete moves:

  1. Install a browser skill (Dev Browser or another) at the project level, not as a one-off invocation, so it's available every session without you re-explaining it.
  2. Put a line in your project instructions that says something like: after any front-end change, open the affected page in the browser and confirm the change visually and interactively before reporting done. Explicit instructions beat implicit hope.
  3. For flows you check often, a signup flow, a checkout flow, a dashboard render, lean on the record-once pattern BrowserBC popularized: capture it once, let a cheaper model replay it going forward instead of paying full price every time.
  4. If the check itself is eating your main context window, hand it to a sub-agent instead of running it inline. That's exactly the kind of narrow, well-scoped job worth delegating; see our guide to Claude Code subagents for how to structure that handoff.

The pattern generalizes past browsers. It's the same shape as any other Claude Code skill: a repeatable capability you install once and reuse, instead of a trick you re-explain every session.

When it's overkill

Not every change needs a browser. A backend migration, a cron job, a pure logic refactor with solid unit test coverage, none of these benefit from clicking through a UI that didn't change. Spinning up a browser session costs tokens and wall-clock time, so reserve it for changes that touch what a user sees or clicks. And if you already have a Playwright suite you trust running end to end, a duplicate manual click-through from Claude is redundant, not rigor.

The close

An agent that writes front-end code and never opens a browser is guessing, confidently. Give it eyes, and "done" finally means something.

More in this guide
Sources
Dev Browser via awesome-claude-code

Every story, number, and link in your inbox.

The written brief from each episode, free, every morning.