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 instructions/platonai/browser4/claude-mdgit 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.01205 | $0.01205 |
| Opus 5 | $0.00602 | $0.00602 |
| Sonnet 5 | $0.00241 | $0.00241 |
| Haiku 4.5 | $0.00120 | $0.00120 |
Grade A, and why
Browser4 CLAUDE.md 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 — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Browser4 — Project Context for Claude
Architecture
browser4-cli (Rust) ──MCP over HTTP──▶ browser4-rest (Kotlin/Spring) ──▶ PulsarWebDriver (Kotlin/CDP)
▲ │
│ ▼
└──── e2e tests ────▶ Fixture HTTP server (Rust test harness)
- CLI:
cli/browser4-cli/— Rust binary, talks to backend via MCP tool calls - Backend:
browser4-rest/— Spring Boot,MCPToolControllerdispatches tools - Browser driver:
browser4-core/browser4-browser/—PulsarWebDriverwraps CDP (Chrome DevTools Protocol) - Agent tools:
browser4-agentic/—AgentToolManagermaps MCP tool names → PulsarWebDriver methods
Key dispatch chain (CLI → browser)
- CLI builds MCP tool call:
{tool: "browser_type", arguments: {ref: "#el", text: "hi"}} - Backend
MCPToolController.callTool()→dispatchToToolExecutor() normalizeFrontendToolCall()appliesFRONTEND_TOOL_NAME_ALIASES(e.g.,browser_type→fill)DefaultArgumentNormalizermapsref→selector, stripssessionId, converts snake_case keysresolveMcpToolCall()→ToolCall("tab", "fill", args)AgentToolManager.execute()→executor.callFunctionOn(toolCall, driver)→PulsarWebDriver.fill()
Batch commands
Batch commands go through handleCommandBatch() → handleBatchTool() in MCPToolController.
The CLI's compile_batch_request() builds step arrays with op: "tool" entries.
preFocusSelector is only added for keydown/keyup steps (not fill/type/press).
E2E test structure
- Tests live in
cli/browser4-cli/tests/e2e/ scenarios/mod.rs— registry of all scenarios withrequires_browser4,level,groupscenarios/browser.rs— tests against the real Browser4 backendscenarios/batch.rs— batch-command tests against the real backendscenarios/mock_server.rs— tests againstMockBrowser4Server(no real backend needed)- Real-backend tests use HTML fixtures from
browser4-tests/pulsar-tests-common/src/main/resources/static/b4/ - State verification:
wait_for_state_or_abort()pollsread_interactive_state()which evalsstate-log.textContent
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 · 89 lines · 1,205 tokens per session scan A e23151b01210
Browser4 CLAUDE.md is an instructions file published in the GitHub repository platonai/Browser4 (1,114 stars, last pushed 3d ago), licensed Apache-2.0. It adds 1,205 tokens to every session, about $0.0060 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 instructions, from other repositories
eric-task-master AGENTS.md
AGENTS.md instructions for npcworkspace-cmyk/eric-task-master: Read ARCHITECTURE.md before changing code.
comet-mcp CLAUDE.md
Instructions for hanzili/comet-mcp, covering claude.md, what this is, architecture, 6 tools and key implementation details.
browser-harness CLAUDE.md
Instructions for browser-use/browser-harness, a project described as: Browser Harness | Self-healing harness that enables LLMs to complete any task.
intelligent-terminal rust-wta.instructions.md
File-scoped conventions for the WTA Rust crate.
intelligent-terminal rust.instructions.md
Concise Rust coding conventions for this repository.
servo-fetch AGENTS.md
Instructions for konippi/servo-fetch, covering agents.md, project overview, setup and commands, code conventions and rust style.