本文へ移動
cccskills
無料GitHub で公開

browser-use-terminal

Direct browser control via the Browser Use Terminal CLI. Use when the user wants to automate, scrape, test, or interact with web pages — you drive the browser yourself with Python helpers.

インストール方法を見る

含まれるファイル(200)

  • SKILL.md8.3 KB
  • .env.example1.1 KB
  • .github/workflows/browser-use-core-publish.yml4.9 KB
  • .github/workflows/browser-use-core-wheels.yml4.7 KB
  • .github/workflows/release.yml1.4 KB
  • .gitignore269 B
  • AGENT_SETUP.md6.4 KB
  • AGENTS.md3.2 KB
  • Cargo.lock97.3 KB
  • Cargo.toml2.2 KB
  • CONTRIBUTING.md502 B
  • crates/browser-use-agent/Cargo.toml1.9 KB
  • crates/browser-use-agent/src/compact/mod.rs27.9 KB
  • crates/browser-use-agent/src/compact/tests.rs24.1 KB
  • crates/browser-use-agent/src/compact/threshold_tests.rs19.7 KB
  • crates/browser-use-agent/src/config_model.rs27.7 KB
  • crates/browser-use-agent/src/config_overrides.rs79.4 KB
  • crates/browser-use-agent/src/config.rs817 B
  • crates/browser-use-agent/src/context/accounting.rs6.5 KB
  • crates/browser-use-agent/src/context/assembly.rs19.6 KB
  • crates/browser-use-agent/src/context/constants.rs2.9 KB
  • crates/browser-use-agent/src/context/image_estimate.rs9.9 KB
  • crates/browser-use-agent/src/context/inject_tests.rs19.2 KB
  • crates/browser-use-agent/src/context/inject.rs17.4 KB
  • crates/browser-use-agent/src/context/mod_tests.rs19.7 KB
  • crates/browser-use-agent/src/context/mod.rs14.8 KB
  • crates/browser-use-agent/src/context/normalize.rs484 B
  • crates/browser-use-agent/src/context/tests_accounting.rs23.1 KB
  • crates/browser-use-agent/src/context/user_input.rs31.2 KB
  • crates/browser-use-agent/src/context/workspace_context.rs22.6 KB
  • crates/browser-use-agent/src/decision/loop_decision.rs15.5 KB
  • crates/browser-use-agent/src/decision/mod.rs2.0 KB
  • crates/browser-use-agent/src/decision/retry.rs5.6 KB
  • crates/browser-use-agent/src/decision/tool_decision.rs767 B
  • crates/browser-use-agent/src/entrypoint/mod.rs230.7 KB
  • crates/browser-use-agent/src/entrypoint/provider.rs196.8 KB
  • crates/browser-use-agent/src/error.rs834 B
  • crates/browser-use-agent/src/events/map_tests.rs12.3 KB
  • crates/browser-use-agent/src/events/map.rs9.6 KB
  • crates/browser-use-agent/src/events/mod.rs1.5 KB
  • crates/browser-use-agent/src/events/names.rs1.4 KB
  • crates/browser-use-agent/src/events/store_sink_tests.rs5.5 KB
  • crates/browser-use-agent/src/events/store_sink.rs6.5 KB
  • crates/browser-use-agent/src/execpolicy/amend.rs6.8 KB
  • crates/browser-use-agent/src/execpolicy/canonicalize.rs7.3 KB
  • crates/browser-use-agent/src/execpolicy/mod.rs3.6 KB
  • crates/browser-use-agent/src/execpolicy/policy.rs19.5 KB
  • crates/browser-use-agent/src/execpolicy/tests.rs10.1 KB
  • crates/browser-use-agent/src/goals/budget.rs9.0 KB
  • crates/browser-use-agent/src/goals/mod.rs8.9 KB
  • crates/browser-use-agent/src/goals/state.rs7.9 KB
  • crates/browser-use-agent/src/goals/steering.rs15.3 KB
  • crates/browser-use-agent/src/goals/tests.rs17.8 KB
  • crates/browser-use-agent/src/guardian/approval.rs6.4 KB
  • crates/browser-use-agent/src/guardian/circuit.rs8.4 KB
  • crates/browser-use-agent/src/guardian/mod.rs10.9 KB
  • crates/browser-use-agent/src/guardian/reviewer.rs5.3 KB
  • crates/browser-use-agent/src/guardian/tests.rs12.9 KB
  • crates/browser-use-agent/src/history.rs18.2 KB
  • crates/browser-use-agent/src/hooks/config.rs6.8 KB
  • crates/browser-use-agent/src/hooks/event.rs8.1 KB
  • crates/browser-use-agent/src/hooks/mod.rs2.3 KB
  • crates/browser-use-agent/src/hooks/runtime.rs14.9 KB
  • crates/browser-use-agent/src/hooks/tests.rs21.5 KB
  • crates/browser-use-agent/src/infra/analytics.rs13.8 KB
  • crates/browser-use-agent/src/infra/lifecycle.rs3.4 KB
  • crates/browser-use-agent/src/infra/mod.rs2.5 KB
  • crates/browser-use-agent/src/infra/persistence.rs35.2 KB
  • crates/browser-use-agent/src/infra/review.rs13.3 KB
  • crates/browser-use-agent/src/lib.rs4.1 KB
  • crates/browser-use-agent/src/live_executor.rs27.3 KB
  • crates/browser-use-agent/src/mcp/config.rs4.2 KB
  • crates/browser-use-agent/src/mcp/http.rs9.4 KB
  • crates/browser-use-agent/src/mcp/manager.rs10.9 KB
  • crates/browser-use-agent/src/mcp/mod.rs1.0 KB
  • crates/browser-use-agent/src/mcp/oauth.rs9.2 KB
  • crates/browser-use-agent/src/mcp/protocol.rs8.1 KB
  • crates/browser-use-agent/src/mcp/stdio.rs9.5 KB
  • crates/browser-use-agent/src/mcp/tests.rs23.0 KB
  • crates/browser-use-agent/src/network/allowlist.rs7.6 KB
  • crates/browser-use-agent/src/network/approval.rs10.5 KB
  • crates/browser-use-agent/src/network/config.rs5.6 KB
  • crates/browser-use-agent/src/network/mod.rs2.6 KB
  • crates/browser-use-agent/src/network/proxy.rs6.8 KB
  • crates/browser-use-agent/src/network/tests.rs18.0 KB
  • crates/browser-use-agent/src/prompts/mod.rs23.4 KB
  • crates/browser-use-agent/src/prompts/tests.rs11.0 KB
  • crates/browser-use-agent/src/rollout/archive.rs7.2 KB
  • crates/browser-use-agent/src/rollout/fork.rs8.4 KB
  • crates/browser-use-agent/src/rollout/mod.rs4.0 KB
  • crates/browser-use-agent/src/rollout/tests.rs17.0 KB
  • crates/browser-use-agent/src/rollout/truncation.rs4.8 KB
  • crates/browser-use-agent/src/sandbox_backends/linux.rs6.9 KB
  • crates/browser-use-agent/src/sandbox_backends/mod.rs2.5 KB
  • crates/browser-use-agent/src/sandbox_backends/policy.rs5.1 KB
  • crates/browser-use-agent/src/sandbox_backends/provider.rs10.4 KB
  • crates/browser-use-agent/src/sandbox_backends/seatbelt.rs5.9 KB
  • crates/browser-use-agent/src/sandbox_backends/tests.rs11.7 KB
  • crates/browser-use-agent/src/session/lifecycle_tests.rs11.2 KB
  • crates/browser-use-agent/src/session/mod.rs7.8 KB
  • crates/browser-use-agent/src/session/notifier.rs5.6 KB
  • crates/browser-use-agent/src/session/reconstruct_tests.rs19.1 KB
  • crates/browser-use-agent/src/session/reconstruct.rs70.0 KB
  • crates/browser-use-agent/src/session/resume.rs14.3 KB
  • crates/browser-use-agent/src/session/rollback.rs5.4 KB
  • crates/browser-use-agent/src/session/sink.rs7.7 KB
  • crates/browser-use-agent/src/skills/discovery.rs16.1 KB
  • crates/browser-use-agent/src/skills/inject.rs12.9 KB
  • crates/browser-use-agent/src/skills/mention.rs8.3 KB
  • crates/browser-use-agent/src/skills/mod.rs3.8 KB
  • crates/browser-use-agent/src/skills/tests.rs16.1 KB
  • crates/browser-use-agent/src/subagents/depth.rs2.3 KB
  • crates/browser-use-agent/src/subagents/mailbox.rs8.6 KB
  • crates/browser-use-agent/src/subagents/manager.rs29.4 KB
  • crates/browser-use-agent/src/subagents/mod.rs4.1 KB
  • crates/browser-use-agent/src/subagents/parent_link.rs9.0 KB
  • crates/browser-use-agent/src/subagents/registry.rs8.9 KB
  • crates/browser-use-agent/src/subagents/role.rs15.0 KB
  • crates/browser-use-agent/src/subagents/spawn.rs9.1 KB
  • crates/browser-use-agent/src/subagents/store_tree.rs38.7 KB
  • crates/browser-use-agent/src/subagents/tests.rs28.3 KB
  • crates/browser-use-agent/src/subagents/tree.rs21.4 KB
  • crates/browser-use-agent/src/task/abort.rs3.0 KB
  • crates/browser-use-agent/src/task/driver_tests.rs16.7 KB
  • crates/browser-use-agent/src/task/driver.rs14.1 KB
  • crates/browser-use-agent/src/task/lifecycle.rs3.2 KB
  • crates/browser-use-agent/src/task/mod.rs968 B
  • crates/browser-use-agent/src/testkit/mod.rs1.0 KB
  • crates/browser-use-agent/src/tools/approval_tests.rs4.5 KB
  • crates/browser-use-agent/src/tools/approval.rs4.2 KB
  • crates/browser-use-agent/src/tools/handlers/apply_patch_tests.rs14.3 KB
  • crates/browser-use-agent/src/tools/handlers/apply_patch.rs24.1 KB
  • crates/browser-use-agent/src/tools/handlers/browser_tests.rs59.3 KB
  • crates/browser-use-agent/src/tools/handlers/browser.rs125.2 KB
  • crates/browser-use-agent/src/tools/handlers/capture.rs6.7 KB
  • crates/browser-use-agent/src/tools/handlers/done_tests.rs8.0 KB
  • crates/browser-use-agent/src/tools/handlers/done.rs16.8 KB
  • crates/browser-use-agent/src/tools/handlers/email_2fa.rs7.5 KB
  • crates/browser-use-agent/src/tools/handlers/goal_tests.rs10.2 KB
  • crates/browser-use-agent/src/tools/handlers/goal.rs33.8 KB
  • crates/browser-use-agent/src/tools/handlers/mcp_tests.rs11.8 KB
  • crates/browser-use-agent/src/tools/handlers/mcp.rs22.2 KB
  • crates/browser-use-agent/src/tools/handlers/mod.rs2.9 KB
  • crates/browser-use-agent/src/tools/handlers/python_tests.rs13.4 KB
  • crates/browser-use-agent/src/tools/handlers/python.rs19.8 KB
  • crates/browser-use-agent/src/tools/handlers/search_tests.rs19.0 KB
  • crates/browser-use-agent/src/tools/handlers/search.rs28.1 KB
  • crates/browser-use-agent/src/tools/handlers/secrets_admin.rs32.3 KB
  • crates/browser-use-agent/src/tools/handlers/secrets_import.rs16.9 KB
  • crates/browser-use-agent/src/tools/handlers/shell_tests.rs29.9 KB
  • crates/browser-use-agent/src/tools/handlers/shell.rs22.9 KB
  • crates/browser-use-agent/src/tools/handlers/subagent_tests.rs59.0 KB
  • crates/browser-use-agent/src/tools/handlers/subagent.rs108.3 KB
  • crates/browser-use-agent/src/tools/handlers/tool_search_tests.rs9.6 KB
  • crates/browser-use-agent/src/tools/handlers/tool_search.rs20.0 KB
  • crates/browser-use-agent/src/tools/handlers/update_plan_tests.rs9.8 KB
  • crates/browser-use-agent/src/tools/handlers/update_plan.rs11.9 KB
  • crates/browser-use-agent/src/tools/handlers/view_image_tests.rs12.9 KB
  • crates/browser-use-agent/src/tools/handlers/view_image.rs15.0 KB
  • crates/browser-use-agent/src/tools/handlers/web_search_tests.rs12.0 KB
  • crates/browser-use-agent/src/tools/handlers/web_search.rs19.0 KB
  • crates/browser-use-agent/src/tools/mod.rs1.4 KB
  • crates/browser-use-agent/src/tools/orchestrator_tests.rs10.2 KB
  • crates/browser-use-agent/src/tools/orchestrator.rs11.0 KB
  • crates/browser-use-agent/src/tools/registry_tests.rs37.2 KB
  • crates/browser-use-agent/src/tools/registry.rs87.7 KB
  • crates/browser-use-agent/src/tools/runtime.rs13.0 KB
  • crates/browser-use-agent/src/tools/sandbox_tests.rs12.1 KB
  • crates/browser-use-agent/src/tools/sandbox.rs4.4 KB
  • crates/browser-use-agent/src/tools/unified_exec.rs46.5 KB
  • crates/browser-use-agent/src/turn/dispatch_tests.rs24.6 KB
  • crates/browser-use-agent/src/turn/dispatch.rs22.1 KB
  • crates/browser-use-agent/src/turn/fusion_tests.rs17.4 KB
  • crates/browser-use-agent/src/turn/loop_driver.rs13.7 KB
  • crates/browser-use-agent/src/turn/loop_tests.rs31.2 KB
  • crates/browser-use-agent/src/turn/mod.rs3.3 KB
  • crates/browser-use-agent/src/turn/model_path.rs20.2 KB
  • crates/browser-use-agent/src/turn/sampling_tests.rs49.8 KB
  • crates/browser-use-agent/src/turn/sampling.rs54.0 KB
  • crates/browser-use-agent/tests/live_model_smoke.rs4.0 KB
  • crates/browser-use-browser/Cargo.toml412 B
  • crates/browser-use-browser/src/browser_script_helpers.py73.3 KB
  • crates/browser-use-browser/src/lib.rs534.3 KB
  • crates/browser-use-browser/src/secrets_runtime.rs24.9 KB
  • crates/browser-use-cli/Cargo.toml910 B
  • crates/browser-use-cli/src/main.rs449.6 KB
  • crates/browser-use-llm/Cargo.toml519 B
  • crates/browser-use-llm/src/auth/codex.rs17.6 KB
  • crates/browser-use-llm/src/auth/mod.rs975 B
  • crates/browser-use-llm/src/lib.rs1.3 KB
  • crates/browser-use-llm/src/protocols/anthropic_messages.rs50.1 KB
  • crates/browser-use-llm/src/protocols/gemini_generate_content.rs33.3 KB
  • crates/browser-use-llm/src/protocols/mod.rs461 B
  • crates/browser-use-llm/src/protocols/openai_chat.rs40.1 KB
  • crates/browser-use-llm/src/protocols/openai_responses.rs49.5 KB
  • crates/browser-use-llm/src/protocols/utils/lifecycle.rs7.1 KB
  • crates/browser-use-llm/src/protocols/utils/mod.rs391 B
  • crates/browser-use-llm/src/protocols/utils/tool_stream.rs9.2 KB
  • crates/browser-use-llm/src/providers/anthropic.rs4.5 KB
  • crates/browser-use-llm/src/providers/google.rs2.6 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Browser Use Terminal

