ui-test-designer

ui-test-designer is an agent for Claude Code from ErkanBarin/playwright-agent-mcp-starter. It costs 23 tokens per session (509 once invoked), scanned A, original, MIT.

An agent for designing browser-based UI tests using the Page Object Model, a way to keep page selectors and actions in reusable objects. It specifies selector preferences, reliable waits, fixtures, and test tags.

In plain words
What is it for?
Planning or updating end-to-end tests for web pages, including page objects, user actions, expected results, fixtures, and smoke or regression coverage.
Why use it?
It helps avoid fragile selectors, fixed time delays, duplicated page logic, and tests that do not follow the project's structure.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { test, expect } from '../fixtures/base.fixture';.

Good fit Planning or updating end-to-end tests for web pages, including page objects, user actions, expected results, fixtures, and smoke or regression coverage.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ErkanBarin/playwright-agent-mcp-starter
agentmods
npx agentmods add agents/erkanbarin/playwright-agent-mcp-starter/ui-test-designer

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 ui-test-designer

README.md
[![agentmods](https://agentmods.dev/badge/agents/erkanbarin/playwright-agent-mcp-starter/ui-test-designer/github.svg)](https://agentmods.dev/agents/erkanbarin/playwright-agent-mcp-starter/ui-test-designer)
Your own site
<a href="https://agentmods.dev/agents/erkanbarin/playwright-agent-mcp-starter/ui-test-designer"><img src="https://agentmods.dev/badge/agents/erkanbarin/playwright-agent-mcp-starter/ui-test-designer/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 ui-test-designer

Your own site · 80×15
<a href="https://agentmods.dev/agents/erkanbarin/playwright-agent-mcp-starter/ui-test-designer"><img src="https://agentmods.dev/badge/agents/erkanbarin/playwright-agent-mcp-starter/ui-test-designer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 509 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.00023 $0.00509
Opus 5 $0.00012 $0.00254
Sonnet 5 $0.00005 $0.00102
Haiku 4.5 $0.00002 $0.00051

Measured 10d ago against content hash fc35e5aa58b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

ui-test-designer 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 10d 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.

ai/agents/ui-test-designer.md · 68 lines

What it actually says

UI Test Designer

You create well-structured, maintainable UI tests following the project's Page Object Model pattern and fixture system.

Selector Priority (Strict Order)

  1. Role-based (best): page.getByRole('button', { name: 'Submit' })
  2. Test ID: page.getByTestId('submit-btn')
  3. Text: page.getByText('Submit Form')
  4. Label: page.getByLabel('Email Address')
  5. CSS (avoid): page.locator('.submit-button')
  6. XPath (never): Only as absolute last resort

Wait Rules

Never:

await page.waitForTimeout(3000); // BAD

Always:

await expect(page.getByRole('heading')).toBeVisible();
await page.waitForResponse(resp => resp.url().includes('/api/data'));
await expect(page.getByTestId('spinner')).toBeHidden();

Test Design Process

  1. Understand — Identify pages, user actions, expected outcomes.
  2. Check existingGlob for page objects, Grep for related tests.
  3. Create/update page object — Locators in constructor, methods for actions, no assertions.
  4. Write tests — One logical assertion per test, use fixtures.
  5. Tag tests@ui, @smoke, @regression as appropriate.

Test Structure Template

import { test, expect } from '../fixtures/base.fixture';

test.describe('Feature Name @ui @regression', () => {
  test('should [outcome] when [action]', async ({ page }) => {
    // Arrange
    // Act
    // Assert
  });
});

Naming Convention

Test descriptions: should [verb] [expected outcome] when [condition]

Anti-Patterns

  • Selectors in tests (belong in page objects)
  • Hardcoded test data (use fixtures)
  • Tests depending on other tests
  • Assertions in page objects
  • Multiple unrelated assertions per test
  • Hardcoded URLs (use config/env)
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. 10d ago First seen · 68 lines · 23 tokens per session scan A fc35e5aa58b0

Subscribe to this mod's changes

ui-test-designer is an agent published in the GitHub repository ErkanBarin/playwright-agent-mcp-starter (43 stars, last pushed 6mo ago), licensed MIT. It adds 23 tokens to every session and 509 once invoked, about $0.0001 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 agents, from other repositories

integration-testing-orchestrator

Use this agent when you need to coordinate end-to-end testing across multiple components, optimize build systems, validate deployments, or ensure proper integration between eBPF programs, Rust collector, and frontend components. Examples: Context: User has made changes to both eBPF programs and Rust collector and…

eunomia-bpf/agentsight · 0 tokens

test-engineer

Expert in testing, TDD, and test automation. Use for writing tests, improving coverage, debugging test failures. Triggers on test, spec, coverage, jest, pytest, playwright, e2e, unit test.

ashrafmusa/agenticana · 49 tokens

e2e-tester

Use for end-to-end and smoke testing of critical user paths across viewports. Pairs with a browser-automation MCP (for example Playwright) when one is available.

mnzralee/claude-multi-agent-architecture · 41 tokens

qa-tester

Use when the task is a verifiable browser interaction with a binary pass/fail outcome — login flow, submit form, attach file, verify message appears. Returns a verdict + evidence. Do NOT use for tasks needing user decisions mid-flow (region selection, domain pick, etc.).

DevZonayed/Mochi · 60 tokens

visual-diagram-verifier

Use this agent when the architecture-designer:design or architecture-designer:review skill has opened the browser preview (Step 8 / step 4d) and wants to check whether diagrams actually render without visually overlapping elements — a real, rendered-geometry check using the chrome-devtools-mcp or firefox-devtools-mcp…

sembraniteam/claude-plugins · 112 tokens

qa-engineer

Converts Excel test case reports into verified Playwright E2E scripts with real selectors.

odarino/haren · 21 tokens