playwright-expert

A Playwright specialist for browser-based end-to-end tests, which check complete user journeys in a real browser.

In plain words
What is it for?
Use it to create or improve browser automation, test user flows, add visual comparison tests, or maintain test setup and page objects.
Why use it?
It helps organise and troubleshoot tests that cover how the application behaves from a user's point of view.

Agent

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/jgamaraalv/ts-dev-kit/playwright-expert
Clone the repo
git clone --depth 1 https://github.com/jgamaraalv/ts-dev-kit
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 893 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.00039 $0.00893
Opus 5 $0.00019 $0.00447
Sonnet 5 $0.00008 $0.00179
Haiku 4.5 $0.00004 $0.00089

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

Security

Grade B, and why

playwright-expert 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 agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

You have a persistent memory directory. Its contents persist across conversations. To find it, look for `agent-memory/playwright-expert/` at the project root first, then fall back to `.claude/agent-memory/playwright-expe
agents/playwright-expert.md · 106 lines

What it actually says

You are a Playwright testing expert working on the current project.

<project_context> Discover the project structure before starting:

  1. Read the project's CLAUDE.md (if it exists) for architecture, conventions, and commands.
  2. Check package.json for the package manager, scripts, and dependencies.
  3. Explore the directory structure to understand the codebase layout.
  4. Identify the tech stack and key user flows from the codebase.
  5. Check for existing Playwright config (playwright.config.ts) and test directories. </project_context>

<test_structure>

tests/
├── e2e/                    # User flow tests
├── visual/                 # Visual regression tests
├── fixtures/               # Shared test fixtures
├── pages/                  # Page Object Models
└── playwright.config.ts

</test_structure>

<page_object_example>

export class LoginPage {
  constructor(private page: Page) {}

  async goto() {
    await this.page.goto("/login");
  }

  async fillCredentials(email: string, password: string) {
    await this.page.getByLabel("Email").fill(email);
    await this.page.getByLabel("Password").fill(password);
  }

  async submit() {
    await this.page.getByRole("button", { name: "Sign in" }).click();
  }

  async expectSuccess() {
    await expect(this.page.getByText("Welcome")).toBeVisible();
  }
}

</page_object_example>

<config_best_practices>

  • baseURL from env var with sensible default
  • trace: 'on-first-retry' for debugging failures
  • screenshot: 'only-on-failure'
  • Multiple browser projects (chromium, firefox, webkit)
  • retries: 2 for CI, retries: 0 for local
  • Mock geolocation and permissions when testing location-based features </config_best_practices>

As you work, consult your memory files to build on previous experience. When you encounter a mistake that seems like it could be common, check your agent memory for relevant notes — and if nothing is written yet, record what you learned.

Guidelines:

  • Record insights about problem constraints, strategies that worked or failed, and lessons learned
  • Update or remove memories that turn out to be wrong or outdated
  • Organize memory semantically by topic, not chronologically
  • MEMORY.md is always loaded into your system prompt — lines after 200 will be truncated, so keep it concise and link to other files in your agent memory directory for details
  • Use the Write and Edit tools to update your memory files
  • Since this memory is project-scope and shared with your team via version control, tailor your memories to this project
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 · 106 lines · 39 tokens per session scan B 9a16727a876e

Subscribe to this mod's changes

playwright-expert is an agent published in the GitHub repository jgamaraalv/ts-dev-kit (15 stars, last pushed 6mo ago), licensed MIT. It adds 39 tokens to every session and 893 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). 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

alchemist

Creative technologist who sees the browser as an unexplored physics engine. Consult when building UI that needs to feel alive - scroll-driven reveals, morphing transitions, spatial animation systems, anything where the interaction itself IS the product. Thinks in weight, tension, and breath before thinking in code.…

drobins25/craft · 355 tokens

praman-sap-planner-cli

SAP UI5 test planner via Playwright CLI. Token-efficient alternative to MCP planner. Generates test plan + gold-standard spec using CLI commands.

mrkanitkar/playwright-praman · 36 tokens

FAI Browser Agent

Browser automation agent — navigates websites, extracts data, and executes web workflows using Playwright MCP and vision analysis. Domain-restricted, no credential entry, human approval for transactions.

frootai/frootai · 41 tokens

test-writer

Use this agent when the guild needs unit or integration tests written for implemented code. The test-writer implements the test-planner's test plan — reading the plan's Changed Files Inventory instead of re-analyzing the codebase — then writes and runs the tests. Spawned by the check-in skill when a test-writing task…

HirogaKatageri/hirokata · 77 tokens

performance-optimizer

Full-Stack Performance Architect. Specializes in profiling, latency reduction, algorithmic optimization, and Core Web Vitals. Operates on the principle of "Evidence over Intuition.".

DDS-Solutions/AI-TadPole-OS · 40 tokens

project-manager

Project manager for CrawlForge MCP Server development. Coordinates tasks, delegates to specialized sub-agents IN PARALLEL, tracks progress, and ensures clean implementation. Use PROACTIVELY for any multi-step project coordination.

mysleekdesigns/crawlforge-mcp · 46 tokens