Use this skill when OpenClaw runs in WSL2/Linux but should work in a visible Windows 11 Edge/Chrome browser that the human can watch, use, and take over.
This is for legitimate assisted browsing in a normal visible browser session. Do not use it to bypass site protections, automate prohibited activity, or hide automation from the user.
Before state-changing actions, state what/where/risk/rollback and wait for explicit confirmation. State-changing actions include editing OpenClaw config, creating Scheduled Tasks, changing Windows firewall/portproxy, starting/stopping browser processes, writing scripts outside the workspace, sending forms/messages, purchases, or account actions.
ClawScan risk mitigations to preserve:
Unregister-ScheduledTask.Prefer visible browser automation when the task benefits from:
web_fetch or a fresh/headless browser.Use safe wording: this skill gives the agent access to a normal visible browser while keeping the human in the loop. It does not try to bypass anti-bot systems.
Visible browser control is expensive: it consumes tokens, Edge/Chrome memory, and CDP stability budget. Before using the visible browser, prefer cheaper tools when they satisfy the task.
Use the cheapest sufficient tool, in this order:
clawhub, openclaw, curl, source-specific tools).web_fetch for readable public pages.evaluate for structured extraction from an already-open page.If the user explicitly asks to open a site/tab in the visible browser, do not debate whether the browser is necessary. Still check basic safety/resource risk first and report if opening another tab may overload the browser.
Treat all tabs that existed before the current task as user state.
Classify tabs mentally:
browser-tabs-YYYY-MM-DD.md; safe to close only after user approval.Before non-trivial visible-browser work, estimate both memory budget and CDP complexity budget. Prefer the helper:
{baseDir}/scripts/browser-budget-check.sh win-edge
If the helper is unavailable, inspect CDP directly:
WIN_IP=$(ip route | awk '/default/ {print $3; exit}')
curl -sS --max-time 8 "http://$WIN_IP:9223/json/list"
Decision inputs:
page, iframe, and worker target counts;Approximate planning costs:
Memory rule of thumb:
CDP complexity stop rules:
targets > 30: stop and propose inventory/cleanup;pages > 10: caution; avoid opening more tabs unless explicitly needed;iframe + worker > max(6, pages * 2): stop; the site is spawning too much browser state;targetId, Execution context destroyed, or timeout errors: refresh target inventory instead of retrying blindly.Do not use the browser as task memory.
evaluate to extract structured data; use snapshots only when the UI structure is unknown.At the end of a browser task:
browser-tabs-YYYY-MM-DD.md, candidates.md, sources.md, progress.md, etc.).For cleanup of a polluted browser session, first create a read-only inventory grouped by domain/type, deduplicate URLs, and write it to the project. Only after that, ask permission to close the relevant domain/targets.
Use a dedicated Windows browser profile by default. Use the user's personal browser profile only when the user explicitly wants existing personal cookies/logins/tabs.
OpenClaw Gateway in WSL2
→ OpenClaw browser profile (example: win-edge)
→ http://WINDOWS_WSL_GATEWAY_IP:9223
→ Windows portproxy/firewall relay
→ 127.0.0.1:9222
→ visible Windows 11 Edge/Chrome profile
Recommended defaults:
win-edge or win-chrome92229223C:\ProgramData\OpenClaw\browser-profileOpenClaw-Start-Windows-Browser-CDPFor implementation details, read {baseDir}/references/setup.md.
Run read-only checks before repair:
openclaw browser profiles
openclaw browser --browser-profile win-edge doctor
WIN_IP=$(ip route | awk '/default/ {print $3; exit}')
curl -sS --max-time 5 "http://$WIN_IP:9223/json/version"
Or use the bundled helper:
{baseDir}/scripts/check-win11-visible-browser.sh win-edge
If CDP works, smoke-test real browser control:
openclaw browser --browser-profile win-edge open https://example.com
openclaw browser --browser-profile win-edge snapshot --format aria
Repair in layers and stop when the layer works:
127.0.0.1:9222.0.0.0.0:9223 → 127.0.0.1:9222.cdpUrl pointing to the WSL-visible Windows endpoint and attachOnly: true.The bundled Windows repair script is {baseDir}/scripts/start-win11-browser-cdp-for-openclaw.ps1. Treat it as a template: review paths, profile name, browser path, ports, and firewall rule names before installing or running it.
No supported browser found: WSL cannot launch Windows Edge/Chrome as a local Linux browser; use remote CDP.browser.profiles..cdpUrl or rerun the documented repair flow.When done, report:
openclaw browser --browser-profile doctor result;/json/version result from WSL;For structured data extraction (prices, search results, product specs, availability):
act kind=evaluate with a JavaScript function to extract clean data as JSON/strings in a single call.evaluate for pagination or updated data; no new snapshot needed unless the DOM structure changes.This uses orders of magnitude fewer tokens than snapshot-per-action loops.
Tips:
web_fetch but work through the visible CDP-attached browser.web_fetch and the visible browser.Beyond text, the visible browser lets you show results directly to the user:
screenshot of the relevant page section and attach it to your response for instant visual confirmation.label="product-1", label="product-2"), letting the user visually compare while you summarise.共 1 个版本