当前位置: 首页 > Skill >

Win11 Visible Browser

Win11 Visible Browser

Win11 Visible Browser

通过CDP控制、诊断或修复在WSL2中运行的OpenClaw所显示的Windows 11 Edge/Chrome浏览器。用于浏览器自动化需要共享使用的场景。

1.0.3 2026.11.17 206
获取Skill文件查看使用说明
作 者:沈澄 许可证: 更新时间:2026.11.17
本文目录展开

Win11 Visible Browser Automation

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.

Safety gate

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:

  • Prefer a dedicated browser profile by default; use a personal/logged-in profile only after explicit user approval.
  • Do not proceed with browser, account, payment, form, firewall, portproxy, config, or Scheduled Task changes unless the action and rollback are clear.
  • Verify Windows firewall rules are scoped to WSL/Hyper-V CIDR; never expose the CDP port to the LAN or Internet.
  • Create persistent Scheduled Tasks only after explicit approval, and keep rollback documented with Unregister-ScheduledTask.

Positioning

Prefer visible browser automation when the task benefits from:

  • existing tabs already open in the user's browser;
  • cookies, logins, extensions, and normal browser state;
  • visible step-by-step human oversight;
  • manual human help for login, captcha, 2FA, consent screens, account pickers, file dialogs, or sensitive approvals;
  • sites that do not work well through 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.

Browser Resource Budget / Tab Hygiene

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.

Cost ladder

Use the cheapest sufficient tool, in this order:

  1. Local files, project notes, memory, or CLI output.
  2. First-class APIs/CLIs (clawhub, openclaw, curl, source-specific tools).
  3. web_fetch for readable public pages.
  4. Browser evaluate for structured extraction from an already-open page.
  5. Browser snapshot/screenshot for UI understanding or evidence.
  6. Visible Edge/Chrome CDP only when logins, cookies, human-in-the-loop, visual verification, or sites that reject cheaper access are actually needed.

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.

Existing tabs are not agent-owned

Treat all tabs that existed before the current task as user state.

  • Do not close, reload, navigate, or repurpose existing user tabs without explicit permission.
  • Existing tabs already count against free system memory; do not double-subtract them in memory estimates.
  • They still count against CDP complexity: many existing pages/iframes/workers can make automation unstable.
  • If existing tabs leave too little resource budget, stop and ask for cleanup permission instead of taking over those tabs.

Classify tabs mentally:

  • User tabs: existed before the task; do not touch.
  • User-requested tabs: opened because the user explicitly asked; do not close unless asked.
  • Agent task tabs: opened by the agent for the current task; save useful URLs and close/clean them when done.
  • Archived tabs: URLs saved into a project file such as browser-tabs-YYYY-MM-DD.md; safe to close only after user approval.
  • Critical/manual tabs: login, captcha, payment, forms, account settings; human-in-the-loop only.

Preflight budget check

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:

  • current page, iframe, and worker target counts;
  • whether reCAPTCHA/service workers are present;
  • current browser memory when measurable;
  • free system memory after existing user tabs;
  • minimum number of new tabs required by the task;
  • whether the task can use one reusable tab instead.

Approximate planning costs:

  • simple/static tab: 50-150 MB;
  • normal web app tab: 100-250 MB;
  • heavy SPA/account dashboard: 250+ MB;
  • iframe/worker-heavy or reCAPTCHA site: treat as high risk; do not open cards in parallel.

Memory rule of thumb:

  • keep at least 1 GB safety headroom;
  • if free memory after headroom is < estimated task cost, do not start;
  • if unsure, use one tab and write progress to project files rather than opening more tabs.

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;
  • any reCAPTCHA burst: stop automation and switch to human-in-the-loop or project-file workflow;
  • repeated targetId, Execution context destroyed, or timeout errors: refresh target inventory instead of retrying blindly.

Minimal-tab workflow

Do not use the browser as task memory.

  • Default to one list/search tab and, if needed, one reusable detail tab.
  • Do not open a fan-out of many result cards/resumes/products.
  • Extract links from a list into a project file first.
  • Visit/detail one item at a time, record the result, then reuse or close the tab.
  • Prefer evaluate to extract structured data; use snapshots only when the UI structure is unknown.
  • Keep final chat replies compact: summary + path to saved project file, not full DOM dumps.