Direct browser control via CDP — you are the agent; you drive the browser. For setup, install, or connection problems, read https://browser-use.com/skill (agent setup instructions) or https://docs.browser-use.com/open-source/browser-use-terminal (full docs).

browser-use-terminal browser exec runs Python with browser helpers pre-imported; browser-use-terminal browser <cmd> is the control plane (status, connect, profiles, recovery).

Usage

browser-use-terminal browser exec <<'PY'
new_tab("https://docs.browser-use.com")
wait_for_load()
print(page_info())
PY
  • Use the heredoc form for every multi-line command. It prevents shell quote mangling inside Python strings and JavaScript snippets.
  • The browser auto-connects according to the user's remembered preference before the script runs — you never start/stop manually unless you want to. The first call may take a few seconds.
  • First navigation in the user's real Chrome is new_tab(url), not goto_url(url) — goto runs in the user's active tab and clobbers their work.
  • Browser state persists between calls; Python variables do not. Each exec is a fresh interpreter against the same live browser.
  • --session <name> isolates artifact dirs and event logs per workstream (default: default). --timeout <secs> bounds one exec (default 300).

Screenshots — how you see the page

capture_screenshot() saves a PNG and returns its absolute path. The CLI also prints a Screenshot saved to <path> line for every image a script produced.

