multi-agents-browser CLAUDE.md

multi-agents-browser CLAUDE.md is an instructions file for coding agents from zzhan111/multi-agents-browser. It costs 2,053 tokens per session, scanned A, original, MIT.

Project instructions for MultiAgentsBrowser, a browser automation project whose current command and MCP name are ma-browser.

In plain words
What is it for?
Maintaining the browser automation code, navigation recording, portable element selectors, trace export, and the legacy deployment and environment conventions.
Why use it?
They preserve compatibility with the old bb-browser names while explaining the newer naming and completed browser-tracing work.

Instructions file

Install

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.

agentmods
npx agentmods add instructions/zzhan111/multi-agents-browser/claude-md
Clone the repo
git clone --depth 1 https://github.com/zzhan111/multi-agents-browser

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 multi-agents-browser CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/zzhan111/multi-agents-browser/claude-md.svg)](https://agentmods.dev/instructions/zzhan111/multi-agents-browser/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/zzhan111/multi-agents-browser/claude-md"><img src="https://agentmods.dev/badge/instructions/zzhan111/multi-agents-browser/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,053 This file is loaded in full into every session.
When invoked 2,053 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.02053 $0.02053
Opus 5 $0.01026 $0.01026
Sonnet 5 $0.00411 $0.00411
Haiku 4.5 $0.00205 $0.00205

Measured 3d ago against content hash ffdf8dc3655f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

multi-agents-browser 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 3d 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.

CLAUDE.md · 137 lines

How it starts

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

CLAUDE.md

项目改名 → MultiAgentsBrowser / ma-browser(2026-06-10)

本项目由 bb-browser(fork 自 epiral/bb-browser)改名为 MultiAgentsBrowser,CLI/MCP 名 ma-browser,迁到独立仓库 github.com/zzhan111/multi-agents-browser(保留 epiral credit,见 README/LICENSE)。本地工作目录仍是 Z:\Apps\bb-browser

作为历史兼容层有意保留、改动代码时勿动

  • BB_* 环境变量(BB_BROWSER_HOME / BB_SESSION_* / BB_TRACE_CAPACITY 等)
  • ~/.bb-browser 数据目录、x-bb-* HTTP 头、bbTabId 协议字段
  • Z:\Apps\bb-browser-tray 部署目录名(exe 已改 ma-browser-tray.exe
  • epiral/bb-sites 社区适配器仓库链接、CHANGELOG.md(带 legacy 注的历史条目)

新增改动应使用 ma-browser 命名。运维链路细节见用户记忆 project-rename-ma-browser / bb-chain-guard / deployment-after-commit

Trace Export — 已完成改进(2026-05-18)

以下原 roadmap 项已全部实现,记录于此供历史回溯。当前如需新增改进,请在文末"后续待改进项"追加。

✅ P1: 导航事件录制

  • trace-inject.ts 监听 popstatehashchange,捕获 SPA 内导航
  • cdp-connection.tsPage.frameNavigated(仅主框架)时发出 navigation trace 事件
  • tab-state.tsaddTraceNavigation 按 URL 去重,避免 CDP redirect 链产生重复
  • 导出脚本中渲染为 page.goto(url);与 activeTab.url 相同的首条 navigation 会被跳过避免双重 goto

✅ P1: 选择器可移植性

ExportDialog 提供三个模式:

  • AutorefcssSelectorxpath(保留 ma-browser ref 优先级)
  • CSScssSelectorxpath,便于在标准 Playwright/Selenium 环境运行
  • XPath:仅用 xpath,跨 DOM 变化更稳定

JS/Playwright 在 XPath 模式下使用 xpath=... 前缀;Python 切换到 By.XPATH

✅ P2: 步骤间等待机制

ExportDialog 新增"智能等待"开关(默认开启):

  • JS / Playwright:在 click/fill/select/check 前插入 page.waitForSelector(sel)locator(sel).waitFor()
  • Python:插入 wait.until(EC.presence_of_element_located((by, sel)))

✅ P2: 字符串转义

esc() 替换为 q(str) → 返回 JSON.stringify(str),自动处理换行、制表符、Unicode、引号、反斜杠。生成的字符串字面量从单引号迁移到双引号。

✅ P3: Ring Buffer 上限

TRACE_CAPACITY 通过 BB_TRACE_CAPACITY 环境变量配置(默认 1000,最小 100)。缓冲首次写满时打印一次性 warning 到 daemon stderr:

[ma-browser] trace buffer full for tab <shortId> (cap=1000); oldest events will be discarded. Set BB_TRACE_CAPACITY to raise the limit.

后续待改进项

(暂无。)


线 C — 状态持久面 (State Persistence Plane) 实施记录(2026-06-03)

Read the full file on GitHub · 137 lines

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. 3d ago First seen · 137 lines · 2,053 tokens per session scan A ffdf8dc3655f

Subscribe to this mod's changes

multi-agents-browser CLAUDE.md is an instructions file published in the GitHub repository zzhan111/multi-agents-browser (1 stars, last pushed today), licensed MIT. It adds 2,053 tokens to every session, about $0.0103 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-31.

Related

Other instructions, from other repositories