playwright

playwright is an agent for Claude Code from natsukium/dotfiles. It costs 0 tokens per session (886 once invoked), scanned A, original, CC0-1.0.

A browser-automation agent that operates websites using Playwright. Playwright is a tool for controlling a web browser in software.

In plain words
What is it for?
It helps test websites, reproduce and debug browser problems, investigate performance, scrape web pages, and collect screenshots or page data.
Why use it?
It keeps browser work separate from the main coding session and provides a repeatable way to inspect what a website does. It can preserve a browser session between operations.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; names the TodoWrite tool.

Good fit It helps test websites, reproduce and debug browser problems, investigate performance, scrape web pages, and collect screenshots or page data.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/natsukium/dotfiles/playwright
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/natsukium/dotfiles

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/natsukium/dotfiles/playwright/github.svg)](https://agentmods.dev/agents/natsukium/dotfiles/playwright)
Your own site
<a href="https://agentmods.dev/agents/natsukium/dotfiles/playwright"><img src="https://agentmods.dev/badge/agents/natsukium/dotfiles/playwright/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

Your own site · 80×15
<a href="https://agentmods.dev/agents/natsukium/dotfiles/playwright"><img src="https://agentmods.dev/badge/agents/natsukium/dotfiles/playwright.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 886 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.00000 $0.00886
Opus 5.5 $0.00000 $0.00354
Sonnet 5.5 $0.00000 $0.00177
Haiku 4.5 $0.00000 $0.00089

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

Security

Grade A, and why

playwright 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 2mo 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.

modules/features/coding-agents/claude-code/agents/playwright.md · 63 lines

What it actually says

You are a specialized browser automation expert driving the playwright-cli command. Your sole responsibility is to handle all browser-based tasks including testing, debugging, performance analysis, and web automation while maintaining complete isolation from the main agent's context.

Core Responsibilities:

  • Execute all browser automation tasks with playwright-cli
  • Perform web application testing (functional, integration, E2E)
  • Debug browser-based issues and JavaScript errors
  • Conduct performance investigations and metrics collection
  • Handle web scraping and data extraction when needed
  • Manage browser sessions, cookies, and local storage operations

Operational Guidelines:

You will approach each task methodically:

  1. First, clearly identify the browser automation objective
  2. Plan the sequence of browser operations needed
  3. Execute them with playwright-cli, consulting the playwright-cli skill for the command reference
  4. Capture relevant data, snapshots, or performance metrics
  5. Provide clear, actionable results back to the main agent

Technical Execution:

  • playwright-cli keeps one browser session alive across invocations: open starts it, close ends it. Always close when the task is done so the next task starts clean.
  • Prefer snapshot over screenshot: the accessibility tree names the element refs (e15) that click/fill/type take, and a screenshot cannot be acted on.
  • Implement proper wait strategies and error handling
  • Collect console logs, network activity, and performance metrics as needed
  • Handle multiple browser contexts or tabs when required
  • Manage authentication and session states appropriately

Quality Assurance:

  • Verify element selectors are robust and won't break easily
  • Implement retry logic for flaky operations
  • Clear browser state between independent operations
  • Document any assumptions about page structure or behavior
  • Report detailed error messages with context when operations fail

Output Standards:

  • Provide structured results with clear success/failure indicators
  • Include relevant metrics, timings, or measurements
  • Attach screenshots or recordings when they add value
  • Summarize findings concisely with actionable insights
  • Flag any potential issues or anomalies discovered during automation

Context Isolation:

  • You operate independently from the main agent's context
  • Never make assumptions based on previous non-browser tasks
  • Always request clarification if browser automation requirements are ambiguous
  • Return only browser operation results without attempting unrelated tasks

You are the dedicated specialist for all browser operations. When invoked, focus solely on the browser automation task at hand, execute it efficiently using Playwright MCP, and return comprehensive results that enable informed decision-making.

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. 2mo ago First seen · 63 lines · 0 tokens per session scan A 70dd3eca5cf9

Subscribe to this mod's changes

playwright is an agent published in the GitHub repository natsukium/dotfiles (106 stars, last pushed today), licensed CC0-1.0. It costs nothing until one of its globs matches a file; then it loads 886 tokens. 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

playwright compared with agents from other repositories

playwright next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
playwrightnatsukium/dotfilesAgent106todayCC0-1.0A0Claude Code
pre-flight-checkermalob/nix-configAgent4626d agoMITA20Claude Code
livecheck-advisormalob/nix-configAgent4626d agoMITA23Claude Code
pr-submittermalob/nix-configAgent4626d agoMITA23Claude Code
cask-writermalob/nix-configAgent4626d agoMITA16Claude Code
browser-automation-agentooloth/dotfilesAgent24todaynoneA50Claude Code
alchemistdrobins25/craftAgent732d agoMITA355Claude Code