agent-browser

agent-browser is a skill for Claude Code, Codex from Peiiii/nextclaw. It costs 35 tokens per session (1,502 once invoked), scanned A, original, MIT.

Instructions for using Agent Browser, a command-line tool that opens websites, reads dynamic pages, and performs browser interactions.

In plain words
What is it for?
It helps navigate known URLs, inspect pages that need a real browser, run the tool's current usage guide, diagnose installation, and install it only with permission.
Why use it?
It clarifies when browser automation is appropriate, checks that the tool is installed and ready, and sets boundaries for login walls, captchas, and failed searches.

Skill for Claude CodeCodex

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

Made for: Claude Code, Codex.

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/peiiii/nextclaw/agent-browser.svg)](https://agentmods.dev/skills/peiiii/nextclaw/agent-browser)
Your own site
<a href="https://agentmods.dev/skills/peiiii/nextclaw/agent-browser"><img src="https://agentmods.dev/badge/skills/peiiii/nextclaw/agent-browser.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,502 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.00035 $0.01502
Opus 5 $0.00017 $0.00751
Sonnet 5 $0.00007 $0.00300
Haiku 4.5 $0.00003 $0.00150

Measured 4d ago against content hash 8d8abadf780e, 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 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.

packages/nextclaw-core/src/features/agent/shared/skills/agent-browser/SKILL.md · 127 lines

How it starts

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

Agent Browser

Agent Browser 是 NextClaw 调用的外部浏览器自动化 CLI。本 skill 只提供检查、安装引导、使用方式和安全边界,不包含 Agent Browser 的代码、npm 包或浏览器二进制。

能力边界

  • web_search 适合开放式信息发现,Agent Browser 适合访问已知 URL、读取动态页面和执行真实网页交互。
  • 两者是独立能力。不要把 Agent Browser 的结果伪装成 web_search 结果,也不要宣称它能稳定替代搜索服务。
  • 本 skill 中的 Agent Browser 专指外部 agent-browser CLI;web_fetch、Chrome/Edge DevTools MCP 和 Browser Connector 是其他独立能力,不能冒充或混称 Agent Browser。
  • web_search 未配置、未启用或请求失败,而浏览器仍可能推进任务时,先用一句话告诉用户将改用浏览器自动化,再继续本流程。
  • 遇到验证码、登录墙、地区限制或搜索结果明显无关时,不得声称已经搜到或验证过信息。

首次使用与就绪检查

先检查外部 CLI 是否存在:

command -v agent-browser
agent-browser --version

如果 CLI 不存在:

  1. 明确告诉用户这会安装第三方全局 npm 包并下载浏览器运行文件。
  2. 用户当前请求若没有明确授权安装,先征得同意,不要静默安装。
  3. 获得授权后执行:
npm install -g agent-browser
agent-browser install

安装后或怀疑环境异常时先运行只读快速诊断:

agent-browser doctor --offline --quick

只有诊断表明需要修复且用户同意时,才运行可能重装浏览器或清理旧状态的 agent-browser doctor --fix

本地模式不要求付费云浏览器,也不要求 Browserbase、Browser Use 等云 provider key。选择外部云 provider 时,才按对应服务的账户和计费规则处理。

先读取当前版本指南

Agent Browser 的命令会随版本演进。执行非简单任务前,先读取 CLI 自带且与当前版本匹配的核心指南:

agent-browser skills get core

只有需要完整参数或复杂工作流时再使用:

agent-browser skills get core --full

以这份版本匹配指南为准,不要只凭记忆猜测命令或复制过时示例。

标准执行循环

为每个任务使用独立、简短、仅含小写字母、数字和连字符的 session 名称,例如 nextclaw-research-1。同一任务的所有浏览器命令都带同一个 --session

agent-browser --session nextclaw-research-1 open https://example.com
agent-browser --session nextclaw-research-1 snapshot -i -u
agent-browser --session nextclaw-research-1 get title
agent-browser --session nextclaw-research-1 get url

核心循环:

  1. open 打开明确 URL。
  2. snapshot -i -u 读取可交互元素和链接;只读正文时可使用完整 snapshot 或针对元素执行 get text
  3. 使用最新 snapshot 生成的 @eN ref 交互。
  4. 页面导航、提交或动态重绘后先等待,再重新 snapshot;旧 ref 已失效。
  5. 用页面标题、最终 URL、可见文本或预期状态验证结果。
  6. 从实际打开和读取的页面记录来源 URL,不把搜索结果摘要当成已核验来源。

任务完成、失败或准备回复用户前,关闭本任务的 session:

agent-browser --session nextclaw-research-1 close

不要默认使用 close --all,它可能关闭其他并行任务的浏览器 session。

用浏览器进行信息发现

浏览器信息发现是受限制的替代路径,不等于搜索 API:

Read the full file on GitHub · 127 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 · 127 lines · 35 tokens per session scan A 8d8abadf780e

Subscribe to this mod's changes

agent-browser is a skill published in the GitHub repository Peiiii/nextclaw (253 stars, last pushed today), licensed MIT. It adds 35 tokens to every session and 1,502 once invoked, about $0.0002 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-30.