unbrowser CLAUDE.md

Instructions for unbrowser, a small headless browser that runs JavaScript without displaying pages. It is designed for coding agents that need to work with interactive websites.

In plain words
What is it for?
Logging in, filling forms, navigating single-page apps, and collecting information from dashboards or other interactive websites.
Why use it?
Basic web requests cannot use JavaScript-heavy sites or keep a login session. These instructions explain the fixed architecture and the browser functions available to the agent.

Instructions file

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/protostatis/unbrowser/claude-md
Clone the repo
git clone --depth 1 https://github.com/protostatis/unbrowser
Per session 5,090 This file is loaded in full into every session.
When invoked 5,090 The same file — it is already loaded in full.
Security scan A 1 finding. 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.05090 $0.05090
Opus 5 $0.02545 $0.02545
Sonnet 5 $0.01018 $0.01018
Haiku 4.5 $0.00509 $0.00509

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

Security

Grade A, and why

unbrowser CLAUDE.md scanned grade A 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 2d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| | curl/fetch | LLM WebFetch/Search | unbrowser | Full Chrome |
CLAUDE.md · 164 lines

How it starts

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

unbrowser

Single statically-linked native binary that gives an LLM a headless browser with real JS execution. No rendering — designed for LLM tool-call use, not human viewing.

Distinct from ~/Projects/sky-search (QuickJS-WASM in user's browser, with iframe rendering for humans). This project ports several JS modules from sky-search but drops rendering, the WebSocket/server layers, and the iframe bridge entirely.

Why this exists

The four-way landscape:

curl/fetch LLM WebFetch/Search unbrowser Full Chrome
Runs JS No No (provider-side, opaque) Yes (QuickJS) Yes (V8, JIT)
SPA-capable No Sometimes Yes Yes
Interactive (click/type/auth) No No Yes Yes
Session across calls DIY No Yes Yes
Output to LLM Raw HTML (heavy) Pre-summarized markdown BlockMap (semantic, low-token) Raw DOM or screenshot (very heavy)
Memory ~0 N/A tens of MB 200–500MB+ per page
Deploys as one syscall API call one binary a fleet

The gap this fills: stateful, JS-required, non-visual web automation for LLM agents — log in, fill forms, navigate SPAs, scrape dashboards, follow multi-step flows — at one-binary deploy cost, with output already shaped for token efficiency.

Positioning: not "Chrome but smaller" (Chrome is the compatibility target — that framing loses). It's "WebFetch but stateful and interactive", or "curl but the page actually runs". The LLM-native output (BlockMap + element refs) is the differentiator that neither curl nor Chrome give you for free.

Honest weak spots vs Chrome: heavy JIT-bound JS (QuickJS is 20–50× slower); anti-bot that fingerprints canvas/WebGL/audio; anything visual (screenshot agents, captcha OCR); sites that lazy-load via real intersection observer + viewport metrics.

Architecture (locked)

  • Native, not WASM. Rust host. Crates: rquickjs, html5ever, wreq (Chrome-fingerprinted HTTP client — see Stealth), tokio, url, serde_json.
  • Runs page scripts so the DOM settles. SPA-capable.
  • Interactive from day one — clicks, typing, event synthesis.
  • No rendering. Replacement for human monitoring is a BlockMap: DOM walk → semantic block tree → DDM-style ASCII grid + structured JSON. Same source produces both LLM and human views.
  • CSS selectors stay JS-side for v1 (reuse sky-search dom.js).
  • Protocol: JSON-RPC over stdin/stdout for commands; NDJSON event stream on stderr for observability.
  • Element refs (e:142) returned by query commands are stable handles into the VDOM.
  • Stealth is a first-class concern, not a flag. See below.

Read the full file on GitHub · 164 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. 2d ago First seen · 164 lines · 5,090 tokens per session scan A 8c5b91ed346f

Subscribe to this mod's changes

unbrowser CLAUDE.md is an instructions file published in the GitHub repository protostatis/unbrowser (15 stars, last pushed 11d ago), licensed Apache-2.0. It adds 5,090 tokens to every session, about $0.0255 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories