playwright
Skill12 starsChanged 4 months agoMITView on GitHub
End-to-end testing with Playwright — generate, run, and debug E2E tests.
- Installs packages
We split this skill into the rules it gives an agent
10 rules. 0 are common, 5 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 79 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Read the source files for the page/component to test.
- Distinctive: line 37
Create a test file following the project's existing patterns and directory structure.
- Distinctive: line 64
Read error output carefully
- Very specific: line 65
Use --trace on and open trace viewer: npx playwright show-trace trace.zip
- Very specific: line 67
Use page.pause() for step-by-step debugging in headed mode
- Very specific: line 81
Use data-testid attributes for stable selectors
- Distinctive: line 82
Prefer user-visible text and ARIA roles over CSS selectors
- Very specific: line 83
Use test.step() for complex multi-step flows
- Very specific: line 85
Use page.waitForResponse() for async navigation
- Distinctive: line 86
Place test files alongside existing test patterns in the project
“Common” is measured: kept by at least 6 in 10 of the 79 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Playwright E2E Testing
Generate and run Playwright end-to-end tests for web applications.
Prerequisites
npx playwright --versionIf not installed:
npm init playwright@latest
# or add to existing project:
npm install -D @playwright/test && npx playwright installWorkflow
1. Analyze
Read the source files for the page/component to test. Understand routes, interactive elements, and expected behaviors.
2. Generate Test File
Create a test file following the project's existing patterns and directory structure.
import { test, expect } from '@playwright/test';
test.describe('Feature Name', () => {
test.beforeEach(async ({ page }) => {
// Setup: navigate, authenticate, seed data
});
test('should do expected behavior', async ({ page }) => {
// Arrange
// Act
// Assert
});
});3. Run Tests
npx playwright test <file> # Run specific test file
npx playwright test --headed # With visible browser
npx playwright test --ui # Playwright UI mode
npx playwright test --trace on # Capture trace for debugging4. Debug Failures
- Read error output carefully
- Use
--trace onand open trace viewer:npx playwright show-trace trace.zip - Take screenshots on failure:
await page.screenshot({ path: 'debug.png' }) - Use
page.pause()for step-by-step debugging in headed mode
Capabilities
- Navigation:
page.goto(), URL assertions, redirect verification - Forms:
page.fill(),page.selectOption(),page.check(), multi-step wizards - Assertions:
expect(page).toHaveURL(),expect(locator).toBeVisible(),toHaveText() - Screenshots:
page.screenshot(), full-page, element-level - Visual regression:
expect(page).toHaveScreenshot()with thresholds - Accessibility:
@axe-core/playwright, ARIA role selectors, keyboard navigation - Network:
page.route()for mocking,page.waitForResponse()for API calls
Tips
- Use
data-testidattributes for stable selectors - Prefer user-visible text and ARIA roles over CSS selectors
- Use
test.step()for complex multi-step flows - Set
baseURLinplaywright.config.ts - Use
page.waitForResponse()for async navigation - Place test files alongside existing test patterns in the project
Other versions91 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 91
- openai/openai-agents-python★ 30ksame name
- openai/skills★ 27ksame name
- prowler-cloud/prowler★ 15ksame name
- hyperdxio/hyperdx★ 10ksame name
- bluesky-social/atproto★ 9.7ksame name
- netease-youdao/LobsterAI★ 6.2ksame name
- Kiln-AI/Kiln★ 5.2ksame name
- freestylefly/wesight★ 941same name
- Gram-ax/gramax★ 609same name
- JetBrains/skills★ 386same name
81 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use develop-web-game, msw and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
hebertzhuSkilldevelop-web-game
Use when building or iterating on a web game and you need a tight implement-test-observe loop; prefer the bundled Playwright client, inspect screenshots and text state, and validate every meaningful change before moving on.
Also in 4 projects that use this
thongdn-itSkillmsw
MSW (Mock Service Worker) best practices for API mocking in tests (formerly test-msw). This skill should be used when setting up MSW, writing request handlers, or mocking HTTP APIs. This skill does NOT cover general testing patterns (use test-vitest or test-tdd skills) or test methodology.
Also in 3 projects that use this
SupabaseSkillreact-hook-form
Correct React Hook Form usage anywhere in the monorepo — data flow, subscriptions,
Also in 3 projects that use this
thongdn-itSkilltailwind
Tailwind CSS v4 performance optimization and best practices guidelines (formerly tailwindcss-v4-style). This skill should be used when writing, reviewing, or refactoring Tailwind CSS v4 code to ensure optimal build performance, minimal CSS output, and correct usage of v4 features. Triggers on tasks involving Tailwind configuration, @theme directive, utility classes, responsive design, dark mode, container queries, or CSS generation optimization.
Also in 5 projects that use this
VercelSkillreact
React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.
Also in 5 projects that use this
MicrosoftSkilltypescript
TypeScript best practices for this monorepo. Use this skill when: (1) writing new TypeScript code, (2) reviewing TypeScript code, (3) working with API responses, fetch calls, or JSON parsing, (4) adding or modifying types and interfaces.
Also in 7 projects that use this
- +1 more from thongdn-it
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- a11ySkill
- articleSkill
- basic-reviewSkill
- cache-strategySkill
- clean-codeSkill
- cli-for-agentSkill
- content-writerSkill
- daily-qaSkill
- dbmap-auto-offSkill
- dbmapSkill
- db-optimizeSkill
- debugSkill
- defenseSkill
- diff-walkthroughSkill
- evalSkill
- executing-plansSkill
- finish-branchSkill
- fuzzSkill
- handoffSkill
- humanizeSkill
- iac-scanSkill
- kb-advisorSkill
- minimalist-reviewSkill
- pentestSkill
- perf-profileSkill
- pricingSkill
- qa-fullSkill
- quota-resilienceSkill
- subagent-driven-developmentSkill
- superskills-doctorSkill
- superskills-upgradeSkill
- tapestrySkill
- tddSkill
- test-coverageSkill
- validate-ideaSkill
- verifySkill
- web-perfSkill
- worktreesSkill
- write-planSkill
- youtubeSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