Cleanup and archiving

At the end of a browser task:

  1. Save useful URLs/data into the relevant project (browser-tabs-YYYY-MM-DD.md, candidates.md, sources.md, progress.md, etc.).
  2. Report which agent-created tabs can be closed.
  3. Close only agent-owned or user-approved archived tabs.
  4. Leave user tabs and user-requested tabs alone.

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.

Recommended architecture

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:

  • OpenClaw browser profile: win-edge or win-chrome
  • Windows CDP local port: 9222
  • WSL-visible relay port: 9223
  • Dedicated browser profile: C:ProgramDataOpenClawbrowser-profile
  • Startup/repair task: OpenClaw-Start-Windows-Browser-CDP

For implementation details, read {baseDir}/references/setup.md.

Diagnose first

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 order

Repair in layers and stop when the layer works:

  1. Confirm Windows Edge/Chrome is installed and can run visibly.
  2. Start the browser with CDP on Windows localhost, usually 127.0.0.1:9222.
  3. Expose it to WSL with a Windows relay/portproxy, usually 0.0.0.0:9223 → 127.0.0.1:9222.
  4. Restrict Windows firewall to the current WSL/Hyper-V CIDR, not the whole LAN or Internet.
  5. Configure an OpenClaw browser profile with cdpUrl pointing to the WSL-visible Windows endpoint and attachOnly: true.
  6. Reload/restart Gateway if the profile is not visible.
  7. Run doctor and a page/snapshot smoke test.

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.

Common blockers

  • No supported browser found: WSL cannot launch Windows Edge/Chrome as a local Linux browser; use remote CDP.
  • Windows CDP works but WSL curl times out: fix portproxy/firewall/WSL subnet.
  • Browser profile not found: OpenClaw config not loaded; reload/restart Gateway.
  • WSL gateway IP changed: update browser.profiles.<name>.cdpUrl or rerun the documented repair flow.
  • Existing tabs/logins are missing: you are probably using a dedicated profile, not the user's real profile. Ask before switching profiles.

Evidence to report

When done, report:

  • browser profile name and CDP URL tested;
  • openclaw browser --browser-profile <profile> doctor result;
  • /json/version result from WSL;
  • Windows task/log status if relevant;
  • smoke-test URL opened and snapshot result;
  • any remaining manual human step needed.

Data extraction

For structured data extraction (prices, search results, product specs, availability):

  1. Snapshot the page once to understand the layout.
  2. Use act kind=evaluate with a JavaScript function to extract clean data as JSON/strings in a single call.
  3. Repeat 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:

  • If content loads lazily on scroll, scroll the container into view via evaluate before extraction.
  • Extract all visible results in one pass: name, price, seller, delivery date, link.
  • Some sites (Ozon, Wildberries, М.Видео) trigger antibot challenges on web_fetch but work through the visible CDP-attached browser.
  • Яндекс Маркет generally works with both web_fetch and the visible browser.

Visual result presentation

Beyond text, the visible browser lets you show results directly to the user:

  • Open result tabs — after finding a product/article/video, open it in a labeled browser tab so the user can see and interact with it in real time.
  • Screenshot capture — take a screenshot of the relevant page section and attach it to your response for instant visual confirmation.
  • Multi-tab orchestration — open several search results at once with distinct labels (label="product-1", label="product-2"), letting the user visually compare while you summarise.
  • Article/video handoff — for tutorials or reviews, open the content in a tab and snapshot the key section so the user can continue watching/reading.
  • Evidence delivery — when a specific piece of information is critical (price, address, phone, delivery date), snapshot exactly that block and deliver it for verification.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,042
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,036
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,023
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,023
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,021
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,017
Skill 文件
  • SKILL.md
    • Win11 Visible Browser Automation
    • Safety gate
    • Positioning
    • Browser Resource Budget / Tab Hygiene
      • Cost ladder
      • Existing tabs are not agent-owned
      • Preflight budget check
      • Minimal-tab workflow
      • Cleanup and archiving
    • Recommended architecture
    • Diagnose first
    • Repair order
    • Common blockers
    • Evidence to report
    • Data extraction
    • Visual result presentation
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期