browser-control: Instructions file for Codex

AGENTS.md

browser-control AGENTS.md is an instructions file for Codex, OpenCode from keon/browser-control. It costs 484 tokens per session, scanned A, original, MIT.

Repository instructions for keon/browser-control, a small command-line tool for controlling a web browser and inspecting its pages.

In plain words
What is it for?
Use them to guide browser launch, navigation, inspection, clicking, typing, scrolling, keyboard shortcuts, screenshots, and debugging through browser-control.
Why use it?
They define a reliable order for observing pages and acting on them, which reduces mistakes when buttons, fields, or scrollable areas appear dynamically. They also list commands for screenshots, network activity, console output, and browser events.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is keon/browser-control's own configuration. It tells Codex and OpenCode how to work on browser-control itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything browser-control configures →

About the project

browser-control is a Rust command-line tool that lets coding agents operate a real web browser through the Chrome DevTools Protocol. It is used for browser automation through shell commands, including inspecting pages, interacting with elements, running scripts, and observing browser events. Catalogue add-ons extend coding-agent workflows that use browser-control.

keon/browser-control · 3,157 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to keon/browser-control. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/keon/browser-control/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/keon/browser-control

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 browser-control AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/keon/browser-control/agents-md/github.svg)](https://agentmods.dev/instructions/keon/browser-control/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/keon/browser-control/agents-md"><img src="https://agentmods.dev/badge/instructions/keon/browser-control/agents-md/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 browser-control AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/keon/browser-control/agents-md"><img src="https://agentmods.dev/badge/instructions/keon/browser-control/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 484 This file is loaded in full into every session.
When invoked 484 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.00484 $0.00484
Opus 5.5 $0.00194 $0.00194
Sonnet 5.5 $0.00097 $0.00097
Haiku 4.5 $0.00048 $0.00048

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

Security

Grade A, and why

browser-control 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 2mo 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 · 45 lines

What it actually says

browser-control agent guide

Use this project as a tiny browser pipe, not an agent framework.

Quick loop:

browser-control launch about:blank
export BROWSER_CONTROL_CDP_URL=http://127.0.0.1:9222
browser-control open https://example.com
browser-control inspect    # compact title/url/text/headings/actions/links
browser-control snapshot   # observe also works
browser-control click @e1
browser-control eval 'document.title'
browser-control events
browser-control network
browser-control console
browser-control cdp Browser.getVersion

Rules:

  • Use snapshot before ref actions.
  • Use inspect first when you need compact page text + candidate links/actions.
  • Use refs for simple actions, selectors/coordinates when needed.
  • Use --wait N on click/fill for late-rendered elements; wait-element for explicit polling.
  • Use press ctrl+a / press cmd+shift+t style combos; editing combos (select-all/copy/paste/undo) work headless and on macOS.
  • Use scroll --at x,y for inner scrollable containers; plain scroll for the window.
  • Use screenshot --full for full-page captures; click --clicks 2 / --button right for double/context clicks.
  • page-info reports a pending {dialog} instead of hanging; clear it with dialog accept|dismiss.
  • eval accepts top-level return (auto-wrapped in an IIFE).
  • Use eval or cdp as the raw escape hatch.
  • Use events, network, and console when diagnosing flaky waits/pages.
  • Use --frame <target-id|url-substring> on eval, click, or fill for OOPIF/frame targets.
  • Put reusable scripts in .browser-control/scripts.
  • Verify with text, eval, screenshot, or raw CDP before saying done.
  • Check .browser-control/traces/* after failures.
  • Short env aliases BU_CDP_WS and BU_CDP_URL are accepted.

Lifecycle:

browser-control stop     # stop browser launched by browser-control
browser-control reload   # same minimal lifecycle reset
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. 2mo ago First seen · 45 lines · 484 tokens per session scan A f193bb0318af

Subscribe to this mod's changes

browser-control AGENTS.md is an instructions file published in the GitHub repository keon/browser-control (3,157 stars, last pushed 2mo ago), licensed MIT. It adds 484 tokens to every session, about $0.0019 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-30.

Related

browser-control AGENTS.md compared with instructions from other repositories

browser-control AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
browser-control AGENTS.mdkeon/browser-controlInstructions file3.2k2mo agoMITA484Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode