agentleFS
RoentekRoentek/Claude_Code_Boilerplate_Framework/.claude/skills/browser-harness/SKILL.md

browser-harness

Skill4 starsChanged 6 months agoMITView on GitHub

Direct browser control via CDP. For task-specific edits, use agent-workspace/agent_helpers.py. For setup, install, or connection problems, read https://github.com/browser-use/browser-harness/blob/main/install.md. Domain skills are off by default. Set BH_DOMAIN_SKILLS=1 to enable them; see the bottom section. If BH_DOMAIN_SKILLS=1 and the task is site-specific, read every file in the matching $BH_AGENT_WORKSPACE/domain-skills/<site>/ directory before inventing an approach. If the daemon cannot connect, run diagnostics: If Chrome remote debugging is not enabled, the harness opens: Ask the user to tick "Allow remote debugging for this browser…

10 other projects use a version of this, 5 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use adr-verbatim, file-tree and 7 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • davidondrejSkill

    adr-verbatim

    Record concise ADRs that preserve the user''s decisions without conversational noise. Use for "adr-verbatim", "new ADR", "document that as an ADR", "record this decision", or supplied ADR wording.

    Also in 3 projects that use this

  • davidondrejSkill

    file-tree

    Manually-invoked skill that prints a nice file tree of the current topic in a code block. Use when the user says "file-tree" or "file tree".

    Also in 3 projects that use this

  • matyasstochSkill

    distribute-skill-to-all-agents

    Distribute a newly-created agent skill across all 4 canonical skill folders on a local machine so Claude Code, Codex/OpenAI Agents, Pi Agent, and Hermes all see it. Use whenever the user says "give this skill to all agents", "distribute this skill", "sync skills across agents", or after creating a new skill that should be globally available. Covers the .claude/skills symlink and the ~/.pi/agent/skills (NOT ~/.pi/skills) trap.

    Also in 3 projects that use this

  • attentiondotnetSkill

    setup-help

    Walk the user through setting up anything step by step. Use when the user asks for help setting up, configuring, installing, or getting something working — "help me set up X", "walk me through this", "setup-help". Differentiator: gives one current step at a time, then always lists every remaining setup step after each response.

    Also in 4 projects that use this

  • matyasstochSkill

    effective-agent-skills

    How to write effective agent skills — what to do, what not to do, anatomy, progressive disclosure, design patterns, anti-patterns, testing, security. Read this whenever a skill (Claude Skill, Agent Skill, SKILL.md) is being created, edited, reviewed, or debugged. Use when the user says "create a skill", "new skill", "update this skill", "improve a skill", "why isn't my skill triggering", or anything else involving authoring or editing SKILL.md files.

    Also in 3 projects that use this

  • maragudkSkill

    decisions

    Guide for recording significant architectural and design decisions in docs/decisions.md. Use this skill when clearly significant architectural decisions are made (database choices, frameworks, core design patterns) or when explicitly asked to document a decision. Be conservative - only suggest for major decisions, not minor implementation details.

    Also in 3 projects that use this

  • +2 more from davidondrej

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 4 are distinctive, and 10 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the daemon cannot connect, run diagnostics:

    line 29
  2. Distinctive:

    If Chrome remote debugging is not enabled, the harness opens:

    line 35
  3. Very specific:

    Ask the user to tick "Allow remote debugging for this browser instance" and click Allow if Chrome shows a permission popup.

    line 41
  4. Distinctive:

    Use Browser Use cloud for headless servers, parallel sub-agents, or isolated work.

    line 45
  5. Very specific:

    When the task is done and a cloud browser is still running, ask directly: "Should I close this browser now?" If yes, run …

    line 70
  6. Very specific:

    Do not start a remote daemon and then keep using the default daemon.

    line 72
  7. Very specific:

    After navigation, call wait_for_load().

    line 80
  8. Very specific:

    If the current tab is stale or internal, call ensure_real_tab().

    line 81
  9. Very specific:

    Use js(...) for DOM inspection or extraction when coordinates are the wrong tool.

    line 82
  10. Distinctive:

    If you get stuck on a browser mechanic, check https://github.com/browser-use/browser-harness/tree/main/interaction-skills.

    line 88
  11. Very specific:

    Keep the connection model simple: use the default daemon, BU_NAME, BU_CDP_URL, BU_CDP_WS, or start_remote_daemon(...).

    line 111
  12. Very specific:

    Ask before leaving cloud browsers running.

    line 121
  13. Very specific:

    Only applies when BH_DOMAIN_SKILLS=1.

    line 125
  14. Very specific:

    When enabled, search $BH_AGENT_WORKSPACE/domain-skills/<host>/ before inventing an approach.

    line 127

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

browser-harness

Direct browser control via CDP. For task-specific edits, use agent-workspace/agent_helpers.py. For setup, install, or connection problems, read https://github.com/browser-use/browser-harness/blob/main/install.md.

Domain skills are off by default. Set BH_DOMAIN_SKILLS=1 to enable them; see the bottom section.

If BH_DOMAIN_SKILLS=1 and the task is site-specific, read every file in the matching $BH_AGENT_WORKSPACE/domain-skills/<site>/ directory before inventing an approach.

Usage

browser-harness <<'PY'
print(page_info())
PY
  • Invoke as browser-harness. Use heredocs for multi-line commands.
  • Helpers are pre-imported. run.py calls ensure_daemon() before exec.
  • First navigation is new_tab(url), not goto_url(url).
  • The normal local flow attaches to the running Chrome/Chromium CDP endpoint. No browser ids or local profile selection.

Local Chrome

If the daemon cannot connect, run diagnostics:

browser-harness --doctor

If Chrome remote debugging is not enabled, the harness opens:

chrome://inspect/#remote-debugging

Ask the user to tick "Allow remote debugging for this browser instance" and click Allow if Chrome shows a permission popup. Then retry the same browser-harness command.

Remote Browsers

Use Browser Use cloud for headless servers, parallel sub-agents, or isolated work. Authenticate once:

browser-harness auth login

Or import a key safely:

browser-harness auth login --api-key-stdin

Pick a short made-up name; r7k2 below is just a placeholder:

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

BU_NAME=r7k2 browser-harness <<'PY'
new_tab("https://example.com")
print(page_info())
PY

When the task is done and a cloud browser is still running, ask directly: "Should I close this browser now?" If yes, run stop_remote_daemon(name). Remote daemons bill until they stop or time out.

Do not start a remote daemon and then keep using the default daemon. Use the same name for BU_NAME.

Cloud profile cookie sync reference: https://github.com/browser-use/browser-harness/blob/main/interaction-skills/profile-sync.md.

Page Workflow

  • Screenshots first: use capture_screenshot() to understand visible state.
  • Clicking: screenshot -> read pixel -> click_at_xy(x, y) -> screenshot again.
  • After navigation, call wait_for_load().
  • If the current tab is stale or internal, call ensure_real_tab().
  • Use js(...) for DOM inspection or extraction when coordinates are the wrong tool.
  • Login walls: stop and ask. Exception: use available SSO automatically when Chrome is already signed in; still stop for passwords, MFA, consent, or ambiguous account choice.
  • Raw CDP is available with cdp("Domain.method", ...).

Interaction Skills

If you get stuck on a browser mechanic, check https://github.com/browser-use/browser-harness/tree/main/interaction-skills.

  • connection.md
  • cookies.md
  • cross-origin-iframes.md
  • dialogs.md
  • downloads.md
  • drag-and-drop.md
  • dropdowns.md
  • iframes.md
  • network-requests.md
  • print-as-pdf.md
  • profile-sync.md
  • screenshots.md
  • scrolling.md
  • shadow-dom.md
  • tabs.md
  • uploads.md
  • viewport.md

Design Constraints

  • Coordinate clicks default. CDP mouse events pass through iframes/shadow/cross-origin at the compositor level.
  • Keep the connection model simple: use the default daemon, BU_NAME, BU_CDP_URL, BU_CDP_WS, or start_remote_daemon(...).
  • Core helpers stay short. Put task-specific helper additions in $BH_AGENT_WORKSPACE/agent_helpers.py.

Gotchas

  • chrome://inspect/#remote-debugging must be enabled for local Chrome control.
  • Chrome may show an "Allow remote debugging?" popup; wait for the user to click Allow.
  • Omnibox popups are not real work tabs.
  • CDP target order is not Chrome's visible tab-strip order.
  • BU_CDP_URL is an HTTP DevTools endpoint; the daemon resolves it to WebSocket.
  • Ask before leaving cloud browsers running; stop them with stop_remote_daemon(name) or PATCH /browsers/{id} {"action":"stop"}.

Domain Skills

Only applies when BH_DOMAIN_SKILLS=1. Otherwise ignore domain skills.

When enabled, search $BH_AGENT_WORKSPACE/domain-skills/<host>/ before inventing an approach. goto_url(...) returns up to 10 skill filenames for the navigated host.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.