browser-tester

An AI browser-testing agent that controls a real browser through Playwright. It checks pages by observing accessible elements, performing actions, and verifying the results with multiple signals.

In plain words
What is it for?
Use it for specification-based, basic, visual, or accessibility testing, including navigation, interactions, state changes, negative cases, and related browser flows.
Why use it?
It helps test real user flows and catch functional, visual, console, and accessibility problems without relying on guessed selectors.

Agent for Claude Code

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 agents/byeongminlee/nextjs-claude-code/browser-tester
Clone the repo
git clone --depth 1 https://github.com/ByeongminLee/nextjs-claude-code

Made for: Claude Code.

Per session 62 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,398 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00062 $0.02398
Opus 5 $0.00031 $0.01199
Sonnet 5 $0.00012 $0.00480
Haiku 4.5 $0.00006 $0.00240

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

Security

Grade B, and why

browser-tester 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 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.

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

Check: cat .mcp.json — should have "playwright" entry.
template/.claude/agents/browser-tester.md · 267 lines

How it starts

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

You are an autonomous browser testing agent. You drive a REAL browser through Playwright MCP tools — snapshot the page, interact with confirmed elements, verify state changes with structured evidence. You NEVER guess selectors.

Mode detection

Check the HANDOFF prompt for MODE: field:

  • MODE: spec-drivenSpec-driven testing (full workflow below)
  • MODE: basic or no MODE → Basic verification (navigate, snapshot, console check)
  • MODE: visualVisual regression
  • MODE: a11yAccessibility audit

Check for SCOPE: field (controls testing depth):

  • commit → primary flow + 2-4 adjacent flows
  • working-tree → primary flow + 2-3 related + edge cases
  • branch (default) → 5-8 flows + negative cases + adversarial

Step 0 — Detect MCP capability tier

  1. Try browser_snapshot(). If it works → Tier B (standard @playwright/mcp).
  2. If not, try screenshot({ mode: 'snapshot' }). If works → check if playwright tool exists → Tier A (expect-style).
  3. If neither → output BROWSER_MCP_NOT_FOUND and STOP:
BROWSER_MCP_NOT_FOUND
Playwright MCP server is not responding. NCC installs it by default in .mcp.json.
Check: cat .mcp.json — should have "playwright" entry.
If missing: npx nextjs-claude-code --force (re-installs MCP config)
Manual setup: add to .mcp.json: { "mcpServers": { "playwright": { "command": "npx", "args": ["@playwright/mcp@latest", "--headless"] } } }

If Tier B AND a playwright code execution tool also exists → upgrade to Tier A.

Capability Tier A (batched) Tier B (individual)
Snapshot screenshot({ mode: 'snapshot' }) browser_snapshot()
Navigate open({ url }) browser_navigate({ url })
Interact playwright({ code }) — batch multiple browser_click / browser_type — one per call
Console console_logs({ type: 'error' }) browser_console_messages()
Screenshot screenshot() browser_screenshot()

Use the detected tier for ALL subsequent steps. Do not mix tiers.

Read the full file on GitHub · 267 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 · 267 lines · 62 tokens per session scan B a22a5b46e0b4

Subscribe to this mod's changes

browser-tester is an agent published in the GitHub repository ByeongminLee/nextjs-claude-code (3 stars, last pushed 5mo ago), licensed MIT. It adds 62 tokens to every session and 2,398 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (reads mcp configuration). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

charter

You are one subagent in an autonomous browser-game agent — a durable operator that builds a single game and then runs it like a real studio: bug fixes, new features, gameplay and balance iteration, new content, and polish. Operate autonomously: don't pause to ask the operator questions, request permission, or wait to…

kyh/vibedgames · 0 tokens

trigger-dev-expert

Use this agent when you need to design, implement, or optimize background jobs and workflows using Trigger.dev framework. This includes creating reliable async tasks, implementing AI workflows, setting up scheduled jobs, structuring complex task hierarchies with subtasks, configuring build extensions for tools like…

hackerai-tech/hackerai · 0 tokens

fe-a11y-auditor

Specialized accessibility (a11y) audit — semantic HTML, ARIA, keyboard navigation, color contrast, focus management. More precise than fe-reviewer's a11y axis. READ-ONLY. With --live, also measures via Chrome DevTools MCP (Lighthouse a11y score, real accessibility tree, runtime console); falls back to static analysis…

sh5623/fe-rail · 85 tokens

site-crawler

Phase 1 main agent. Drives the crawl-site script, reviews crawl results, probes each page against the adapter registry, surfaces ABORTNOADAPTER pages for confirmation, and writes the Phase 1 verification.

Blazity/nextjs-migration-plugin · 46 tokens

state-repairer

Repairs a Zod-invalid state JSON file (crawl.json, probe.json, etc.) so it satisfies its schema. Dispatched by any phase that loads a state file and receives a diagnostic result. Format-only repair, identical contract to adapter-repairer.

Blazity/nextjs-migration-plugin · 57 tokens

migration-planner

Phase 3 recovery sub-agent. Refines the analyzed library and crawl into an ordered build roadmap using cluster summaries and route data only.

Blazity/nextjs-migration-plugin · 31 tokens