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/zzhan111/multi-agents-browser/agents-mdgit clone --depth 1 https://github.com/zzhan111/multi-agents-browserWhat 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.01685 | $0.01685 |
| Opus 5 | $0.00843 | $0.00843 |
| Sonnet 5 | $0.00337 | $0.00337 |
| Haiku 4.5 | $0.00169 | $0.00169 |
Grade A, and why
multi-agents-browser AGENTS.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 — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ma-browser Agent 开发规范
架构
CLI (packages/cli) ──HTTP──▶ Daemon (packages/daemon) ──CDP WebSocket──▶ Chrome
MCP (packages/mcp) ──HTTP──┘ │
┌────┴────┐
│ HTTP │
│ Server │
└────┬────┘
│
┌─────────┼─────────┐
│ │ │
CdpConnection │ CommandDispatch
(WebSocket) │ (request → handler)
│
TabStateManager
(短 ID, seq 序号,
per-tab 事件缓冲)
Daemon 组件:
- CdpConnection — 维持到 Chrome DevTools Protocol 的 WebSocket 长连接。自动发现 Chrome,管理 session 复用(每个 tab 一个 session)。
- TabStateManager — 管理 per-tab 状态。分配短 ID(targetId 末 4+ 位 hex,保证唯一)。维护全局单调递增
seq计数器。每个 tab 持有环形缓冲事件集合(network/console/errors)。 - CommandDispatch — 将
Request.action映射到处理函数。所有处理器接收CdpConnection和解析后的TabState,返回带tab(短 ID)和seq的Response。
核心概念:
- 短 tab ID — 取 CDP targetId 末尾,最少 4 字符,碰撞时自动扩展。所有请求/响应中用短 ID 标识 tab。
- seq 计数器 — 全局单调递增整数,每次操作和每个捕获事件都递增。支持
since过滤做增量查询。 - Per-tab 事件缓冲 — 环形缓冲(network: 500 条, console: 200 条, errors: 100 条),带 seq 标签。通过
since、filter、method、status、limit查询。
共享类型定义:packages/shared/src/protocol.ts
添加新命令
3 个文件:
packages/shared/src/protocol.ts— 添加 ActionType + Request 字段 + ResponseData 字段packages/daemon/src/command-dispatch.ts— 在dispatchRequest中添加处理分支packages/cli/src/commands/<name>.ts+packages/cli/src/index.ts— CLI 命令 + 路由
可选:packages/mcp/src/index.ts — 如果需要暴露为 MCP tool
设计不变量
改代码前必读。违反任何一条都是 bug。
- INV-1: 所有操作响应必须包含
tab(短 ID)和seq(序号) - INV-2: 观察类响应(network/console/errors)必须包含
cursor - INV-3: 无效 tab ID 必须报错,不允许静默 fallback
- INV-4:
seq全局单调递增,不可回退 - INV-5: per-tab 事件隔离 — tab A 的事件不会出现在 tab B 的查询中
- INV-6: tab 关闭时释放短 ID,清除事件缓冲
- INV-7:
tab_new在零 tab 时仍可工作(在ensurePageTarget之前处理)
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 · 154 lines · 1,685 tokens per session scan A 70da149a6574
multi-agents-browser AGENTS.md is an instructions file published in the GitHub repository zzhan111/multi-agents-browser (1 stars, last pushed 2mo ago), licensed MIT. It adds 1,685 tokens to every session, about $0.0084 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.
Other instructions, from other repositories
Browser4 CLAUDE.md
Instructions for platonai/Browser4, covering browser4 — project context for claude, architecture, key dispatch chain (cli → browser), batch commands and e2e test structure.
agentic-playwright selectors.instructions.md
Instructions for idavidov13/agentic-playwright, covering selector strategy, critical, instructions, phase 1: open and authenticate and phase 2: explore like a user.
scrapai-cli CLAUDE.md
Instructions for discourselab/scrapai-cli, covering claude.md, 1. who you are, 2. hard rules, 3. tools and 4. before you start: confirm the project.
chromeboost CLAUDE.md
Instructions for lordamdal/chromeboost, covering chromeboost — repo-developer guide, what chromeboost is, repository layout, development commands and tests/antibot/ (run locally; not in ci).
skills CLAUDE.md
Instructions for aemcoder/skills, covering claude.md, repository structure, slicc browser automation conventions, stateless tab targeting (since slicc pr #188) and tab-new returns a targetid.
xgrower-extension CLAUDE.md
Instructions for JoyyyceD/xgrower-extension, covering x grower extension — architecture notes, architecture, key files, auth flow and quota system.