gitwtfhub

wtf is playwright-agent-skills?

hzijad/playwright-agent-skills — explained in plain English

Analysis updated 2026-05-18

5Audience · developerComplexity · 1/5LicenseSetup · easy

TL;DR

A set of narrow, reusable Playwright testing skills that steer AI coding agents away from brittle selectors and hard waits.

Mindmap

mindmap
  root((Playwright Agent Skills))
    What it does
      Reliable test patterns
      Guides AI agents
    Tech stack
      Playwright
      TypeScript
    Use cases
      Write tests
      Debug flaky tests
      Mock network calls
    Audience
      Developers using AI agents

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Guide an AI coding agent to write reliable Playwright tests

REASON 2

Set up tests that start from an already logged-in session

REASON 3

Mock unreliable third-party network calls in end-to-end tests

REASON 4

Debug a flaky or failing Playwright test using traces

What's in the stack?

PlaywrightTypeScript

How it stacks up

hzijad/playwright-agent-skills00kaku/wp-rest-playground1ncendium/aibuster
Stars555
LanguageJavaScriptPython
Setup difficultyeasyhardmoderate
Complexity1/53/53/5
Audiencedeveloperdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, under the MIT license.

Wtf does this do

Playwright Agent Skills is a set of reusable instruction files, called skills, meant to guide AI coding agents toward writing better end to end tests with Playwright, a popular browser testing tool. The problem it addresses is that AI agents, left on their own, tend to write brittle tests: clicking elements using fragile CSS class names and adding fixed waits like "pause for two seconds" instead of waiting for the actual page state to be ready. The README shows this contrast directly with a before and after example. The "before" test clicks a CSS class and waits a fixed two seconds before checking a welcome message. The "after" version instead clicks a button by its visible role and label, then uses an assertion that automatically retries until the expected heading appears, which is the pattern the Playwright team itself recommends. The project deliberately avoids being a general purpose browser automation skill. Many existing tools are built for one-off checks, like taking a single screenshot to see if a page looks right, and so they lean on shortcuts that are fine for a throwaway script but bad for code meant to live in a real test suite and run in continuous integration. Every pattern here is written with the opposite goal: producing test code a Playwright maintainer would be comfortable merging. Four skills are included, each scoped narrowly to one job. playwright-core covers everyday test writing and review. playwright-auth-state handles starting a test already logged in using saved browser session state. playwright-network-mocking replaces unreliable third party network calls with predictable mocked responses. playwright-debugging helps diagnose and fix tests that are already flaky or failing, using traces and repeated runs. Installation is a single command using the Agent Skills CLI, which the README says works with over seventy different AI coding agents, including GitHub Copilot, Codex, Cline, and Gemini CLI, not just one specific tool. The project is released under the MIT license.

Yoink these prompts

Prompt 1
Install the playwright-agent-skills package and use playwright-core to write a login test.
Prompt 2
Use the playwright-debugging skill from hzijad/playwright-agent-skills to figure out why my test is flaky.
Prompt 3
Show me how playwright-network-mocking would replace a real API call in this test.

Frequently asked questions

wtf is playwright-agent-skills?

A set of narrow, reusable Playwright testing skills that steer AI coding agents away from brittle selectors and hard waits.

What license does playwright-agent-skills use?

Use freely for any purpose, including commercial use, under the MIT license.

How hard is playwright-agent-skills to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is playwright-agent-skills for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.