Browser Terminal Use Agent logo

Browser Terminal Use Agent

Community
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.

Overview

Publisherchaokunyang
Repositorybrowser-terminal-use
Skill namebrowser-terminal-use-agent
Stars
26
Forks
1
Bundled files
2
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by chaokunyang on GitHub. Read the source before you install it.

Installation

Install the Browser Terminal Use Agent AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/chaokunyang/browser-terminal-use/tree/main/skill/browser-terminal-use-agent
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Browser Terminal Use Agent in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Browser Terminal Use Agent on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Browser Terminal Use Agent is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Browser Terminal Use Agent AI skill do?

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.

Why use Browser Terminal Use Agent on TypingMind?

Because you install it once and use it with any model. Browser Terminal Use Agent is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Browser Terminal Use Agent in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/chaokunyang/browser-terminal-use/tree/main/skill/browser-terminal-use-agent. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Browser Terminal Use Agent?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Browser Terminal Use Agent?

As many as you like. As long as a model supports skills, you can use Browser Terminal Use Agent with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Browser Terminal Use Agent AI skill free?

Yes. It is published on GitHub by chaokunyang under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