setup-playwright
Skill4 starsChanged 11 days agoMITView on GitHub
Use when adding, extending, or repairing a repo-owned Playwright test harness across Node Playwright Test, Playwright Pytest, or .NET/Java test frameworks. Also use when explicitly persisting `@playwright/cli` developer tooling, or adding or regenerating Playwright Test Agent definitions for a compatible Node Playwright Test harness. Not for live CLI exploration or ordinary spec work in a working harness; use `playwright-testing`.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- karan-ghadi/claude-skillstheir own version, first seen Jun 25, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- karan-ghadi/claude-skills★ 1same name
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.
In this repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agentic-sdlc-improvementSkill
- agentic-sdlcSkill
- agent-skill-generatorSkill
- agents-md-generatorSkill
- backend-guidanceSkill
- backend-systems-guidanceSkill
- bounded-delegationSkill
- chrome-devtools-axiSkill
- coding-guidance-bashSkill
- coding-guidance-cppSkill
- coding-guidance-goSkill
- coding-guidance-go-tuiSkill
- coding-guidance-pythonSkill
- coding-guidance-qtSkill
- context-engineeringSkill
- deepseek-harnessSkill
- design-md-authorSkill
- development-contract-processSkill
- development-contract-repo-overlay-templateSkill
- development-contract-systemSkill
- documenter-coauthoringSkill
- documenterSkill
- dream-thinkingSkill
- fuse-skillsSkill
- godotSkill
- go-testing-with-testifySkill
- jekyllSkill
- lighthouseSkill
- playwright-testingSkill
- project-config-and-testsSkill
- project-core-devSkill
- project-platform-diagnoseSkill
- project-release-maintainerSkill
- project-vendor-boundarySkill
- prompt-engineeringSkill
- recursive-thinkingSkill
- security-identity-accessSkill
- securitySkill
- story-clarifierSkill
- story-implementation-plannerSkill
- story-repo-scoutSkill
- story-to-plan-orchestratorSkill
- tester-mindsetSkill
- thinkingSkill
- ui-design-guidanceSkill
- ui-guidanceSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 17 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Use this skill when the main artifact is one or more of:
- Very specific: line 32
Use playwright-testing when the harness works and the task is a spec, test review, flake diagnosis, locator change, mock decision, visual …
- Distinctive: line 40
Follow the strongest repository signal:
- Distinctive: line 50
Do not create a Node sidecar in a Python, .NET, or Java repo merely because its examples are more familiar.
- Distinctive: line 55
If multiple ecosystems are equally plausible and package ownership cannot be derived from the repo, ask before adding dependencies.
- Very specific: line 60
Use this lane only when the user explicitly wants Playwright CLI tooling persisted in the repository.
- Very specific: line 68
If standalone @playwright/cli is still wanted, add it only as developer tooling under the repo's version and lockfile policy.
- Distinctive: line 80
Treat Playwright Test Agents as a Node Playwright Test harness extension, not as standalone generic agent tooling.
- Distinctive: line 88
If the harness or target host is missing, do not generate unusable definitions.
- Distinctive: line 109
If a CLI or Test Agent request also changes the test harness, use the Harness Workflow for that portion.
- Distinctive: line 114
Inspect before installing: Read repository instructions, package and lock files, test projects, existing Playwright artifacts, scripts, …
- Distinctive: line 121
Make the smallest coherent change: Use the repo's package manager and pinning policy.
- Distinctive: line 128
Wire auth deliberately: Use UI login, API login, or per-worker accounts according to the claim and mutation model.
- Distinctive: line 134
Validate in layers: Verify config/listing first, run one smoke target, repeat if the repair involved state or startup, then run the …
- Distinctive: line 146
Keep Playwright package and browser binaries aligned.
- Distinctive: line 149
Prefer one clear config owner per package.
- Distinctive: line 151
Keep local server reuse local.
- Distinctive: line 154
Default CI concurrency conservatively when shared state is not proven safe.
- Distinctive: line 155
Add parallelism or sharding only with an isolation model and report merging.
- Very specific: line 158
Use a Node setup project for reusable auth when applicable.
- Distinctive: line 166
Test generated config against the installed version.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Setup Playwright
Build the smallest reliable repo-owned Playwright setup that fits the repository's language, package boundaries, test runner, developer-tool, and CI conventions.
This is a system skill: it leaves behind a repo-owned harness or an explicitly
requested Playwright developer-tool artifact. Day-to-day test authoring and
live browser investigation belong to playwright-testing.
Ownership Boundary
Use this skill when the main artifact is one or more of:
- Playwright dependencies or browser binaries
- runner config, package placement, or monorepo wiring
- app startup through
webServeror an ecosystem-native equivalent - browser, device, environment, retry, reporter, or artifact configuration
- reusable-auth setup and ignored state files
- a minimal smoke check that proves the harness works
- CI install, smoke, sharding, or report-merge plumbing
- an explicitly requested repo-owned
@playwright/clideveloper dependency or script - host-targeted Playwright Test Agent definitions for a compatible Node Playwright Test harness
Use playwright-testing when the harness works and the task is a spec, test
review, flake diagnosis, locator change, mock decision, visual check, or
standalone playwright-cli investigation. If an environment-dependent install,
startup, container, or CI failure has no established cause, start with
project-platform-diagnose and return here once the repair is known.
Choose The Existing Ecosystem
Follow the strongest repository signal:
- Node/TypeScript/JavaScript:
@playwright/testunless another runner is already intentional. - Python with pytest: the official Playwright Pytest plugin and pytest-native fixtures/config.
- .NET: the repo's MSTest, NUnit, xUnit, or xUnit v3 project and Playwright .NET integration.
- Java: the repo's JUnit or TestNG module with its Maven or Gradle build.
Do not create a Node sidecar in a Python, .NET, or Java repo merely because its examples are more familiar. Load references/ecosystem-patterns.md before editing a non-Node harness.
If multiple ecosystems are equally plausible and package ownership cannot be derived from the repo, ask before adding dependencies.
Repo-Owned CLI Tooling
Use this lane only when the user explicitly wants Playwright CLI tooling
persisted in the repository. Agent-side investigation alone belongs to
playwright-testing and does not justify a dependency.
- Inspect package ownership, the installed command surface, and whether the
repo's existing Playwright version already exposes
npx playwright cli. - Record the existing runner and CLI package versions, dependency resolution, lockfile state, and browser-command ownership before changing dependencies.
- If standalone
@playwright/cliis still wanted, add it only as developer tooling under the repo's version and lockfile policy. - Compare dependency resolution afterward and verify both the existing runner
and the persisted CLI command. Do not upgrade or align a stable
@playwright/testharness to an alpha Playwright dependency pulled by the CLI. If the package manager cannot keep the surfaces compatible, report the conflict instead of forcing installation. - Report the before/after versions, lockfile impact, commands verified, and any browser-download or update commitment introduced.
Playwright Test Agent Extension
Treat Playwright Test Agents as a Node Playwright Test harness extension, not as standalone generic agent tooling.
- Inspect the worktree and existing agent definitions, then require a
compatible Node Playwright Test harness and an explicit target host or
--loopvalue supported by the installedinit-agentscommand. Identify an existing seed when the repo has one and check the installed version's default-seed behavior when it does not. - If the harness or target host is missing, do not generate unusable definitions. Use the Harness Workflow only when the request authorizes that additional setup; otherwise report the missing prerequisite. A missing seed alone is not a blocker: the current planner can create a default. Prefer an explicit seed when custom fixtures, hooks, project dependencies, or startup make that bootstrap contract material. Do not create a Node sidecar in a Python, .NET, or Java repo solely to enable Test Agents.
- Generate only the requested host definitions using current runtime help. Review the complete diff and preserve the documented regeneration path rather than casually hand-editing generated files.
- Validate agent-file discovery and the existing or generated seed's compatibility with the active config, fixtures, project dependencies, hooks, and startup contract. Do not claim operational success when required app access, accounts, or secrets were unavailable.
setup-playwrightowns generation, placement, version compatibility, and regeneration. Addprompt-engineeringonly when the user asks to evaluate or change agent instructions, tool boundaries, or prompt behavior, not for routine generation or structural diff review. Do not addagent-skill-generatormerely because the artifacts are called agents; they are not reusableSKILL.mdpackages.
If a CLI or Test Agent request also changes the test harness, use the Harness Workflow for that portion.
Harness Workflow
- Inspect before installing. Read repository instructions, package and lock files, test projects, existing Playwright artifacts, scripts, ignore rules, app startup commands, ports, and CI workflows. Check the installed version before relying on current flags or config fields.
- Define the harness contract. Name the owning package, runner, target URL, startup owner, browser scope, auth strategy, output paths, local command, and CI command. Distinguish a broken harness from an environment-only failure.
- Make the smallest coherent change. Use the repo's package manager and pinning policy. Install only required browsers. Preserve existing config and scripts; do not run a scaffold over a non-trivial harness blindly.
- Configure for local and CI use. Set base URL/startup, projects or runner
equivalents, timeouts, retries, workers, reporters, and artifacts only when
the repository needs them. Prefer project dependencies over Node
globalSetupwhen setup should be visible and traceable in the runner. - Wire auth deliberately. Use UI login, API login, or per-worker accounts according to the claim and mutation model. Verify authentication succeeded before saving state. Ignore saved state and treat it as a credential.
- Add one meaningful smoke check. Prove that startup, navigation, locator,
assertion, browser binary, and output path cooperate. Keep broader product
coverage for
playwright-testing. - Validate in layers. Verify config/listing first, run one smoke target, repeat if the repair involved state or startup, then run the smallest relevant CI-shaped command. Inspect generated output rather than assuming command success proves correct placement.
- Report exact evidence. State changed files, commands and results, browsers not installed or run, CI not executed, secrets required, and any remaining environment assumptions.
Setup Rules
- Preserve package-manager and lockfile ownership. Do not mix npm, pnpm, yarn, Python managers, NuGet conventions, Maven, or Gradle without repo evidence.
- Keep Playwright package and browser binaries aligned. Install the smallest browser set that proves the stated matrix; broader defaults must be an explicit choice.
- Prefer one clear config owner per package. Reuse existing test and artifact directories unless relocation is part of the request.
- Keep local server reuse local; CI should start from a controlled build and process. Use a readiness URL and a startup timeout that reflects app boot, not an inflated global test timeout.
- Default CI concurrency conservatively when shared state is not proven safe. Add parallelism or sharding only with an isolation model and report merging.
- Configure traces, screenshots, or video for actionable failure evidence, while controlling retention and excluding secrets.
- Use a Node setup project for reusable auth when applicable. In other
ecosystems, preserve native fixtures/helpers instead of inventing
auth.setup.ts, project dependencies, ortest.use(). - Saved browser state may contain cookies, tokens, IndexedDB data, and—in newer versions when requested—credential material. Keep it ignored and out of logs/artifacts unless explicitly sanitized.
storageStatedoes not persistsessionStorage; wire a deliberate restore only when the application requires it.- Test generated config against the installed version. Features such as isolated retry strategies, credential-state capture, component-test models, and bundled CLI commands are version-sensitive.
Tooling Boundaries
playwright-cliand Playwright's installable CLI skill are agent-side exploration aids, not automatically repo dependencies. Do not add a local third Playwright skill or a production dependency merely to run an agent investigation.- Component testing, browser extensions, WebView2, and raw Playwright library automation use different lifecycle/config models. Treat them as specialized setups rather than silently applying the default web E2E template.
Harness Validation Evidence
Choose commands from the active ecosystem and existing scripts. Typical Node layers are:
npx playwright --version
npx playwright test --list
npx playwright test <smoke-target> --project=<project>For Python, .NET, and Java, use the native runner and browser-install commands from references/ecosystem-patterns.md. Validate command availability against the installed version rather than copying a current-doc flag into an older harness.
Resource execution and test execution are separate evidence: a valid config does not prove browsers are installed, and a passing smoke does not prove every browser, shard, or CI environment. Repo-owned CLI and Test Agent validation are defined in their lanes above; do not substitute unrelated harness commands.
Reference Map
- references/ecosystem-patterns.md — package, runner, install, and auth boundaries across Node, Python, .NET, and Java.
- references/browser-and-config-patterns.md
— Node config scope, projects, browsers, reporters, timeouts,
webServer, and specialized modes. - references/auth-and-ci-patterns.md — Node setup-project auth, API login, worker accounts, CI, and sharded reports.
- references/pressure-tests.md — shortcut rationalizations and expected responses; load only when those pressures are present or when maintaining the skill.
For maintainer provenance and routing fixtures, use references/coverage-and-validation.md.
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.