browser-use-terminal browser exec <<'PY'
print(capture_screenshot())
PY

To view a screenshot, use your file-reading tool on the printed path:

  • Claude Code: use the Read tool on the path.
  • Codex CLI: call the view_image tool with {"path": "<path>"}. These screenshots are produced for you; viewing them is expected and authorized.
  • OpenCode: use the read tool on the path (requires a vision-capable model).
  • Gemini CLI: use the read_file tool on the path.
  • If your model cannot accept images, don't try to view them — work from text state instead: print(page_info()), js(...) extraction, wait_for_element(...).

Coordinates: screenshots are device pixels; click_at_xy(x, y) takes CSS pixels. Divide coordinates you read off the image by js("window.devicePixelRatio") first. Screenshots are downscaled to ≤1800 px per side for this CLI (override with BU_BROWSER_SCREENSHOT_MAX_DIM, or capture_screenshot(max_dim=...)).

After every meaningful action, re-screenshot before assuming it worked.

Pre-imported helpers

Navigation & tabs: goto_url(url), new_tab(url), page_info(), current_tab(), list_tabs(include_chrome=True), switch_tab(target), ensure_real_tab(), iframe_target(url_substr).

Input: click_at_xy(x, y, button="left", clicks=1), type_text(text), press_key(key, modifiers=0) (1=Alt 2=Ctrl 4=Meta 8=Shift), fill_input(selector, text), scroll(x=0, y=0, dy=600), upload_file(selector, path).

