About wsl2-browser-setup
wsl2-browser-setup is a skill for setting up and diagnosing browser access in WSL2, for users who browse interactively or connect automation tools. It separates native Chrome, a Windows browser bridge, and the optional agent-browser layer.
Key features
- 01Set up native WSL Chrome
- 02Configure a Windows browser bridge
- 03Add the agent-browser layer
- 04Run non-mutating setup checks
- 05Consult troubleshooting guidance
Use cases
- 01Enable interactive browsing and sign-in in WSL
- 02Let WSL tools control Windows Chrome or Edge
- 03Diagnose existing browser and bridge setup
- 04Attach agent-browser to a verified browser
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ arthurzakirov/ agentdesk --skill wsl2-browser-setupAfter installing, type/wsl2-browser-setupin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
agents/openai.yamlreferences/agent-browser.mdarchitecture.mddead-ends.mdtroubleshooting.mdscripts/connect-windows-browser.shensure-portproxy.ps1ensure-wslconfig.ps1invoke-portproxy-admin.ps1launch-host-browser.ps1setup-agent-browser-runtime.shsetup-agent-browser-wsl2.shsetup-native-wsl-chrome.shsetup-windows-host-browser-bridge.shDetails
From the project READMEWSL2 Browser Setup
Use this skill for the complete WSL2 browser path, from browser availability through optional agent-browser setup.
Choose The Path
| Need | Start with | Success signal |
|---|---|---|
| Interactive browsing or sign-in inside WSL | Native WSL Chrome | Normal HTTPS sites and the target sign-in page render in Linux Chrome. |
| A WSL tool must control Windows Chrome or Edge | Windows host browser bridge | WSL reaches the bridge's /json/version endpoint. |
The requested client is agent-browser | First establish either browser path, then add the client layer | agent-browser opens or attaches to the chosen browser and returns a snapshot. |
Read references/architecture.md when the correct path is unclear.
Native WSL Chrome
Run:
bash "${CODEX_HOME:-$HOME/.codex}/skills/wsl2-browser-setup/scripts/setup-native-wsl-chrome.sh"
The script verifies WSL2, installs Linux google-chrome when needed, writes the standard Windows .wslconfig networking settings, and reports whether a WSL restart is needed.
After a configuration change, have the human run wsl --shutdown, reopen WSL, and launch google-chrome. In chrome://settings/security, turn Use secure DNS fully off; OS default (when available) is not off. Reopen Chrome and verify a normal HTTPS site plus the real target or sign-in page.
Windows Host Browser Bridge
Run:
bash "${CODEX_HOME:-$HOME/.codex}/skills/wsl2-browser-setup/scripts/setup-windows-host-browser-bridge.sh"
The script finds Windows Edge or Chrome, launches it with remote debugging, requests Windows elevation for the port proxy and firewall rule, and waits for the CDP endpoint to become reachable from WSL2. It exposes a generic browser endpoint; client attachment is a separate step.
agent-browser
Only add this layer after native Chrome browsing or the Windows bridge is proven. Read references/agent-browser.md for runtime installation, the interactive upstream-skill step, native checks, bridge attachment, and the compatibility wrapper.
Safe Checks
Use the non-mutating checks first when diagnosing an existing setup:
bash "${CODEX_HOME:-$HOME/.codex}/skills/wsl2-browser-setup/scripts/setup-native-wsl-chrome.sh" --check-only
bash "${CODEX_HOME:-$HOME/.codex}/skills/wsl2-browser-setup/scripts/setup-windows-host-browser-bridge.sh" --check-only
bash "${CODEX_HOME:-$HOME/.codex}/skills/wsl2-browser-setup/scripts/setup-agent-browser-runtime.sh" --check-only
Deeper Guidance
- Read
references/troubleshooting.mdwhen a browser launches but browsing, sign-in, bridge access, oragent-browserstill fails. - Read
references/dead-ends.mdbefore attempting low-level DNS, firewall, package, or client workarounds. - Use
scripts/setup-agent-browser-wsl2.shonly when the older one-shot Windows bridge flow is specifically useful.