Playwright test patterns that avoid the mistakes agents make by default. Playwright Agent Skills is a small, opinionated set of reusable prompts for writing and reviewing Playwright tests.
FAQ
playwright-agent-skills is a Claude Code plugin with 4 hand-picked skills for testing work, indexed on Flowy. Install it with the command on its page. It includes playwright-auth-state, playwright-core, playwright-debugging. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
$ npx -y skills add hzijad/playwright-agent-skills --agent claude-code
Repo: hzijad/playwright-agent-skills
Playwright test patterns that avoid the mistakes agents make by default.
Playwright Agent Skills is a small, opinionated set of reusable prompts for writing and reviewing Playwright tests. Each skill stays focused on one job so agents can apply the right standard without loading unrelated guidance.
Left unguided, agents tend to reach for brittle selectors and hard waits. playwright-core steers them toward the pattern Playwright's own docs recommend.
Before
test('user can log in', async ({ page }) => {
await page.goto('/login');
await page.click('.btn-login-submit');
await page.waitForTimeout(2000);
expect(await page.locator('.welcome-msg').textContent()).toContain('Welcome');
});
After
test('shows a welcome message after login', async ({ page }) => {
await page.goto('/login');
await page.getByRole('button', { name: 'Log in' }).click();
await expect(page.getByRole('heading', { name: /welcome/i })).toBeVisible();
});
Role-based locator instead of a CSS class, no hard wait, and an auto-retrying assertion instead of manual timing.
Most Playwright skills optimize for one-off checks: write a disposable
script, run it, get a screenshot, done. They're built to answer "does this
page look right" once โ not to produce code that belongs in your repo, so
they lean on page.waitForTimeout and raw CSS selectors without cost.
Playwright Agent Skills assumes the opposite: every pattern here is meant to be committed and run in CI. Locators are accessible-first, waits are assertion-driven, and structure follows what a Playwright maintainer would sign off on โ because it's not a one-off script, it's your test suite.
Works with any agent supported by the Agent Skills CLI โ GitHub Copilot, Codex, Cline, Gemini CLI, and 70+ more.
npx skills add hzijad/playwright-agent-skills
After installation, point agents at the skill that matches the task. The docs inside each skill explain the recommended patterns and the cases where they should not be used.
storageState and setup projects.page.route() mocks.Use playwright-core for normal test authoring and review. Use playwright-auth-state when a test should begin logged in. Use playwright-network-mocking when external services should be controlled from the test. Use playwright-debugging when a test is already failing or flaky and the failure needs to be understood first.
skills/
playwright-core/
playwright-auth-state/
playwright-network-mocking/
playwright-debugging/
Keep the skills narrow. If a new topic does not fit one of the existing folders, add a new skill instead of broadening an existing one.
MIT โ see LICENSE.
.gitignore
LICENSE
README.md
skills/
playwright-auth-state/
SKILL.md
playwright-core/
SKILL.md
playwright-debugging/
SKILL.md
playwright-network-mocking/
SKILL.mdยฉ 2026 Flowy ยท Free and open source
Built for Claude Code ยท Not affiliated with Anthropic