Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/platonai/browser4/browser4-clinpx skills add platonai/Browser4 --skill browser4-cligit clone --depth 1 https://github.com/platonai/Browser4What 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00052 | $0.06355 |
| Opus 5 | $0.00026 | $0.03178 |
| Sonnet 5 | $0.00010 | $0.01271 |
| Haiku 4.5 | $0.00005 | $0.00636 |
Grade A, and why
browser4-cli scanned grade A with 0 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 2d ago.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 291 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.
Invocation
After installing (browser4-cli install), invoke commands directly — the docs use browser4-cli as the generic command name:
browser4-cli open --headless <url>
1. Core Loop
🖥️ Headless mode is the default for AI agents: Always open browsers with
--headlessunless the user explicitly asks to see the browser window ("show me the browser", "open visibly", "I want to watch", or "headed"). See Display Mode in §2.
1. OPEN browser4-cli open --headless <url> # headless by default for AI agents
browser4-cli goto <url> # or goto to navigate within existing session
2. SNAPSHOT browser4-cli snapshot -v 0 # capture accessibility tree (viewport 0 = current visible screen)
3. INTERACT browser4-cli click <ref> # use refs from the snapshot
browser4-cli fill <ref> <value>
browser4-cli press Enter
4. RE-SNAPSHOT browser4-cli snapshot -v 0 --auto-diff # verify what changed (diff vs previous)
5. EXTRACT browser4-cli htmlsnapshot get ... # or eval, or X-SQL (see §4)
Copy-Paste Template
browser4-cli open --headless "https://example.com" # headless by default for AI agents
browser4-cli snapshot -v 0 --stdout # read the page; note refs
browser4-cli fill <ref> "<value>" # interact
browser4-cli press Enter
browser4-cli wait --load networkidle
browser4-cli snapshot -v 0 --auto-diff --stdout # verify what changed
browser4-cli htmlsnapshot get text "<css-selector>" --all
For quick inline viewing without opening a file, add --stdout to any snapshot command.
2. Key Concepts
Element Refs
After commands that modify browser state, browser4-cli saves an accessibility-tree snapshot — a YAML file showing the page structure:
- generic [ref=e7]:
- link "News" [ref=e191]: /url: https://example.com/news
- textbox "Search query" [ref=e35]
- button "Search" [ref=e25]
What ships with it
33 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.
- methodology.md 14 KB
- references/agent.md 6.3 KB
- references/attach.md 9.4 KB
- references/browser-state-import.md 8.2 KB
- references/config.md 4.0 KB
- references/crawl.md 14 KB
- references/css-selector-bridge.md 12 KB
- references/decision-trees.md 9.5 KB
- references/htmlsnapshot-scenarios-advanced.md 14 KB
- references/htmlsnapshot-scenarios-amazon.md 25 KB
- references/htmlsnapshot-scenarios-audit.md 17 KB
- references/htmlsnapshot-scenarios-extraction.md 14 KB
- references/htmlsnapshot-scenarios.md 8.0 KB
- references/htmlsnapshot.md 20 KB
- references/load-options-decision.md 4.4 KB
- references/load-options-guide.md 14 KB
- references/loop.md 13 KB
- references/power-dom.md 6.3 KB
- references/quick-patterns.md 10 KB
- references/quickstart.md 5.9 KB
- references/shell-quoting.md 6.7 KB
- references/skills.md 9.1 KB
- references/snapshot.md 11 KB
- references/storage-state.md 5.0 KB
- references/swarm.md 12 KB
- references/tab-management.md 5.5 KB
- references/webdb.md 5.7 KB
- references/x-sql-array-functions.md 3.4 KB
- references/x-sql-dom-functions.md 16 KB
- references/x-sql-dom-load-select.md 3.3 KB
- references/x-sql-dom-select-functions.md 10 KB
- references/x-sql-string-functions.md 16 KB
- references/x-sql.md 20 KB
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.
- 2d ago First seen · 291 lines · 52 tokens per session scan A f551d7b3c9d4
browser4-cli is a skill published in the GitHub repository platonai/Browser4 (1,114 stars, last pushed 2d ago), licensed Apache-2.0. It adds 52 tokens to every session and 6,355 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
browser_harness
../../SKILL.md.
Chrome
Browser automation for the user's Chrome browser. Use for browser tasks that require the user's cookies, logged-in sessions, existing tabs, extensions, or remote authenticated sites.
open-browser-use
Platform-neutral guidance for using Open Browser Use, the open-source Chrome automation stack for AI agents. Use when an agent needs to install, verify, troubleshoot, or operate Open Browser Use through its browser extension, native CLI, JavaScript SDK, Python SDK, Go SDK, or Browser Use style JSON-RPC methods; use…
browser-harness
Always use browser-harness for any web interaction: automation, scraping, testing, or site/app work.
deep-reverse
Use only for explicit web or API protocol reverse engineering: endpoint discovery, request replay, signature/token/encryption analysis, JavaScript runtime tracing, browser-independent reproduction, or crawler implementation that must not depend on browser automation. Do not use for one-off visible-page extraction or…
web-crawl
Get data from websites with the least necessary complexity. Use for quick lookups, visible-page extraction, search results, tables, pagination, detail-page traversal, downloadable files (Excel/CSV/PDF/ZIP), embedded page state, internal JSON/XHR APIs, bulk collection, reusable crawler generation, and delivery in any…