project

project is a cursor rule for Cursor from compnew2006/browser-controller. It costs 1,686 tokens per session, scanned A, original, MIT.

Project rules and technical context for browser-controller, a system that lets AI agents control browser tabs through a local server and Chrome extension.

In plain words
What is it for?
Use it when changing the TypeScript server, daemon, Chrome extension, browser tools, tab selection, local networking, or stored state.
Why use it?
It records the architecture and rules that prevent agents from targeting the wrong tab or breaking communication between the components.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when changing the TypeScript server, daemon, Chrome extension, browser tools, tab selection, local networking, or stored state.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/compnew2006/browser-controller/project
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.

Clone the repo
git clone --depth 1 https://github.com/compnew2006/browser-controller

Made for: Cursor.

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 project

README.md
[![agentmods](https://agentmods.dev/badge/rules/compnew2006/browser-controller/project/github.svg)](https://agentmods.dev/rules/compnew2006/browser-controller/project)
Your own site
<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.

agentmods 80×15 button for project

Your own site · 80×15
<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>
Per session 1,686 This file is loaded in full into every session.
When invoked 1,686 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01686 $0.01686
Opus 5.5 $0.00674 $0.00674
Sonnet 5.5 $0.00337 $0.00337
Haiku 4.5 $0.00169 $0.00169

Measured 10d ago against content hash 44c6ddb30779, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 10d 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.

.cursor/rules/project.mdc · 73 lines

How it starts

The opening of the file, as written. The whole thing — 73 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 (/pair returns the token, /status returns 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

  1. tabId is mandatory for every page-interaction tool. navigate is the ONE exception (optional: without it, it opens a new background tab owned by the session). tabs list takes no tabId; close and focus need one. Enforced by the tabIdParam schema in mcp-server/src/tools/types.ts.
  2. background.js never acts on "the active tab" implicitly — resolveTab(tabId) is the entry point. The only active-tab lookup left is choosing the window for a new tab (getActiveTab in handleNavigate).

Element identification (one ref grammar, one locator)

  • Refs are e<n> only. extension/lib/page-dom.js issues them (refFor): an element keeps its ref for as long as its document lives. Refs live in the page registry; nothing is stamped onto the page DOM.
  • Every target goes through parseTarget in extension/lib/target.js and then resolveTarget in extension/lib/page-dom.js: e12 is a ref; text=Sign in is a visible element by text; 120,80 is a viewport point; anything else (#save, x-1) is a CSS selector.
  • A stale ref re-finds its element through the snapshot descriptor kept in fallbackByTab (extension/lib/state.js). The descriptor holds a robust selector from extension/utils/smart-selector.js, the text, the role, and the nth ordinal, so one of several equal buttons is still picked correctly. When nothing matches it fails REF_GONE or REF_NOT_FOUND.

Read the full file on GitHub · 73 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. 10d ago Changed · +1 lines · +84 tokens per session 44c6ddb30779
  2. 24d ago Changed · +13 tokens per session 7998d537ac9b
  3. 1mo ago Changed · +2 lines · +131 tokens per session 5f51bfc26098
  4. 1mo ago Changed · -10 lines · -84 tokens per session 9f4fa61ee012
  5. 1mo ago Changed · +4 lines · +261 tokens per session be863afe089e
  6. 3mo ago First seen · 76 lines · 1,281 tokens per session scan A 38aba765156f

Subscribe to this mod's changes

project is a cursor rule published in the GitHub repository compnew2006/browser-controller (11 stars, last pushed 5d ago), licensed MIT. It adds 1,686 tokens to every session, about $0.0067 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.

Related

project compared with cursor rules from other repositories

project next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
projectcompnew2006/browser-controllerCursor rule115d agoMITA1,686Cursor
globalFreePeak/db-mcp-serverCursor rule4884d agoMITA289Cursor
real-browser-mcpofershap/real-browser-mcpCursor rule613d agoMITA1,661Cursor
frihet-fiscalFrihet-io/frihet-mcpCursor rule15yesterdayMITA9Cursor
invictum-browserinvictumhr/ai-invictum-browser-bridgeCursor rule06d agoMITA129Cursor
typescript-standardsaaydin-tr/swagger-navigator-mcpCursor rule25mo agoMITA888Cursor
ponytailDietrichGebert/ponytailCursor rule204k11d agoMITA604Cursor