playwright-best-practices
Installation
SKILL.md
Playwright Best Practices
CLI Context: Prevent Context Overflow
When running Playwright tests from Claude Code or any CLI agent, always use minimal reporters to prevent verbose output from consuming the context window.
Use --reporter=line or --reporter=dot for CLI test runs. Configure playwright.config.ts to default to minimal reporters when CI or CLAUDE env vars are set — see playwright-patterns.md for the config snippet.
Locator Priority (Most to Least Resilient)
Always prefer user-facing attributes: