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.
git clone --depth 1 https://github.com/compnew2006/browser-controllerWrote 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.
[](https://agentmods.dev/rules/compnew2006/browser-controller/project)<a href="https://agentmods.dev/rules/compnew2006/browser-controller/project"><img src="https://agentmods.dev/badge/rules/compnew2006/browser-controller/project/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.
<a href="https://agentmods.dev/rules/compnew2006/browser-controller/project"><img src="https://agentmods.dev/badge/rules/compnew2006/browser-controller/project.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01542 | $0.01542 |
| Opus 5.5 | $0.00617 | $0.00617 |
| Sonnet 5.5 | $0.00308 | $0.00308 |
| Haiku 4.5 | $0.00154 | $0.00154 |
Grade A, and why
project 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 9d 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 — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
browser-controller
Multi-client MCP server (TypeScript) + Chrome extension (plain JS). Renamed from real-browser-mcp (v2.0.0). npm browser-controller, MCP id io.github.noiemany/browser-controller.
Three-piece architecture
Agent ─stdio─ thin MCP client (index.ts) ─IPC─► daemon (daemon.ts, owns :7225) ─WS─► extension (background.js)
- The daemon owns the WS server on 7225 AND an HTTP server on the same port (
/pairreturns the token,/statusreturns agents). The extension auto-fetches the token via/pair(MV3 can't read the filesystem). - Bind host is
127.0.0.1(NOT 'localhost' — macOS resolves localhost to IPv6 ::1 first and refuses IPv4). Both WS connect and HTTP fetch use 127.0.0.1. - Thin client auto-spawns the daemon if absent. State in
~/.browser-controller/.
The two invariants
tabIdis mandatory for every page-interaction tool.navigateis the ONE exception (optional, active-tab fallback).tabscreate/close/focus/list take no target tabId. Enforced viarequireTabId()intools/types.ts.- background.js never acts on "the active tab" implicitly —
resolveTab(tabId)is the entry point. The active-tab fallback survives ONLY insidehandleNavigate.
Element identification (3 layers + auto-recovery)
data-mcp-ref="e5"(fast, breaks on re-render)- robust CSS selector via
smart-selector.js(climbs ≤3 ancestors, ignores React/generated classes+ids) - text+role+tag scan (survives total class/id churn) — resolves the correct sibling via
nthordinal when several elements share text+role (e.g. 3 "Like" buttons)
autoReSnapshot: on ref failure (virtualized feed), snapshot the tab and embedfreshRefsin the response so the agent retries in one step. Do NOT auto-retry the click (non-idempotent).browser_scrollreturnsrefsMayBeStale: trueas a hint.isNew: each snapshot tracksrole|namefingerprints per tab; elements appearing since the last snapshot are taggedisNew: trueso the agent can focus on what changed (big token saver after an overlay/dropdown opens). State lives inlastSnapshotFingerprintsMap, cleared on tab close.
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.
- 9d ago Changed · +4 lines · +261 tokens per session be863afe089e
- 1mo ago First seen · 76 lines · 1,281 tokens per session scan A 38aba765156f
project is a cursor rule published in the GitHub repository compnew2006/browser-controller (8 stars, last pushed yesterday), licensed MIT. It adds 1,542 tokens to every session, about $0.0062 per session on Opus 5.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 cursor rules, from other repositories
global
You are an expert in Golang, TypeScript, and JavaScript development, focusing on scalable, maintainable, and performant code. Follow these principles for all suggestions, code generation, and responses.
real-browser-mcp
Instructions for using Real Browser MCP to control the user's actual browser.
frihet-fiscal
Spanish & EU fiscal context for operating the Frihet ERP MCP tools correctly.
invictum-browser
Use Invictum Browser Bridge whenever the user requests IBB, IBG, Invictum Browser Bridge, or Invictum Browser Gate.
typescript-standards
// Good: Typed error handling function loadConfig(): Config { try { // ... loading logic } catch (error) { if (error instanceof yaml.YAMLException) { throw new Error(Invalid YAML in configuration file: ${error.message}); } throw error; } }.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.