Dev Browser Plugin¶
Browser automation for Claude Code, built on the Playwright Python API. Navigate websites, fill forms, take screenshots, test web applications, and scrape data with short, incremental scripts and a persistent session profile.
Version 1.0.0¶
No background server, no Node toolchain, no browser extension β a single small Python helper (scripts/browser.py) plus the Playwright library. The browser runs with a persistent profile, so cookies and logins survive across separate script runs.
Skill¶
dev-browser¶
Drive a real Chromium browser one focused step at a time: write a small script, run it, read the printed state, decide the next step. Once a flow is proven, fold it into a single script.
Features:
- π Persistent session β cookies and logins carry over between scripts
- π³ YAML accessibility-tree snapshots for robust, role-based element targeting
- πΈ Screenshot capture for visual feedback
- πΈοΈ Network request interception for efficient, paginated scraping
- π Honours an ambient
HTTPS_PROXYand auto-detects a pre-installed Chromium (works out-of-the-box in Claude Code web)
Trigger phrases: "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website", "log into".
Setup¶
| Bash | |
|---|---|
Quick Start¶
| Bash | |
|---|---|
Helper API (scripts/browser.py)¶
| Symbol | Description |
|---|---|
browser(headless=True, viewport=(1280, 800)) | Context manager yielding a persistent-profile Playwright Page |
snapshot(page, selector="body", max_chars=6000) | YAML accessibility tree for element discovery |
The yielded page is a standard Playwright Page.
Environment variables: DEV_BROWSER_PROFILE (profile dir), DEV_BROWSER_CHROMIUM (explicit Chromium path), HTTPS_PROXY (honoured if set).
Element Discovery¶
snapshot(page) returns the accessibility tree β roles and accessible names β which you target by role and name rather than brittle CSS:
| Python | |
|---|---|
Scraping¶
For large datasets, intercept and replay the page's own API calls instead of scrolling the DOM. The skill's references/scraping.md covers request capture, schema discovery, and paginated replay using page.request (which reuses the browser's authenticated session).
Self-check¶
Network-free: exercises browser launch, DOM, accessibility snapshot, a fill/click round-trip, and a screenshot against a data: URL.
Installation¶
Attribution¶
Inspired by SawyerHood/dev-browser (MIT). Reimplemented on the Playwright Python API for the Talent Factory marketplace.