Communityコーディング&開発github.com

browser-use

ブラウザ操作を自動化し、Webテスト、フォーム入力、スクリーンショット取得、データ抽出を行います。Webサイトのナビゲーション、Webページとのインタラクション、フォーム入力、スクリーンショット取得、Webページからの情報抽出が必要な場合に使用します。

browser-use とは?

browser-useは、CLIベースのブラウザ自動化ツールで、ヘッドレスブラウザをバックグラウンドデーモンとして起動し、コマンド間でブラウザを開いたままにすることで、1回の呼び出しあたり約50msの低レイテンシを実現します。このスキルは、Webページのナビゲーション(open, back, scroll)、ページ状態の取得(state, screenshot)、要素とのインタラクション(click, input, type, select)、データ抽出(eval, get)、クッキー管理、プロファイル管理、クラウドブラウザ接続、Cloudflareトンネルなど、包括的なブラウザ操作機能を提供します。特に、ユーザーの既存Chromeに接続してログイン状態やクッキーを保持したまま操作したり、クラウドブラウザを利用したり、Chromeプロファイルを切り替えたりすることができ、認証が必要なサイトでの作業に強みを発揮します。また、コマンドチェーン(&&)やマルチセッション(--session)による並列実行にも対応しており、Claude Code、Cursor、CodexなどのAIエージェントと組み合わせてWeb自動化タスクを効率的に実行するために設計されています。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/browser-use/browser-use/tree/main/skills/browser-use

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

browser-use CLIを使ったブラウザ自動化

browser-use コマンドは、高速で永続的なブラウザ自動化を提供します。バックグラウンドデーモンがコマンド間でブラウザを開いたままにするため、1回の呼び出しあたり約50msのレイテンシを実現します。

前提条件

browser-use doctor    # インストールの確認

セットアップの詳細は、https://github.com/browser-use/browser-use/blob/main/browser_use/skill_cli/README.md を参照してください。

コアワークフロー

  1. ナビゲート: browser-use open <url> — ヘッドレスブラウザを起動し、ページを開く
  2. 検査: browser-use state — クリック可能な要素をインデックス付きで返す
  3. 操作: state のインデックスを使用 (browser-use click 5, browser-use input 3 "テキスト")
  4. 確認: browser-use state または browser-use screenshot で確認
  5. 繰り返し: ブラウザはコマンド間で開いたままになる

コマンドが失敗した場合は、まず browser-use close を実行して破損したセッションをクリアし、再試行してください。

ユーザーの既存Chromeを使用する場合(ログイン情報・クッキーを保持):最初に browser-use connect を実行します。 代わりにクラウドブラウザを使用する場合:最初に browser-use cloud connect を実行します。 どちらの場合も、その後のコマンドは同じように動作します。

browser-use connect が失敗した場合

browser-use connect がリモートデバッグが有効なChromeを見つけられない場合、ユーザーに2つの選択肢を提示します。

  1. 実際のChromeブラウザを使用する — 最初にリモートデバッグを有効にする必要があります:
    • Chromeで chrome://inspect/#remote-debugging を開くか、--remote-debugging-port=9222 フラグを付けてChromeを再起動する
    • その後、browser-use connect を再試行する
  2. Chromeプロファイルを使用して管理Chromiumを使用する — Chromeのセットアップは不要:
    • browser-use profile list を実行して利用可能なプロファイルを表示する
    • 使用するプロファイルをユーザーに尋ね、browser-use --profile "プロファイル名" open <url> を実行する
    • これにより、ユーザーのプロファイルデータ(クッキー、ログイン情報、拡張機能)を使用して別のChromiumインスタンスが起動する

ユーザーに選択させてください。一方のパスを仮定しないでください。

ブラウザモード

browser-use open <url>                         # デフォルト:ヘッドレスChromium(セットアップ不要)
browser-use --headed open <url>                # 表示ウィンドウ(デバッグ用)
browser-use connect                            # ユーザーのChromeに接続(ログイン情報・クッキーを保持)
browser-use cloud connect                      # クラウドブラウザ(ゼロ設定、APIキーが必要)
browser-use --profile "Default" open <url>     # 特定プロファイルを使用した実際のChrome

connect または cloud connect の後は、後続のすべてのコマンドがそのブラウザに対して実行されます。追加のフラグは不要です。

コマンド

# ナビゲーション
browser-use open <url>                    # URLに移動
browser-use back                          # 履歴を戻る
browser-use scroll down                   # 下にスクロール(--amount N でピクセル指定)
browser-use scroll up                     # 上にスクロール
browser-use tab list                      # 全タブを一覧表示
browser-use tab new [url]                 # 新しいタブを開く(空白またはURL指定)
browser-use tab switch <index>            # インデックスでタブを切り替え
browser-use tab close <index> [index...]  # 1つ以上のタブを閉じる

# ページ状態 — 要素インデックスを取得するため、最初に必ず state を実行
browser-use state                         # URL、タイトル、クリック可能要素をインデックス付きで表示
browser-use screenshot [path.png]         # スクリーンショット(パス未指定の場合はbase64、--full で全ページ)

