Browser Terminal Use Agentのロゴ

Browser Terminal Use Agent

コミュニティ
chaokunyang
browser-terminal-use-agent

Operate Browser Terminal Use as an execution bridge between local CLI and browser-hosted terminals. Use when Codex needs to run or iterate shell commands in non-local environments through a browser terminal, build cloud-side verifiable execution loops for LLM agents, debug remote runtime issues (GPU, containers, bastion-only networks), or manage daemon/extension binding, timeout, cancel, and optional token hardening.

概要

公開者chaokunyang
リポジトリbrowser-terminal-use
スキル名browser-terminal-use-agent
スター
26
フォーク
1
同梱ファイル
2
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 2個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    chaokunyangがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Browser Terminal Use Agent」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/chaokunyang/browser-terminal-use/tree/main/skill/browser-terminal-use-agent
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/chaokunyang/browser-terminal-use.git /tmp/browser-terminal-use
mkdir -p .claude/skills
cp -r /tmp/browser-terminal-use/skill/browser-terminal-use-agent .claude/skills/browser-terminal-use-agent
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでBrowser Terminal Use Agentを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にBrowser Terminal Use Agentを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Browser Terminal Use Agentは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Browser Terminal Use Agent

Overview

Use this skill to drive Browser Terminal Use as an agent loop runner: issue commands locally, execute in a bound browser terminal tab, stream output, and use remote exit codes as the control signal for next actions.

Read references/runbook.md for concrete command templates and troubleshooting mappings.

Workflow

  1. Start or verify daemon connectivity.
  2. Ensure extension and terminal tab are ready, then prove the tab is actually bound with a short smoke probe.
  3. Run iterative command loops with explicit timeout and request id.
  4. Diagnose failures and recover quickly.
  5. Enable token hardening when security requirements increase.

1) Start Or Verify Daemon Connectivity

Use global commands:

bash
browterm-daemon --host 127.0.0.1 --port 17373
browterm health

Start daemon on localhost and verify health before running commands.

bash
curl http://127.0.0.1:17373/v1/health

Treat daemon health failure as a hard blocker for agent loops.

2) Ensure Extension And Tab Readiness

Load extension from extension/ in Chrome developer mode. Configure extension bridge URL as ws://127.0.0.1:17373/extension. Bind the browser terminal tab by clicking extension action once. Refresh the target terminal tab after extension reload.

Do not treat browterm health with extensionConnected: true as sufficient evidence that a usable terminal tab exists. Prove tab attachment with a trivial bounded command before any long-running request:

bash
browterm exec --request-id req-tab-smoke --timeout-ms 15000 --json "printf bt-ready"

If the smoke probe does not return the expected sentinel text quickly, stop and treat it as a hard blocker. Common causes are:

  • no browser terminal tab is open
  • the tab is open but not bound to the extension
  • the extension is connected but attached to the wrong tab
  • output is only browser or extension telemetry rather than command output

3) Run Iterative Agent Loops

Use exec as the default operation and keep each step deterministic.

  • Provide --timeout-ms for bounded execution.
  • Provide --request-id so cancellation and traceability stay explicit.
  • Prefer --json when post-processing output in automation.
  • Use the command exit code as the branching condition for next agent step.

Example:

bash
browterm exec --request-id req-env-check --timeout-ms 120000 --json "uname -a"

Hang Detection Rules

  • Run a short smoke probe first. Never start a long remote test until that probe succeeds.
  • If a trivial probe stays queued, times out, or produces no command output within its timeout window, cancel it and raise an error immediately.
  • If output consists only of browser or extension telemetry and not the command's expected stdout, treat that as "tab not actually attached" and fail early.
  • For longer commands, do not cancel just because stdout is quiet.
  • If a longer command appears hung, first check daemon health and whether a browser terminal tab is still bound.
  • Only treat the run as a tab-binding or transport failure when health or tab checks fail, or when output shows only browser or extension telemetry instead of terminal output.

Quote-Safe Command Rules

These are hard rules, not suggestions. If a command is not quote-safe and stable, do not run it through browterm exec. Rewrite it first.

  • Never pass multiline commands to browterm exec.
  • Never use heredoc (<<EOF) inside browterm exec command strings.
  • Never send commands with unbalanced or hard-to-audit quoting.
  • Never rely on shell state that is not made explicit in the same command string.
  • Always prefer one-line commands joined by ; or &&.
  • Always rewrite fragile commands into quote-safe, deterministic forms before execution.
  • For generated files, use printf '%s\n' ... > file instead of heredoc.
  • For JSON payload files, prefer jq -n '...' > file.
  • If the quoting still looks brittle after one rewrite, stop using inline shell and generate a short script with printf '%s\n' ... > /tmp/<name>.sh; bash /tmp/<name>.sh.

Safe patterns:

bash
browterm exec --request-id req-basic --timeout-ms 120000 --json "hostname; whoami; pwd"

browterm exec --request-id req-json --timeout-ms 120000 --json \
  "jq -n '{input_ids:[1,2,3],stream:false}' > /tmp/req.json; cat /tmp/req.json"

browterm exec --request-id req-script --timeout-ms 120000 --json \
  "printf '%s\n' '#!/usr/bin/env bash' 'set -euo pipefail' 'echo ok' > /tmp/bt_step.sh; bash /tmp/bt_step.sh"

Avoid:

bash
# Avoid multiline/heredoc payloads inside browterm exec
browterm exec --request-id bad --timeout-ms 120000 --json \
  'cat >/tmp/x <<EOF
line1
EOF'
bash
# Avoid nested or ambiguous quoting that is difficult to audit quickly
browterm exec --request-id bad --timeout-ms 120000 --json \
  "python -c 'print(\"unterminated or fragile shell composition here)\""

Cancel stuck or obsolete work by request id:

bash
browterm cancel req-env-check

4) Diagnose And Recover

When execution fails, check in order:

  1. Daemon process and /v1/health.
  2. Extension options bridge URL.
  3. Bound tab status (rebind if needed).
  4. Retry command with debug logging on daemon.

Use error-specific playbooks in references/runbook.md.

5) Enable Optional Token Hardening

Keep default local setup tokenless for fastest setup. Enable --token on daemon and CLI for stricter local security boundaries. When enabled, keep daemon, extension options, and CLI token values identical.

Execution Principles

  • Keep one active command per loop step.
  • Prefer short, composable commands over long opaque scripts.
  • Do not execute a command string you cannot quickly prove is quote-safe and stable.
  • Persist request ids in logs for auditability.
  • Re-run with focused probes before broad retries.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Browser Terminal Use Agent」では何ができますか?

Operate Browser Terminal Use as an execution bridge between local CLI and browser-hosted terminals. Use when Codex needs to run or iterate shell commands in non-local environments through a browser terminal, build cloud-side verifiable execution loops for LLM agents, debug remote runtime issues (GPU, containers, bastion-only networks), or manage daemon/extension binding, timeout, cancel, and optional token hardening.

TypingMindでBrowser Terminal Use Agentを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Browser Terminal Use Agentはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにBrowser Terminal Use Agentをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/chaokunyang/browser-terminal-use/tree/main/skill/browser-terminal-use-agentを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Browser Terminal Use Agentを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Browser Terminal Use Agentで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもBrowser Terminal Use Agentを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Browser Terminal Use Agent」は無料ですか?

はい。chaokunyangがApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