playwright-testing

Guidance for writing browser-based end-to-end tests with Playwright, a tool that controls a real browser. It recommends organizing tests around page objects, accessible selectors, fixtures, and reliable waits.

In plain words
What is it for?
Use it to add or maintain tests for the Electron application, workspace providers, resources, MCP servers, and related user flows.
Why use it?
It helps tests remain readable and less fragile when pages load asynchronously or depend on setup and cleanup.

Skill for Claude CodeCodex

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 skills/openkaiden/kaiden/playwright-testing
Any agent
npx skills add openkaiden/kaiden --skill playwright-testing
Clone the repo
git clone --depth 1 https://github.com/openkaiden/kaiden

Made for: Claude Code, Codex.

Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,790 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00042 $0.02790
Opus 5 $0.00021 $0.01395
Sonnet 5 $0.00008 $0.00558
Haiku 4.5 $0.00004 $0.00279

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

Security

Grade A, and why

playwright-testing 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 3d 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/skills/playwright-testing/SKILL.md · 286 lines

How it starts

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

Playwright Test Automation Guide for Kaiden

Core Principles

  1. Page Object Model (POM): Every page/component gets its own class. Tests never touch raw locators directly.
  2. Resilient locators: Use accessible selectors — getByRole, getByLabel, getByText — before falling back to getByTestId or CSS.
  3. Explicit waits: Use expect with auto-retry or expect.poll() for async operations. Never use arbitrary setTimeout delays.
  4. Serial execution: Use test.describe.serial() for interdependent tests (e.g., create → verify → delete flows).
  5. Fixture-based setup/teardown: Resources, MCP servers, and Goose are managed via Playwright fixtures with automatic cleanup.
  6. Clear failures: Every assertion should produce a readable error. Use descriptive test IDs ([FEATURE-NUM]).

Project Structure

tests/playwright/
├── playwright.config.ts              # Test projects, timeouts, reporters
├── package.json
├── tsconfig.json
├── src/
│   ├── fixtures/
│   │   ├── electron-app.ts           # Core Electron app + page object fixtures
│   │   └── provider-fixtures.ts      # Provider resource/MCP/Goose setup (worker-scoped)
│   ├── model/
│   │   ├── core/
│   │   │   └── types.ts              # Enums, constants, interfaces, TIMEOUTS
│   │   ├── navigation/
│   │   │   └── navigation.ts         # NavigationBar — navigates to all major pages
│   │   └── pages/
│   │       ├── base-page.ts          # Abstract base: waitForLoad(), openTab()
│   │       ├── base-table-page.ts    # Table operations: row lookup, polling, counting
│   │       ├── chat-page.ts          # Chat UI interactions (40+ methods)
│   │       ├── flows-page.ts         # Flow management with table operations
│   │       ├── flows-create-page.ts  # Flow creation workflow
│   │       ├── flows-details-page.ts # Flow details view
│   │       ├── settings-page.ts      # Main settings hub
│   │       ├── mcp-page.ts           # MCP server management
│   │       ├── extensions-page.ts    # Extension browsing
│   │       ├── agent-workspaces-page.ts      # Workspace list + lifecycle entry
│   │       ├── agent-workspace-create-page.ts # Create wizard (FS + network steps)
│   │       ├── agent-workspace-details-page.ts # Workspace details shell
│   │       ├── agent-workspace-overview-page.ts # Overview tab
│   │       ├── agent-workspace-terminal-page.ts
│   │       └── *-tab-page.ts         # Sub-page/tab objects
│   ├── specs/
│   │   ├── dashboard.spec.ts         # App startup and navigation
│   │   ├── extensions-smoke.spec.ts  # Extension management
│   │   ├── settings-smoke.spec.ts    # Settings pages
│   │   ├── workspaces-smoke.spec.ts  # Workspace wizard UI (Kaiden-App-Core, @smoke)
│   │   └── provider-specs/           # Provider-specific tests
│   │       ├── chat-smoke.spec.ts    # Chat functionality (gold standard)
│   │       ├── mcp-smoke.spec.ts     # MCP servers
│   │       └── workspaces/           # Coding Agent Workspace lifecycle (Workspace-Provider)
│   └── utils/
│       ├── app-ready.ts              # waitForAppReady(), waitForNavigationReady(), handleDialogIfPresent()
│       └── test-artifacts.ts         # Trace, screenshot, video capture on failure
└── output/                           # Generated reports and artifacts

Read the full file on GitHub · 286 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 286 lines · 42 tokens per session scan A 0c9dda330af3

Subscribe to this mod's changes

playwright-testing is a skill published in the GitHub repository openkaiden/kaiden (100 stars, last pushed 3d ago), licensed Apache-2.0. It adds 42 tokens to every session and 2,790 once invoked, about $0.0002 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 skills, from other repositories

use-agent-browser-for-airi

Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…

moeru-ai/airi · 87 tokens

e2e-deployment-skill

Use this deployment skill to verify shared skills load during Playwright startup.

danny-avila/LibreChat · 22 tokens

launch

Launch Code OSS (VS Code from sources) into an isolated throwaway profile with unique debug ports so you can drive it with @playwright/cli AND attach a Node debugger via dap-cli in the same session. Use when working on VS Code itself and you want to interact with the running workbench, automate chat or UI flows, test…

microsoft/vscode · 96 tokens

actionbook-web-test

Run browser-based web tests against websites using Actionbook CLI. Activate when the user wants to test a website workflow, run smoke tests, verify a user flow, check if a web application works, run regression tests, or validate browser-based interactions. Supports test definition, execution, assertion, reporting, and…

actionbook/actionbook · 71 tokens

web-preview

Flutter Web版をビルド → サーバー起動 → Playwright でアクセス確認 → URLをユーザーに案内する。.

K9i-0/ccpocket · 32 tokens

qa/e2e-playwright

Playwright E2E 测试完整方法论,涵盖项目初始化、Page Object Model、认证复用、API Mock、视觉回归、多浏览器测试、CI 集成和调试技巧.

echoVic/boss-skill · 50 tokens