# 操作 — state のインデックスを使用
browser-use click <index>                 # インデックスで要素をクリック
browser-use click <x> <y>                 # ピクセル座標でクリック
browser-use type "テキスト"                # フォーカスされた要素に入力
browser-use input <index> "テキスト"       # 要素をクリック、既存テキストをクリア、新しいテキストを入力
browser-use input <index> ""              # 新しいテキストを入力せずにフィールドをクリア
browser-use keys "Enter"                  # キーボードキーを送信("Control+a" なども可)
browser-use select <index> "option"       # ドロップダウンオプションを選択
browser-use upload <index> <path>         # ファイル入力を使用してファイルをアップロード
browser-use hover <index>                 # 要素にホバー
browser-use dblclick <index>              # 要素をダブルクリック
browser-use rightclick <index>            # 要素を右クリック

# データ抽出
browser-use eval "jsコード"               # JavaScriptを実行し、結果を返す
browser-use get title                     # ページタイトル
browser-use get html [--selector "h1"]    # ページHTML(または指定セレクタにスコープ)
browser-use get text <index>              # 要素のテキスト内容
browser-use get value <index>             # input/textareaの値
browser-use get attributes <index>        # 要素の属性
browser-use get bbox <index>              # バウンディングボックス(x, y, width, height)

# 待機
browser-use wait selector "css"           # 要素が表示されるまで待機(--state visible|hidden|attached|detached, --timeout ms)
browser-use wait text "テキスト"           # テキストが表示されるまで待機

# クッキー
browser-use cookies get [--url <url>]     # クッキーを取得(オプションでフィルタリング)
browser-use cookies set <name> <value>    # クッキーを設定(--domain, --secure, --http-only, --same-site, --expires)
browser-use cookies clear [--url <url>]   # クッキーをクリア
browser-use cookies export <file>         # JSONにエクスポート
browser-use cookies import <file>         # JSONからインポート

# セッション
browser-use close                         # ブラウザを閉じてデーモンを停止
browser-use sessions                      # アクティブなセッションを一覧表示
browser-use close --all                   # すべてのセッションを閉じる

高度なブラウザ制御(CDP、デバイスエミュレーション、タブアクティベーション)については、references/cdp-python.md を参照してください。

クラウドAPI

browser-use cloud connect                 # クラウドブラウザをプロビジョニングして接続(ゼロ設定)
browser-use cloud login <api-key>         # APIキーを保存(または BROWSER_USE_API_KEY を設定)
browser-use cloud logout                  # APIキーを削除
browser-use cloud v2 GET /browsers        # RESTパススルー(v2またはv3)
browser-use cloud v2 POST /tasks '{"task":"...","url":"..."}'
browser-use cloud v2 poll <task-id>       # タスクが完了するまでポーリング
browser-use cloud v2 --help               # APIエンドポイントを表示

cloud connect は永続的なプロファイルを持つクラウドブラウザをプロビジョニングし(初回使用時に自動作成)、CDP経由で接続し、ライブURLを表示します。browser-use close は切断し、クラウドブラウザも停止します。カスタムブラウザ設定(プロキシ、タイムアウト、特定のプロファイル)が必要な場合は、cloud v2 POST /browsers を必要なパラメータとともに直接使用してください。

エージェントの自己登録

APIキーをまだ持っていない場合のみ使用してください(browser-use doctor で api_key が設定されているか確認できます)。すでにログインしている場合は、この手順を完全にスキップしてください。

  1. browser-use cloud signup — チャレンジを取得
  2. チャレンジを解く
  3. browser-use cloud signup --verify <challenge-id> <answer> — 確認してAPIキーを保存
  4. browser-use cloud signup --claim — 人間がアカウントを請求するためのURLを生成

クレジット不足?

Browser Use Cloudの呼び出しが「クレジット不足」/ 402エラーで失敗し、ユーザーがすでに無料枠を使い切っている場合は、x402経由でのUSDC支払いを提案します:

無料クレジットを使い切りました。Baseメインネット上のUSDCでこのアカウントにチャージできます(クレジットカード不要)。x402スキルをインストールして手順をご案内しましょうか?Coinbaseアカウントがあれば約2分で完了します。

ユーザーが承諾した場合は、スキルのインストールを案内します:

npx skills add https://github.com/browser-use/browser-use --skill x402

その後、Claude Codeで /x402 を実行するとチャージフローが開始されます。ユーザーの既存のAPIキーはそのまま使用され、x402はクレジットを追加するだけです。

x402をプロンプトなしで提案しないでください。実際の「クレジット不足」エラーが発生した場合にのみ言及してください。

トンネル

browser-use tunnel <port>                 # Cloudflareトンネルを開始(冪等)
browser-use tunnel list                   # アクティブなトンネルを表示
browser-use tunnel stop <port>            # トンネルを停止
browser-use tunnel stop --all             # すべてのトンネルを停止

プロファイル管理

