openbrowser AGENTS.md

openbrowser AGENTS.md is an instructions file for Codex, OpenCode from dylansantwani/openbrowser. It costs 884 tokens per session, scanned A, original, MIT.

Project instructions for coding agents working on OpenBrowser, a project with an MCP server and a Chrome browser extension. MCP is a way for an agent to discover and call external tools.

In plain words
What is it for?
Building, testing, previewing, and running the project; checking Chrome connectivity; and following rules such as keeping dependencies out and reserving standard output for protocol messages.
Why use it?
They give agents the commands, tests, architecture rules, and safety constraints needed to change the project without breaking its tool connection or browser behaviour.

Instructions file for CodexOpenCode

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/dylansantwani/openbrowser/agents-md
Clone the repo
git clone --depth 1 https://github.com/dylansantwani/openbrowser

Made for: Codex, OpenCode.

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 openbrowser AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/dylansantwani/openbrowser/agents-md.svg)](https://agentmods.dev/instructions/dylansantwani/openbrowser/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/dylansantwani/openbrowser/agents-md"><img src="https://agentmods.dev/badge/instructions/dylansantwani/openbrowser/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 884 This file is loaded in full into every session.
When invoked 884 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.00884 $0.00884
Opus 5 $0.00442 $0.00442
Sonnet 5 $0.00177 $0.00177
Haiku 4.5 $0.00088 $0.00088

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

Security

Grade A, and why

openbrowser 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 4d 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.

AGENTS.md · 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.

AGENTS.md

Guidance for AI coding agents working in this repo. CLAUDE.md is the long version with the war stories behind each rule; read it before non-trivial work.

What this is

Two halves, two languages of failure:

  • mcp-server/ — Node. A zero-dependency MCP stdio server + hub. Bugs here look like "the tool never appears in my client" or "every call times out".
  • extension/ — Chrome Manifest V3. Bugs here look like "it says it worked but nothing happened".

Build, test, run

  • No build step, no npm install — the repo has zero dependencies.
  • npm test — 232 tests, no browser needed. Run before and after every change. Run it a few times when touching ws.js or hub.js (some races are intermittent).
  • npm run preview — serves the UI and the in-browser accessibility-tree tests at http://localhost:8850/test/a11y-browser.html (needs a real viewport).
  • npm run hub — run the hub standalone, verbose.
  • node mcp-server/src/index.js --health — check whether Chrome is connected.

Hard rules

  • Never add a dependency. If you need a library, write the ~200 lines instead. This is the project's most important property.
  • stdout is protocol-only in mcp-server/. Non-JSON-RPC output corrupts the stream; human-readable logging goes to stderr.
  • The service worker has no durable memory (MV3 kills it after ~30s idle). Durable state lives in chrome.storage; every top-level statement in background/ must be safe to run many times.
  • Write errors for a model to recover from. Put the recovery action in the message: "ref e12 no longer exists — take a fresh snapshot", not "Error: null".
  • Sessions must not touch each other's tabs or windows. Anything keyed by an agent-chosen name is keyed by (session, name). Never act on a tab the session did not choose; _session and _browser are stamped server-side after the args spread so a model cannot spoof them.
  • element.click() is ignored by serious sites (isTrusted: false). All pointer/keyboard input goes through CDP's Input domain.

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. 4d ago First seen · 73 lines · 884 tokens per session scan A 991704012fc1

Subscribe to this mod's changes

openbrowser AGENTS.md is an instructions file published in the GitHub repository dylansantwani/openbrowser (1 stars, last pushed 3d ago), licensed MIT. It adds 884 tokens to every session, about $0.0044 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