agent-browser

Instructions for using the host-side agent-browser command-line tool to run browser checks against a forwarded local website. It supports opening pages, waiting for loading, inspecting them, taking screenshots, and using snapshots to interact with controls.

In plain words
What is it for?
Use it for smoke tests and simple interface validation: start a local app, open its localhost address, wait for it to load, inspect the page, read its title or URL, click controls, and capture screenshots.
Why use it?
It provides a repeatable browser check for local apps, including a fresh page inspection after navigation or clicks so outdated element references are not reused.

Skill for Claude CodeCodex

▶ Grok CLI + Cursor = AI Cold Emails Brandon Charleson - AI Powered Junkie · about superagent-ai/grok-cli · on YouTube →
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/superagent-ai/grok-cli/agent-browser
Any agent
npx skills add superagent-ai/grok-cli --skill agent-browser
Clone the repo
git clone --depth 1 https://github.com/superagent-ai/grok-cli

Made for: Claude Code, Codex.

Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 568 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.00031 $0.00568
Opus 5 $0.00015 $0.00284
Sonnet 5 $0.00006 $0.00114
Haiku 4.5 $0.00003 $0.00057

Measured 3d ago against content hash 34866c7bca14, 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.

.agents/skills/agent-browser/SKILL.md · 70 lines

How it starts

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

agent-browser

Use this skill when verification needs a real browser after the app is booted from the sandbox.

This project uses agent-browser on the host, not inside Shuru. The usual flow is:

  1. Start the app with sandboxed bash.
  2. Expose it through a forwarded localhost port.
  3. Use agent-browser against that localhost URL.

Requirements

  • The agent-browser CLI must be installed and available on PATH.
  • Prefer http://127.0.0.1:<port> or another explicit localhost URL.
  • Use a named browser session when there is any chance of concurrent runs.

Core flow

agent-browser --session verify open http://127.0.0.1:3000
agent-browser --session verify wait --load networkidle
agent-browser --session verify snapshot -i

After any click or navigation, re-snapshot before using old refs again.

Common commands

# Open and wait for readiness
agent-browser --session verify open <url>
agent-browser --session verify wait --load networkidle

# Inspect the page
agent-browser --session verify snapshot -i
agent-browser --session verify get title
agent-browser --session verify get url

# Interact with elements from snapshot refs
agent-browser --session verify click @e1
agent-browser --session verify fill @e2 "text"
agent-browser --session verify press Enter

# Record the smoke test as video
agent-browser record start .grok/verify-artifacts/verify-smoke.webm

# Capture screenshot proof (use --screenshot-dir, not a positional path)
mkdir -p .grok/verify-artifacts
agent-browser --screenshot-dir .grok/verify-artifacts screenshot
agent-browser --screenshot-dir .grok/verify-artifacts screenshot --full

# Stop recording and clean up
agent-browser record stop
agent-browser close

Guidance

  • Keep browser checks narrow in phase 1: page load, one or two critical controls, and optional screenshot evidence.
  • Save screenshots to stable workspace-relative paths under .grok/verify-artifacts/ so verify can report them back to the user.
  • Prefer wait --load networkidle after open.
  • If the page is dynamic, use snapshot -i again after each meaningful DOM change.
  • If the target URL is ambiguous because multiple forwarded ports exist, stop and report the ambiguity instead of guessing.
  • If agent-browser is unavailable, fall back to bash-only verification and say so clearly.

Read the full file on GitHub · 70 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 · 70 lines · 31 tokens per session scan A 34866c7bca14

Subscribe to this mod's changes

agent-browser is a skill published in the GitHub repository superagent-ai/grok-cli (3,445 stars, last pushed 1mo ago), licensed MIT. It adds 31 tokens to every session and 568 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.

Related

Other skills, from other repositories

playwright-cli

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

VoltAgent/voltagent · 52 tokens

browser-testing-with-screenshots

Use when testing web applications with visual verification - automates Chrome browser interactions, element selection, and screenshot capture for confirming UI functionality.

AgentWorkforce/relay · 32 tokens

smoke-test

Create a Mastra project using create-mastra and smoke test the studio in Chrome using Chrome MCP server.

mastra-ai/mastra · 24 tokens

playwright-e2e-testing

Author and maintain versioned Playwright (@playwright/test) TypeScript UI specs for browser user flows. Use when asked to create, run, debug, or refactor E2E tests, form/navigation/auth flows, responsive checks, UI mocking, fixtures, Page Objects, or visual comparisons. Use api-testing for standalone REST/GraphQL…

fugazi/test-automation-skills-agents · 103 tokens

webapp-selenium-testing

Author and maintain versioned Selenium WebDriver tests with Java and JUnit 5. Use for creating, debugging, or running Selenium specs, implementing Page Objects, handling explicit waits, capturing screenshots, or setting up Maven test projects. Supports Chrome, Firefox, and Edge. Keywords: Selenium WebDriver, Java…

fugazi/test-automation-skills-agents · 84 tokens

phoenix-pxi-playwright

Write, extend, and debug PXI Playwright E2E tests for Phoenix. Use when adding PXI agent frontend specs, authoring LLM-as-judge rubrics, asserting PXI tool use, persisting PXI test runs as Phoenix experiments, or debugging PXI E2E failures.

Arize-ai/phoenix · 68 tokens