Codex skills for Playwright
Playwright shows up here in three roles: end-to-end tests, visual regression and accessibility scans, and browser chores such as scripted tasks, screenshots and HTML to PDF. Across all of them Codex locates elements by role and label, waits on real page state instead of sleeps, and reads the trace file to fix a failure at its cause.
Start with these 3
- Playwright E2E Role locators, one login, a trace for every flake Codex writes Playwright specs that locate elements by role and label, wait through web-first assertions instead of sleeps, log in once through a setup project, and seed data via API fixtures. When a test flakes it reads the trace and fixes the cause, and it wires sharded CI runs with merged HTML reports.
- Browser Automation Automate web chores without storing passwords Codex scripts repetitive website chores with Playwright: the user signs in once and the session is reused, locators target roles and labels instead of brittle CSS, fixed sleeps become waits on real page state, and irreversible clicks sit behind a dry run and a confirm flag. Every failed run leaves a trace file you can replay step by step.
- Flaky Test Triage Name the cause, prove the fix, retire the retry Codex reproduces an intermittent failure in a rerun loop before touching code, classifies it (test pollution, async race, clock, randomness, parallel resource clash, leak) and fixes the nondeterminism itself instead of adding sleeps or retries. It proves the fix with a statistically meaningful number of clean runs and keeps quarantined tests visible with owners and due dates.
5 more Playwright skills
-
Visual Regression Testing
Every pixel diff is real, every baseline reviewed -
Accessibility Testing
axe in CI, humans for what axe cannot see -
HTML to PDF
Print CSS and Chromium, no surprise blank pages -
Screenshot Automation
Same page, same pixels, every run -
Synthetic Monitoring
Prove login and checkout work, every five minutes
General skills with Playwright guidance
Not built around Playwright, but they include steps or tools for it. Not part of the install-all command.
-
tRPC APIs
End-to-end types without leaking data or auth -
Chrome Extensions (MV3)
Manifest V3 extensions that survive the service worker -
Codex MCP Servers
Connect tools to Codex, scoped and debuggable -
Multi-Agent Orchestration
More agents only when the eval says it pays -
CI Speedup
Measure the critical path, then cut it -
Vitest Testing
Hoisted mocks, named projects, real-browser tests -
Contract Testing
Catch cross-service breakage before either side deploys -
Test Strategy
Pick the test mix from risks, not diagrams -
Latency Budgets
Split p99 across every hop, then set timeouts -
Report Generation
Charts, numbers and prose from one source of truth -
Responsive Design
Layouts that hold at every width, not three -
Acceptance Criteria
Given/When/Then that testers cannot argue over
Every Playwright skill in one command
Installs these 8 into ~/.agents/skills/. Add --project after -- to install into the current repository instead.
The installer is a 104-line POSIX shell script. It fetches the skills you name from codexskills.dev and unpacks each into its own folder in your skills directory. No sudo, no telemetry, and every skill page shows the full SKILL.md first. Read install.sh
curl -fsSL codexskills.dev/install.sh | sh -s -- playwright-e2e browser-automation flaky-test-triage visual-regression-testing accessibility-testing html-to-pdf screenshot-automation synthetic-monitoring Playwright FAQ
Is there a Codex skill for writing Playwright tests?
Playwright E2E writes Playwright Test specs in TypeScript with role-based locators and web-first assertions, logs in once through a setup project that saves storageState, and seeds data via API fixtures. It treats page.waitForTimeout and networkidle as anti-patterns, records traces on first retry, and wires sharded CI runs with blob reports merged into one HTML report.
How does Codex fix flaky Playwright tests?
Playwright E2E reads the trace with npx playwright show-trace and fixes the race it shows, such as a locator matching the wrong element or an unfinished request, rather than raising timeouts. Flaky Test Triage reproduces the failure in a rerun loop first, classifies it as pollution, async race, clock, randomness or a parallel resource clash, and proves the fix with a statistically meaningful number of clean runs.
Can Playwright run visual regression and accessibility checks too?
Visual Regression Testing uses toHaveScreenshot with frozen time, fonts and animations, masked volatile regions and baselines rendered in the same Docker container CI uses, so macOS and Linux font rendering never get compared. Accessibility Testing runs @axe-core/playwright on page states after interaction and gates CI on new serious and critical violations, then adds the keyboard and screen reader pass scanners miss.
How do I install all 8 Playwright skills at once?
Pass every name to the installer in one command: curl -fsSL https://codexskills.dev/install.sh | sh -s -- playwright-e2e browser-automation flaky-test-triage visual-regression-testing accessibility-testing html-to-pdf screenshot-automation synthetic-monitoring. Add --project right after -- to put them in the current repository's .agents/skills/ so your team gets them too.
Which Playwright skill should I try first?
Playwright E2E is the closest fit for most Playwright work. Mention it with $playwright-e2e in a prompt to load it on purpose; after that, Codex picks it up on its own whenever a task matches.