Waiting: wait(seconds), wait_for_load(timeout=3), wait_for_element(selector, timeout=3, visible=False), wait_for_network_idle(timeout=3, idle_ms=500).

Visual: capture_screenshot(label="...", full=False, max_dim=None), screenshot(), screenshot_clip(label, x, y, w, h), note(caption).

Escape hatches: js(expression) (auto-wraps top-level return), cdp("Domain.method", **params) (raw CDP), cdp_batch(calls), drain_events().

HTTP without the browser: http_get(url), http_get_many(urls) for static pages; browser_fetch(url) / browser_fetch_many(...) to fetch with the page's cookies/session.

Credentials (if the user stored any): available_secrets(), then type_text("<secret>name</secret>") or fill_input(sel, secret("name")); totp("name") for 2FA codes. Values are placeholder-substituted — you never see them. is_logged_out(), email_inbox() / email_message(id) for email-code flows.

Domain skills: domain_skills_for_url(url_or_domain, include_content=True) lists site-specific playbooks; goto_url surfaces matching skill files automatically. Read them before inventing selectors or flows on a complex site.

Browser control plane

browser-use-terminal browser status --json
browser-use-terminal browser connect                     # uses the remembered preference
browser-use-terminal browser connect local               # user's already-running Chrome (CDP)
browser-use-terminal browser connect managed --headless  # disposable CLI-owned browser
browser-use-terminal browser preference use local|cloud|managed-headless
browser-use-terminal browser remote start                # Browser Use cloud browser (needs BROWSER_USE_API_KEY)
browser-use-terminal browser doctor
browser-use-terminal browser recover reconnect-websocket
browser-use-terminal browser recover stop-owned-browser  # stop the persistent managed browser
browser-use-terminal browser recover stop-owned-remote   # stop the cloud browser (stops billing)
browser-use-terminal browser daemon status|stop|logs     # the background daemon holding the connection

