Fragile tests and inconsistent setup make browser testing difficult to maintain. This skill provides practical Playwright patterns for test design, debugging, and CI workflows.
Review the plan and obtain explicit user consent before changing files.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Agent request
Review the Skillstore skill "playwright-best-practices" from https://skillstore.io/skills/currents-dev-playwright-best-practices.md and its manifest at https://skillstore.io/api/skills/currents-dev-playwright-best-practices/manifest. Verify the artifact. Stop and obtain explicit user consent before installing or changing files.
Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Most presented alerts are benign Playwright examples; no evidence found of keylogging, prompt injection, or malicious exfiltration in reviewed context. Confirmed risks involve unguarded database operations, predictable temporary files, and indiscriminate process termination; HAR commit guidance adds a data-disclosure concern. All 400 presented findings were adjudicated; 888 omitted matches still require manual review before automatic publication. Static review was capped at 400/1288 representative findings; omitted static matches are unconfirmed, so automatic publishing stays disabled until manual review.
The guide says 'Commit `.har` files to version control' after recording staging admin API traffic. Without redaction, recordings can disclose authorization headers, cookies, or sensitive response bodies through repository history.
The recording and commit recommendation are explicit, but no captured HAR was supplied. This confirms unsafe guidance, not an observed credential leak.
Capability review items (7)
These are real local capabilities that may be expected for this skill, so they require review but are not counted as confirmed malicious behavior.
core/global-setup.md:163: The snapshot restore executes SQL against DATABASE_URL without verifying a disposable test database. A misconfigured connection can modify a non-test database.
execSync('npx prisma db push --force-reset', { stdio: 'inherit' });
core/configuration.md:266: Teardown invokes Prisma with --force-reset without validating the database target. An inherited production connection could cause irreversible data loss.
core/global-setup.md:163: The snapshot restore executes SQL against DATABASE_URL without verifying a disposable test database. A misconfigured connection can modify a non-test database.
debugging/flaky-tests.md:306: The timestamp-based shared /tmp path is opened with writeFileSync without exclusive creation. Another local user could precreate a symlink and cause file truncation.
debugging/flaky-tests.md:306: The timestamp-based shared /tmp path is opened with writeFileSync without exclusive creation. Another local user could precreate a symlink and cause file truncation.
debugging/flaky-tests.md:305: The timestamp-based shared /tmp path is opened with writeFileSync without exclusive creation. Another local user could precreate a symlink and cause file truncation.
infrastructure-ci-cd/github-actions.md:519: The command force-kills every process returned for port 3000 without checking ownership by this test run. Shared runners could lose unrelated services.
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Create application tests with accessible locators, reusable setup, and assertions tied to visible behavior.
Investigate Intermittent Failures
Review flaky tests for timing errors, shared state, unstable selectors, and missing network synchronization.
Improve CI Test Workflows
Plan browser installation, caching, sharding, reports, and controlled environment setup for automated test runs.
Try These Prompts
Write a First Browser Test
Write a Playwright test for the login flow in this project. Use accessible locators and auto-waiting assertions. Identify missing application details before assuming selectors.
Fix a Flaky Test
Review this failing Playwright test and its error output. Identify timing, locator, and isolation problems. Propose focused fixes and repeated-run verification without hiding failures.
Design Authentication Fixtures
Design Playwright fixtures for admin and member workflows in this project. Isolate worker data and protect saved authentication state. Explain which external services need mocks.
Review a Sharded CI Pipeline
Review this Playwright CI configuration for sharding, caching, reports, and database lifecycle. Restrict destructive operations to disposable test resources. Require approval before destructive changes.
Best Practices
Use accessible locators and auto-waiting assertions that describe observable application behavior.
Isolate test data and authentication state; keep credentials and sanitized recordings out of unintended publication paths.
Review destructive setup commands before execution and verify changes with targeted, repeated test runs.
Avoid
Replacing reliable synchronization with fixed sleeps or excessive retries.
Sharing mutable users, sessions, or database state across parallel workers without isolation.
Running database resets against unverified targets or committing recordings without secret redaction.
Frequently Asked Questions
Does this skill install Playwright or run browsers automatically?
No. It provides guidance and examples. Browser execution requires an available tool environment, installed dependencies, and project configuration.
Can I use it with Claude, Codex, and Claude Code?
The skill declares support for all three tools. Available file access and command execution depend on your configured environment.
Which test types does it cover?
It covers end-to-end, API, component, visual, accessibility, security, and performance testing, with additional Electron and browser extension examples.
Can it help with flaky tests?
Yes. It documents trace analysis, locator improvements, synchronization, test isolation, and repeated runs. Application-specific evidence is still required.
Should every service be mocked?
No. The guidance favors real application integrations and controlled mocks for external services. Select boundaries according to the behavior under test.
Are database cleanup examples safe to copy unchanged?
No. Validate disposable test targets and require approval for destructive operations. Protect credentials, saved sessions, and recorded traffic before sharing artifacts.