browser-control

Drive signed-in Microsoft Edge on Windows from WSL via Chrome DevTools Protocol.

Updated Jul 4, 2025
One-click install
npx skills add https://github.com/milespossing/nixdots --skill browser-control-milespossing
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: browser-control
Source: https://github.com/milespossing/nixdots/tree/main/modules/agents/_skills/browser-control
Command: npx skills add https://github.com/milespossing/nixdots --skill browser-control-milespossing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, and includes scripts (resource) and references (resource) components.

What problem does it solve? Sites protected by Microsoft AAD, MFA, or corporate conditional access cannot be scraped or screenshotted from a fresh headless browser in WSL because the user's authenticated session lives in their Windows Edge profile. This Skill bridges WSL to the user's real, signed-in Edge browser over CDP so agents can open pages, list tabs, and capture content without re-authenticating. ## Core Features & Use Cases - Idempotent bootstrap: bootstrap.sh auto-detects the Windows username, Edge executable, and Windows Python, launches Edge with a dedicated CDP profile, starts a TCP forwarder, and prints the CDP URL. - Tab and capture helpers: open_url.py, list_tabs.py, and capture_page.py open or focus tabs, enumerate open tabs, and save HTML, text, and full-page screenshots with scrolling and accordion expansion. - Composable by other skills: Other skills can shell out to the helper scripts or import the _wbc.py Python helpers (connect, find_page, open_or_focus) via $AGENTS_SKILLS_DIR. - Use Case: An agent needs to screenshot an internal engineering docs page behind AAD. It runs bootstrap, asks the user to sign in once in the Edge window, then captures the page as HTML, text, and PNG. ## Quick Start Ask the agent to load the browser-control skill, run bootstrap.sh to get a CDP URL, then open and capture the target page in your signed-in Edge browser.

Frequently Asked Questions about browser-control

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I control Microsoft Edge from WSL with Playwright?▼

Run bootstrap.sh from the skill's scripts directory, which launches Edge with a remote debugging port and a Windows-side TCP forwarder, then prints a CDP URL. Pass that URL to the helper scripts or to Playwright's chromium.connect_over_cdp to drive the browser.

How to scrape a website that requires Microsoft AAD or MFA login?▼

Connect to the user's existing signed-in Edge profile over CDP instead of launching a fresh headless browser. The dedicated CDP profile retains cookies between runs, so the user signs in once and subsequent captures reuse the authenticated session.

Can WSL connect to a browser running on the Windows host?▼

Yes, but not directly to Windows localhost because WSL2 NAT cannot reach it. This skill runs a small Python TCP forwarder on Windows that binds 0.0.0.0:9223 and relays to Edge's 127.0.0.1:9222 CDP port, reachable via the default-route host IP.

Why does connect_over_cdp fail or show no browser contexts?▼

This happens when Edge is not running with the CDP profile or all its windows were closed. Rerun bootstrap.sh, which is idempotent and reopens an about:blank window for the profile, then verify reachability with curl against the forwarded port.

When should I not use this browser bridge?▼

Do not use it for public-web fetches, where a plain web_fetch call is cheaper and faster. It is intended only for pages that require the user's existing authenticated Windows browser session or a headed Edge instance.