browser4-cli

browser4-cli is a skill for Claude Code from platonai/Browser4. It costs 52 tokens per session (10,159 once invoked), scanned C, original, Apache-2.0.

A command-line browser automation tool for Chrome or Chromium. It can navigate pages, interact with controls, fill forms, take screenshots, test web applications, and extract information using accessibility-tree snapshots.

In plain words
What is it for?
Use it for browser-based testing, form submission, screenshots, web navigation, and extracting content from interactive pages.
Why use it?
It lets an AI agent operate a website and verify the result after each action, including when a page has no simple API.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions AGENTS.md.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is From a Browser4 checkout, use `./b4w.sh` (Bash/Linux/macOS) or `./b4w.ps1` (PowerShell) instead of an installed binary — they build the runtime bundle and start.

Good fit Use it for browser-based testing, form submission, screenshots, web navigation, and extracting content from interactive pages.

Compare 6 skills from other repositories ↓
About the project

Browser4 is an AI-native browser engine that lets autonomous agents and people control real browsers, extract information from web pages, and automate tasks at scale. It combines browser interaction through a Rust CLI and MCP with deterministic selectors, machine-learning clustering, and language-model extraction. The catalogue entries provide skills and instructions for using Browser4.

platonai/Browser4 · 1,195 stars · on GitHub · browser4.io

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/platonai/Browser4
agentmods
npx agentmods add skills/platonai/browser4/browser4-cli

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for browser4-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/platonai/browser4/browser4-cli/github.svg)](https://agentmods.dev/skills/platonai/browser4/browser4-cli)
Your own site
<a href="https://agentmods.dev/skills/platonai/browser4/browser4-cli"><img src="https://agentmods.dev/badge/skills/platonai/browser4/browser4-cli/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for browser4-cli

Your own site · 80×15
<a href="https://agentmods.dev/skills/platonai/browser4/browser4-cli"><img src="https://agentmods.dev/badge/skills/platonai/browser4/browser4-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,159 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 162
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high YARA Match · line 162
    YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
    Fix: Remove the malware payload or compromised file entirely. Investigate how it entered the skill and audit all other artifacts for additional indicators of compromise.
  • medium Rogue Agent · line 215
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 215
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.10159
Opus 5.5 $0.00021 $0.04064
Sonnet 5.5 $0.00010 $0.02032
Haiku 4.5 $0.00005 $0.01016

Measured yesterday against content hash 065f3f4db7d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

browser4-cli scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -fsSL https://browser4.oss-cn-beijing.aliyuncs.com/scripts/install-browser4-cli.sh | bash # Linux/macOS

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -fsSL https://browser4.oss-cn-beijing.aliyuncs.com/scripts/install-browser4-cli.sh | bash # Linux/macOS
skills/browser4-cli/SKILL.md · 364 lines

How it starts

The opening of the file, as written. The whole thing — 364 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Browser Automation with browser4-cli

Browser automation CLI for AI agents — Chrome/Chromium via CDP with accessibility-tree snapshots.

Decision layer only. Every topic links to a deep dive; load only what the task needs (§7 Reference Map).

From a Browser4 checkout, use ./b4w.sh (Bash/Linux/macOS) or ./b4w.ps1 (PowerShell) instead of an installed binary — they build the runtime bundle and start the backend from the checkout. Full notes: development-mode.md, AGENTS.md.

1. Core Loop

Keep these in mind — ordered by priority:

  • 🔝 Minimize user disturbance (top rule) — before launching anything new, always check what already exists on this machine (attach --list, list, status). If a browser with the right login state is already running, attach to it rather than open a fresh one. If a named session already drove the target site, goto on it instead of close + open. A new Browser4 browser is a new window or a new background process — both are disturbance. Details: §2 Browser Source & Connection, browser-modes.md.
  • Headless default for AI agents — use --headed only when the user asks for a visible window, a human must act, or anti-bot escalation (retry once). Details: browser-modes.md.
  • Backend is long-lived — never stop it between commands — one backend process is reused for the whole task; "run a command, then shut it down" is not the intended flow. On-demand startup covers only the first command and a genuine death (host killed the process), so a restart per command is a fault to diagnose with browser4-cli status, not expected behaviour.
  • Dev mode — running from a checkout (ROOT.md + pom.xml) pins one backend port per checkout; stale bundle → the command names the reason and rebuild hint. See development-mode.md.

Read the full file on GitHub · 364 lines

Files

What ships with it

49 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · -2 lines 065f3f4db7d8
  2. 2d ago Changed c4708c1c0867
  3. 3d ago Changed · -112 lines 08801f116a7d
  4. 5d ago Changed · -23 lines 4a6f7ad59fd9
  5. 10d ago Changed 29461cf8f03a
  6. 11d ago Changed · +1 lines 1fdfd59ff4e3
  7. 16d ago Changed 8be9013409d0
  8. 18d ago Changed 1a0b4422b708
  9. 21d ago Changed · +9 lines e3e2329b35cf
  10. 26d ago First seen · 491 lines · 52 tokens per session scan C 94d4aa30418f

Subscribe to this mod's changes

browser4-cli is a skill published in the GitHub repository platonai/Browser4 (1,195 stars, last pushed yesterday), licensed Apache-2.0. It adds 52 tokens to every session and 10,159 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

browser4-cli compared with skills from other repositories

browser4-cli next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
browser4-cliplatonai/Browser4Skill1.2kyesterdayApache-2.0C52Claude Code
e2e-testing-patternswshobson/agentsSkill43kyesterdayMITA51Claude Code
penguin-testing-electronPrism-Shadow/penguin-harnessSkill3.4ktodayApache-2.0A84Claude Code, Codex
browser-testing-with-screenshotsAgentWorkforce/relaySkill1.2ktodayApache-2.0A32Claude Code
browser_harnessbrowser-use/browser-harnessSkill19kyesterdayMITA0Claude Code
ChromeiFurySt/open-browser-useSkill4381mo agoMITA34Claude Code, Codex
open-browser-useiFurySt/open-browser-useSkill4381mo agoMITA97Codex