browserbuddy: Instructions file for Claude Code

CLAUDE.md

browserbuddy CLAUDE.md is an instructions file for Claude Code from smm-h/browserbuddy. It costs 3,163 tokens per session, scanned B, original, Apache-2.0.

Project instructions for BrowserBuddy, a shared browser extension and local server that let a coding agent observe and control the browser window a person is already using. BrowserBuddy supports Chrome and Firefox and exposes browser actions through MCP, a standard way for tools to communicate with agents.

In plain words
What is it for?
Use them when developing or reviewing BrowserBuddy, including its extension, local server, native host, browser events, and release process.
Why use it?
They give the agent the project's component map, fixed rules, verification requirements, and release guidance so browser-related changes follow the repository's expectations.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

This is smm-h/browserbuddy's own configuration. It tells Claude Code how to work on browserbuddy 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 browserbuddy configures →

Reuse

Borrowing it

Nothing to install: this file belongs to smm-h/browserbuddy. 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/smm-h/browserbuddy/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/smm-h/browserbuddy

Made for: Claude Code.

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 browserbuddy CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/smm-h/browserbuddy/claude-md/github.svg)](https://agentmods.dev/instructions/smm-h/browserbuddy/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/smm-h/browserbuddy/claude-md"><img src="https://agentmods.dev/badge/instructions/smm-h/browserbuddy/claude-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 browserbuddy CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/smm-h/browserbuddy/claude-md"><img src="https://agentmods.dev/badge/instructions/smm-h/browserbuddy/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,163 This file is loaded in full into every session.
When invoked 3,163 The same file — it is already loaded in full.
Security scan B 1 finding. 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.03163 $0.03163
Opus 5.5 $0.01265 $0.01265
Sonnet 5.5 $0.00633 $0.00633
Haiku 4.5 $0.00316 $0.00316

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

Security

Grade B, and why

browserbuddy CLAUDE.md scanned grade B with 1 finding 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

`README.md` and `CLAUDE.md` at the repo root are generated by selfdoc from `docs/_README.md` and `docs/_CLAUDE.md`. They carry an auto-generated header and are chmod 444 — never edit them directly. Edit the template in `
CLAUDE.md · 76 lines

How it starts

The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.

BrowserBuddy

BrowserBuddy 0.2.1 is a shared browser for you and your coding agent: a cross-browser MV3 WebExtension (Chrome and Firefox, one codebase) paired with a Node.js server that serves 25 MCP tools. By default the browser starts the server: the extension calls connectNative, the browser spawns native-host-bin.js, and that host serves Streamable-HTTP MCP on a stable loopback port behind a bearer token it publishes in mcp-endpoint.json — set up with browserbuddy install-host, attached with browserbuddy client-config. The older carrier (browserbuddy serve: MCP stdio server plus a WebSocket hub on 127.0.0.1:8590, dialled by the extension) still works and is selected by the TRANSPORT constant in background.js. The agent acts through the tools and observes the user's own clicks, typing, navigation and downloads as a queryable event log — the same window, the same session, no debug port and no automation flags. Node 22+, no build step, no transpiler.

Component map

  • extension/ — the WebExtension, loaded unpacked (Chrome) or as a temporary add-on (Firefox).
    • manifest.json — MV3 manifest; declares both background entry points (service worker for Chrome, event page for Firefox) and strict_min_version 128 for Firefox.
    • background.js — transport selection (TRANSPORT, native by default), reconnect ladder, browser-level observation (tabs, navigation, downloads), RPC dispatch, badge state. The WebSocket client is still here, dormant, reached only when TRANSPORT is websocket.
    • transport-native.js — the connectNative transport. Shares the background global scope (Chrome importScripts, Firefox background.scripts); surfaces a precise hard error naming the host and both expected manifest paths when the host cannot be spawned.
    • content.js — injected into pages: DOM observation, selector construction, redaction, and the page-level half of the RPC surface.
  • server/src/ — the Node process.
    • index.js — browserbuddy bin entry point; runs the CLI and reports fatal errors on stderr.
    • cli.js — strictcli app (serve with --port, --data-dir; install-host with --browser, --user-data-dir/--home, --data-dir; client-config), plus startServer which wires hub, store, demos and the MCP server together.
    • client-config.js — the client-config command: reads the live endpoint descriptor and renders the MCP client registration (claude mcp add --transport http … plus an mcpServers block), or hard-errors with the whole setup order. --apply runs the registration; printing is the default. The CLI's only stdout writer.
    • hub.js — WebSocket server: one extension connection at a time, RPC request/response correlation with timeouts, event fan-out.
    • rpc-peer.js — PendingRpcs, the one in-flight RPC table both transports use.
    • native-host-bin.js — the executable the browser spawns via connectNative. Deliberately not a strictcli app: the browser appends its own arguments. Hands fd 1 to the framing channel and points the process stdout stream at stderr.
    • native-messaging.js — the browser's wire framing: 32-bit little-endian length + UTF-8 JSON, incremental decoder, and the per-direction size caps (host → browser just under 1 MB, browser → host 128 MB).
    • native-hub.js — the Hub interface (isConnected/rpc/event) over the native pipe, so mcp.js is transport-blind.
    • http-mcp.js — Streamable-HTTP MCP on an ephemeral loopback port behind a bearer token; one MCP session per initialize.
    • endpoint-file.js — atomic, mode-0600 mcp-endpoint.json (the live url and token an MCP client dials, validated against the host's pid on read) and endpoint-state.json (the token and port the next host respawn reuses).
    • host-manifest.js — Chrome/Firefox native-messaging host manifests, the launcher script, and the Chrome-id-from-key derivation.
    • install-host.js — the one implementation of the host install (manifest + launcher, platform-default profile discovery, Linux-only guard), used by both browserbuddy install-host and scripts/install-native-host.mjs.
    • store.js — event store: 1000-entry ring buffer, per-UTC-day JSONL append, query and waitFor (the lockstep primitive).
    • mcp.js — the MCP tool surface: 18 acting, 3 observing, 4 learning tools, with zod schemas.
    • demos.js — demonstration recorder: captures user events while recording, cleans them into a replayable step list, persists one JSON file per demo.
    • version.js — the one place the server learns its version: it reads package.json, which is what the release bump edits. cli.js, mcp.js, hub.js and native-hub.js all import it instead of holding a literal.
  • server/test/ — node --test suite, including a fake extension driver (fake-extension.js) for hub/MCP tests and a fake browser (fake-native-extension.js) that spawns the real host over real pipes.
  • scripts/e2e-smoke.mjs — live end-to-end smoke test of the WebSocket carrier against a real browser with the real extension.
  • scripts/spike-nativemsg.mjs — live end-to-end proof of the native-messaging carrier on both browsers: installs the host manifest into a throwaway Chromium profile or a throwaway HOME, lets the browser spawn the host, then drives the MCP tools over HTTP. --browser firefox installs extension/ as a temporary add-on over the remote debugging protocol.
  • scripts/firefox-harness.mjs — the shared Firefox half of both live harnesses: profile prefs (including the originControls.grantByDefault that stands in for the human permission grant), the launch, and the RDP client that installs a temporary add-on.
  • scripts/check-manifest-version.mjs — the version-drift guardrail: fails when extension/manifest.json and package.json disagree. Registered as the manifest-version-lockstep external check in .rlsbl/config.json (tag preflight), so it runs under rlsbl check --all and blocks a release.
  • scripts/install-native-host.mjs — development CLI over server/src/install-host.js: writes the host manifest and launcher for a named Chromium user-data-dir or Firefox HOME. End users run browserbuddy install-host --browser chrome|firefox instead.
  • docs/ — PROTOCOL.md (normative wire contract) and ARCHITECTURE.md (components, data flow, rationale), both hand-maintained; _README.md and _CLAUDE.md are the selfdoc templates for the root files.
  • pypi/ — PyPI name-reservation placeholder package only. Not the product; do not grow it.

Read the full file on GitHub · 76 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. 2mo ago First seen · 76 lines · 3,163 tokens per session scan B a0775a240c12

Subscribe to this mod's changes

browserbuddy CLAUDE.md is an instructions file published in the GitHub repository smm-h/browserbuddy (0 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 3,163 tokens to every session, about $0.0127 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

browserbuddy CLAUDE.md compared with instructions from other repositories

browserbuddy CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
browserbuddy CLAUDE.mdsmm-h/browserbuddyInstructions file03mo agoApache-2.0B3,163Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA8,130Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,680Codex, OpenCode
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file283ktodayMITA4,342Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,153GitHub Copilot