A background daemon (auto-started, one per state dir) holds the CDP connection across your commands, so the browser — and in local mode, Chrome's granted debugging permission — persists between invocations. Managed and cloud browsers also survive daemon restarts; later calls reattach instead of relaunching. Stop browsers with the recover commands above when the user is done (cloud browsers bill until stopped or timed out).

  • exec auto-connects, so you rarely need these. Reach for them when status shows a problem or the user asks for a specific browser.
  • If output JSON says status: "needs-user-action" (e.g. pick a Chrome profile, click Allow in Chrome's permission popup, enable the remote-debugging checkbox), show the user_prompt to the user verbatim and wait — do not guess.
  • Auth wall mid-task: stop and ask the user. Don't type credentials from screenshots; use stored secrets if available.
  • Connecting to the user's real Chrome requires a one-time setup: chrome://inspect/#remote-debugging → tick "Allow remote debugging". browser local setup walks the user through it.

What actually works

  • Screenshots first: capture_screenshot() → view the image → decide whether you need a click, a selector, or more navigation.
  • Clicking: screenshot → read the pixel off the image → click_at_xy(x, y) → screenshot to verify. Suppress the locate-then-click reflex — no getBoundingClientRect, no selector hunts. Hit-testing happens in Chrome's browser process, so coordinate clicks pass through iframes / shadow DOM / cross-origin without extra work.
  • Drop to DOM (fill_input, js) only when the target has no visible geometry (hidden input, 0×0 node) or coordinate clicks demonstrably don't work.
  • Bulk static pages: http_get_many(urls) — no browser needed. Logged-in pages: browser_fetch(url) rides the real session.
  • After goto: wait_for_load(). SPAs report complete before they render — follow with wait_for_element(...).
  • Wrong/stale tab: ensure_real_tab().
  • Verification: print(page_info()) is the cheapest "is this alive?" check; screenshots are the default way to verify visible actions.

Gotchas (field-tested)

  • CDP target order ≠ Chrome's visible tab-strip order.
  • Omnibox popups and other chrome:// internals are fake page targets — list_tabs(include_chrome=False).
  • page_info() surfaces an open JS dialog as {"dialog": ...} — handle it (cdp("Page.handleJavaScriptDialog", accept=True)) before anything else.
  • Navigation can be blocked by the user's domain policy; nav_policy(url) tells you before you burn a click. A blocked navigation is policy, not a bug — tell the user.
  • Scripts time out (default 300s): keep each exec small and observable rather than one mega-script. Long extraction loops: print progress as you go — stdout is captured even on timeout.
  • Prefer compositor-level actions over framework hacks. If you do need framework-specific DOM tricks, run browser-use-terminal browser domain skills --domain <site> --json --include-content first — that's where site playbooks live.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

このスキルの問題を報告する