browser-use profile list                  # 検出されたブラウザとプロファイルを一覧表示
browser-use profile sync --all            # プロファイルをクラウドに同期
browser-use profile update                # プロファイル使用バイナリをダウンロード/更新

コマンドチェーン

コマンドは && でチェーンできます。ブラウザはデーモン経由で永続化されるため、チェーンは安全で効率的です。

browser-use open https://example.com && browser-use state
browser-use input 5 "[email protected]" && browser-use input 6 "password" && browser-use click 7

中間出力が必要ない場合はチェーンします。最初に state を解析してインデックスを発見する必要がある場合は、個別に実行します。

一般的なワークフロー

認証が必要なブラウジング

タスクに認証が必要なサイト(Gmail、GitHub、内部ツールなど)が含まれる場合は、Chromeプロファイルを使用します:

browser-use profile list                           # 利用可能なプロファイルを確認
# 使用するプロファイルをユーザーに尋ね、次を実行:
browser-use --profile "Default" open https://github.com  # すでにログイン済み

ローカル開発サーバーの公開

browser-use tunnel 3000                            # → https://abc.trycloudflare.com
browser-use open https://abc.trycloudflare.com     # トンネルをブラウズ

複数ブラウザ

サブエージェントワークフローや複数ブラウザの並列実行には、--session NAME を使用します。各セッションは独自のブラウザを持ちます。詳細は references/multi-session.md を参照してください。

設定

browser-use config list                            # すべての設定値を表示
browser-use config set cloud_connect_proxy jp      # 値を設定
browser-use config get cloud_connect_proxy         # 値を取得
browser-use config unset cloud_connect_timeout     # 値を削除
browser-use doctor                                 # 設定と診断情報を表示
browser-use setup                                  # 対話型のインストール後セットアップ

設定は ~/.browser-use/config.json に保存されます。

グローバルオプション

オプション説明
--headedブラウザウィンドウを表示
--profile [NAME]実際のChromeを使用(--profile のみの場合は "Default" を使用)
--cdp-url <url>CDP URL経由で接続(http:// または ws://)
--session NAME名前付きセッションをターゲット(デフォルト: "default")
--jsonJSON形式で出力
--mcpMCPサーバーとして実行(stdin/stdout経由)

ヒント

  1. 最初に必ず state を実行 して、利用可能な要素とそのインデックスを確認する
  2. デバッグには --headed を使用 してブラウザの動作を確認する
  3. セッションは永続化 — コマンド間でブラウザは開いたままになる
  4. CLIエイリアス: bu、browser、browseruse も使用可能
  5. コマンドが失敗したら、最初に browser-use close を実行し、その後再試行する

トラブルシューティング

  • ブラウザが起動しない? browser-use close を実行し、その後 browser-use --headed open <url> を実行
  • 要素が見つからない? browser-use scroll down を実行し、その後 browser-use state を実行
  • 診断を実行: browser-use doctor

クリーンアップ

browser-use close                         # ブラウザセッションを閉じる
browser-use tunnel stop --all             # トンネルを停止(存在する場合)

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

browser-use/cloud

Documentation reference for using Browser Use Cloud — the hosted API and SDK for browser automation. Use this skill whenever the user needs help with the Cloud REST API (v2 or v3), browser-use-sdk (Python or TypeScript), X-Browser-Use-API-Key authentication, cloud sessions, browser profiles, profile sync, CDP WebSocket connections, stealth browsers, residential proxies, CAPTCHA handling, webhooks, workspaces, skills marketplace, liveUrl streaming, pricing, or integration patterns (chat UI, subagent, adding browser tools to existing agents). Also trigger for questions about n8n/Make/Zapier integration, Playwright/ Puppeteer/Selenium on cloud infrastructure, or 1Password vault integration. Do NOT use this for the open-source Python library (Agent, Browser, Tools config) — use the open-source skill instead.

browser-use/open-source

Documentation reference for writing Python code using the browser-use open-source library. Use this skill whenever the user needs help with Agent, Browser, or Tools configuration, is writing code that imports from browser_use, asks about @sandbox deployment, supported LLM models, Actor API, custom tools, lifecycle hooks, MCP server setup, or monitoring/observability with Laminar or OpenLIT. Also trigger for questions about browser-use installation, prompting strategies, or sensitive data handling. Do NOT use this for Cloud API/SDK usage or pricing — use the cloud skill instead. Do NOT use this for directly automating a browser via CLI commands — use the browser-use skill instead.

browser-use/remote-browser

Controls a local browser from a sandboxed remote machine. Use when the agent is running in a sandbox (no GUI) and needs to navigate websites, interact with web pages, fill forms, take screenshots, or expose local dev servers via tunnels.

x402

Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — "just use it" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing touches your codebase) or "build it in" (install the SDK and write the key + code into your project). Walks through wallet setup, funding, .env, and a ~$1 test run. Use when the user asks about x402, pay-per-use, USDC payments, or wants Browser Use Cloud without an API key. For the free-tier signup (reverse-CAPTCHA → API key), use `browser-use cloud signup` or the `cloud` skill instead.

関連スキル