microsoft/playwright84 installs
playwright-api
Explains how to add playwright API methods.
How do I install this agent skill?
npx skills add https://github.com/microsoft/playwright --skill playwright-apiIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill consists of documentation and workflow instructions for developers to add or modify Playwright API methods. It contains no malicious code, data exfiltration patterns, or prompt injections.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
API
Adding and modifying APIs
- Before performing the implementation, go over the steps to understand and plan the work ahead. It is important to follow the steps in order, as some of them are prerequisites for others.
- Define (or update) API in
docs/api/class-xxx.md. For the new methods, params and options use the version from package.json (without -next). - Watch will kick in and re-generate types for the API
- Implement the new API in
packages/playwright/src/client/xxx.ts - Define (or update) channel for the API in
packages/protocol/src/protocol.ymlas needed - Watch will kick in and re-generate types for protocol channels
- Implement dispatcher handler in
packages/playwright/src/server/dispatchers/xxxDispatcher.tsas needed - Handler should just route the call into the corresponding method in
packages/playwright-core/src/server/xxx.ts - Place new tests in
tests/page/xxx.spec.tsor create new test file if needed
Build
- Assume watch is running and everything is up to date.
Test
- If your tests are only using page, prefer to place them in
tests/page/xxx.spec.tsand use page fixture. If you need to use browser context, place them intests/library/xxx.spec.ts. - Run npm test as
npm run ctest <file>
Lint
- In the end lint via
npm run flint.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/microsoft/playwright/playwright-api">View playwright-api on skillZs</a>