playwright-browser

playwright-browser is an agent for Claude Code from drobins25/craft. It costs 233 tokens per session (2,713 once invoked), scanned A, original, MIT.

A browser-control agent that uses Playwright to open webpages, click controls, fill in forms, inspect page content, and report what it finds.

In plain words
What is it for?
Use it to test websites, navigate multi-step flows, submit forms, inspect accessibility information, and gather findings from live pages.
Why use it?
It removes the need to perform repetitive browser checks manually or write one-off automation scripts for interactive webpages.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the NotebookEdit tool; mentions Claude Code.

Part of the craft plugin — 11 skills, 36 commands, 27 agents, 7 hooks, 1 MCP server shipped together

Good fit Use it to test websites, navigate multi-step flows, submit forms, inspect accessibility information, and gather findings from live pages.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/drobins25/craft/playwright-browser
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.

Clone the repo
git clone --depth 1 https://github.com/drobins25/craft

Made for: Claude Code.

Or install craft, the plugin that ships this one along with the rest of its 11 skills, 36 commands, 27 agents, 7 hooks, 1 MCP server.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/drobins25/craft/playwright-browser/github.svg)](https://agentmods.dev/agents/drobins25/craft/playwright-browser)
Your own site
<a href="https://agentmods.dev/agents/drobins25/craft/playwright-browser"><img src="https://agentmods.dev/badge/agents/drobins25/craft/playwright-browser/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for playwright-browser

Your own site · 80×15
<a href="https://agentmods.dev/agents/drobins25/craft/playwright-browser"><img src="https://agentmods.dev/badge/agents/drobins25/craft/playwright-browser.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 233 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,713 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00233 $0.02713
Opus 5.5 $0.00093 $0.01085
Sonnet 5.5 $0.00047 $0.00543
Haiku 4.5 $0.00023 $0.00271

Measured 1mo ago against content hash 31840593bd72, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

playwright-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 1mo 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/playwright-browser.md · 264 lines

How it starts

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

Playwright Browser Agent

You are an interactive browser automation agent. You own a live browser session via playwright-cli and respond to user instructions to navigate, interact with, and report on web pages.

CRITICAL: Session Architecture

playwright-cli uses a client-daemon model over Unix sockets. Understanding this prevents the #1 failure mode (spawning multiple browsers):

  • open starts a background daemon + browser. The daemon listens on a Unix socket.
  • Subsequent commands (snapshot, click, goto) connect to the daemon via that socket.
  • If the socket cannot be found, playwright-cli silently creates a NEW daemon + browser instead of erroring. This is the root cause of multiple browsers spawning.
  • Claude Code's Bash tool starts a fresh shell for every call. Environment variables do NOT persist between calls. You MUST include -s=$SESSION on every single command.

Session Name Rules

Session names MUST be:

  • 12 characters or fewer (macOS has a 104-char Unix socket path limit - long names overflow it silently)
  • Lowercase letters and numbers only (no dashes, dots, or special characters)
  • Examples: craft01, qa, walk01, browse

NEVER use long session names like craft-8-token-lifecycle-v3 or walkthrough-session-01. These will silently fail on macOS, causing every command to spawn a new browser.

Your Commands

You interact with the browser exclusively through playwright-cli shell commands via Bash.

Core commands (v1):

Command Purpose Example
open [url] Open browser + optionally navigate playwright-cli -s=craft01 open --headed http://localhost:3000
snapshot Capture accessibility tree (YAML to disk) playwright-cli -s=craft01 snapshot
click <ref> Click an element by ref playwright-cli -s=craft01 click e6
fill <ref> <text> Fill a specific input by ref playwright-cli -s=craft01 fill e12 "[email protected]"
type <text> Type text into focused element playwright-cli -s=craft01 type "hello"

Read the full file on GitHub · 264 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. 1mo ago First seen · 264 lines · 233 tokens per session scan A 31840593bd72

Subscribe to this mod's changes

playwright-browser is an agent published in the GitHub repository drobins25/craft (68 stars, last pushed yesterday), licensed MIT. It adds 233 tokens to every session and 2,713 once invoked, about $0.0009 per session on Opus 5.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 agents, from other repositories

e2e-runner

End-to-end testing specialist using Playwright for critical user flows. Use PROACTIVELY when the user needs to verify complete user journeys, test cross-browser behavior, or validate UI interactions. Trigger on changes to user-facing features, forms, navigation, or authentication flows.

VersoXBT/claude-initial-setup · 60 tokens

performance-tuner

Performance engineering specialist for application profiling, optimization, and scalability. Use proactively for performance issues, bottleneck analysis, and optimization tasks.

alirezarezvani/claude-code-tresor · 30 tokens

docs-writer

Expert technical documentation specialist for creating comprehensive, user-friendly documentation across all project types. Use proactively for API docs, user guides, and technical documentation.

alirezarezvani/claude-code-tresor · 33 tokens

systems-architect

Expert system architect specializing in evidence-based design decisions, scalable system patterns, and long-term technical strategy. Use proactively for architectural reviews and system design.

alirezarezvani/claude-code-tresor · 33 tokens

config-safety-reviewer

Configuration safety specialist focusing on production reliability, magic numbers, pool sizes, timeouts, and connection limits. Use proactively for configuration changes and production safety reviews.

alirezarezvani/claude-code-tresor · 37 tokens

unity-optimizer

Profiles and optimizes Unity performance. Uses MCP profiler for frame timing, memory snapshots, rendering stats. Identifies CPU/GPU bottlenecks, GC spikes, draw call issues, and shader variant bloat.

XeldarAlz/everything-claude-unity · 46 tokens