Files
mcn-short-video/project/短视频脚本创作/V1.0/subskills/browser-harness/install.md
T
maogeigei 11fe8d42e2 refactor(skill): 主技能 subskill 目录更名 subskills(09-02 用户要求)
- V1.0/subskill/ → V1.0/subskills/(browser-harness/mcn-dou-analysis/mcn-script-review/mcn-video-prompt,git 识别 R100 纯重命名保留历史)
- 路径说明同步:V1.0/SKILL.md(96/105行)、Lite1.0/SKILL.md(66行)、mcn-dou-analysis/SKILL.md 红线行、操作规范.md 159/175行、mcn-work-shop app.js SKILL_HINT_ACCOUNT
- 用户环境 ~/.workbuddy/skills/短视频脚本创作/ 与源仓库 V1.0 同 inode(junction),自动同步无需单独改
- mcn-dou-analysis 内部 subskills/nuwa-skill-main 为正常结构不受影响
2026-09-02 10:36:23 +08:00

3.2 KiB

name, description
name description
browser-install Install browser-harness and connect it to a browser fast.

browser-harness install

Use once. For browser work, read SKILL.md.

Fast Path

uv tool install --python 3.12 --upgrade --force browser-harness
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills/browser-harness"
browser-harness skill > "${CODEX_HOME:-$HOME/.codex}/skills/browser-harness/SKILL.md"
browser-harness <<'PY'
print(page_info())
PY

If page_info() prints, configure recording consent below, then stop.

--python 3.12 prevents uv from selecting old releases that support older Python versions. --upgrade --force replaces any previous browser-harness tool install with the latest stable release. It does not uninstall unrelated commands such as browser-use-Browser or browser-use-Terminal.

For Claude Code or other agents: install browser-harness, register a skill named browser-harness, use browser-harness skill as the body, and use this trigger:

Always use browser-harness for any web interaction: automation, scraping, testing, or site/app work.

If an old user-installed browser or browser-use skill is being picked instead, remove that stale skill directory manually. Do not edit bundled/vendor plugin caches.

Run browser-harness recordings. If it reports (default), ask the user once:

Enable local browser recordings? This saves screenshots and action traces on this machine, which may include sensitive page content, so you can later ask “show me what you did” or request a video. Videos are never generated automatically. [y/N]

Default to no. Run browser-harness recordings enable only after yes; otherwise run browser-harness recordings disable. Preserve an existing (config) or (BH_RECORD) preference during upgrades instead of asking again.

If Chrome Blocks It

In Chrome:

  1. Open chrome://inspect/#remote-debugging.
  2. Tick "Allow remote debugging for this browser instance".
  3. Click Allow on the popup if it appears.
  4. Retry page_info().

The checkbox and popup require the user.

Cloud Browsers

Cloud is optional. Local Chrome does not need a Browser Use API key.

Use any short made-up name; r7k2 below is just a placeholder.

browser-harness auth login
browser-harness <<'PY'
start_remote_daemon("r7k2")
PY

Then use it by name:

BU_NAME=r7k2 browser-harness <<'PY'
print(page_info())
PY

If Still Broken

browser-harness --doctor

Use the output:

  • chrome running FAIL: ask the user to open Chrome, or use isolated/cloud browser.
  • daemon alive FAIL: Chrome remote debugging permission is missing, Chrome is closed, or the CDP endpoint is not reachable.
  • update available: run browser-harness --update -y when you decide to upgrade.

If this still fails, inspect src/browser_harness/admin.py, src/browser_harness/daemon.py, and src/browser_harness/_ipc.py.

Useful:

browser-harness --update -y
browser-harness telemetry disable

State lives under ${XDG_CONFIG_HOME:-~/.config}/browser-harness by default: auth, telemetry id, agent workspace, runtime sockets, logs, screenshots, and temp files. Override with BH_HOME or BROWSER_HARNESS_HOME.