agent-browser

agent-browser is a skill for Claude Code, Codex from teamniteo/hakuto. It costs 84 tokens per session (2,312 once invoked), scanned A, original, MIT.

A browser automation tool for controlling websites with a headless Chrome browser, a browser that runs without a normal visible window. It supports navigation, form entry, screenshots, web-app testing, and extracting page data.

In plain words
What is it for?
Use it to navigate sites, fill in forms, test interactive web applications, capture screenshots, and collect information from pages. It also documents installation, Chrome setup, idle shutdown, and manual cleanup.
Why use it?
It lets an agent perform and verify browser actions instead of only reading static page content. Its persistent browser daemon can keep a session available between commands.

Skill for Claude CodeCodex

Part of the hakuto plugin — 14 skills, 1 command, 1 agent shipped together

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 skills/teamniteo/hakuto/agent-browser
Any agent
npx skills add teamniteo/hakuto --skill agent-browser
Clone the repo
git clone --depth 1 https://github.com/teamniteo/hakuto

Made for: Claude Code, Codex.

Or install hakuto, the plugin that ships this one along with the rest of its 14 skills, 1 command, 1 agent.

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 agent-browser

README.md
[![agentmods](https://agentmods.dev/badge/skills/teamniteo/hakuto/agent-browser.svg)](https://agentmods.dev/skills/teamniteo/hakuto/agent-browser)
Your own site
<a href="https://agentmods.dev/skills/teamniteo/hakuto/agent-browser"><img src="https://agentmods.dev/badge/skills/teamniteo/hakuto/agent-browser.svg" alt="Measured on agentmods" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,312 The whole file, excluding the scripts and references it only reads on demand.
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.00084 $0.02312
Opus 5 $0.00042 $0.01156
Sonnet 5 $0.00017 $0.00462
Haiku 4.5 $0.00008 $0.00231

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

Security

Grade A, and why

agent-browser 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 3d 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.

skills/agent-browser/SKILL.md · 273 lines

How it starts

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

Browser Automation with agent-browser

Prerequisites

If agent-browser is missing from $PATH, install it globally and run the one-time Chrome download:

bun install -g agent-browser
agent-browser install   # Downloads Chrome for Testing (first run only)

Alternatives: npm install -g agent-browser, brew install agent-browser, or cargo install agent-browser — each followed by agent-browser install. Surface any install failures to the user rather than improvising workarounds.

Daemon lifecycle

agent-browser runs as a background daemon that persists after the skill exits, keeping a headless Chrome alive so subsequent commands are instant. By default it never shuts down on its own, so an unused daemon can linger across projects (sometimes surfacing as a blank Chrome window on macOS, since --headless=new still spawns a real window in some configurations).

Two ways to keep it tidy:

  • Auto-shutdown after idle (recommended) — set AGENT_BROWSER_IDLE_TIMEOUT_MS in your shell environment, e.g. export AGENT_BROWSER_IDLE_TIMEOUT_MS=300000 for a 5-minute idle timeout. The daemon exits N ms after the last command.
  • Manual cleanup — run agent-browser close --all when you're done, or pkill -f agent-browser to nuke any orphans.

Why refs over selectors

The core pattern is snapshot → ref → act. Refs (@e1, @e2) come from the snapshot's accessibility tree and survive minor DOM mutations between actions; CSS selectors and XPath break easily on re-renders, dynamic class names, or hydration. Re-snapshot whenever the page navigates or the DOM changes meaningfully.

Quick start

agent-browser open <url>        # Navigate to page
agent-browser snapshot -i       # Get interactive elements with refs
agent-browser click @e1         # Click element by ref
agent-browser fill @e2 "text"   # Fill input by ref
agent-browser close             # Close browser

Core workflow

  1. Navigate: agent-browser open <url>
  2. Snapshot: agent-browser snapshot -i (returns elements with refs like @e1, @e2)
  3. Interact using refs from the snapshot
  4. Re-snapshot after navigation or significant DOM changes

Read the full file on GitHub · 273 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. 3d ago First seen · 273 lines · 84 tokens per session scan A 752330313b59

Subscribe to this mod's changes

agent-browser is a skill published in the GitHub repository teamniteo/hakuto (5 stars, last pushed 8d ago), licensed MIT. It adds 84 tokens to every session and 2,312 once invoked, about $0.0004 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 skills, from other repositories