Skip to content
Back to skills

Playwright Best Practices

ASecurity

Use when writing or modifying Playwright tests (.spec.ts, .test.ts with @playwright/test imports).

  • 2 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added October 16, 2026
ai-agentsgotesting

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add alleneubank/agent-profile --skill playwright-best-practices --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Playwright Best Practices?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Playwright Best Practices
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alleneubank-playwright-best-practices/badge)](https://www.skillsdirectory.com/skills/alleneubank-playwright-best-practices)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: playwright-best-practices
description: Use when writing or modifying Playwright tests (.spec.ts, .test.ts with @playwright/test imports).
---

# Playwright Best Practices

- **Use `--reporter=line` or `--reporter=dot` for CLI test runs** from an agent; the default reporter's verbose output consumes the context window.

## Anti-Patterns

- Asserting a `page.route` handler fired — a change detector; assert the DOM the user sees (`testing-best-practices`)
- Registering `page.route` mocks after navigation — set them up before `goto`
- Retry loops around assertions — web-first assertions already retry

Files in this skill

  • SKILL.md2.5 KB
  • playwright-patterns.md11.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.