playwright-generate-test

Generate Playwright TypeScript tests from scenarios using Playwright MCP browser steps.

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/miyake-san/sogo-agent-platform --skill playwright-generate-test-miyake-san
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-generate-test
Source: https://github.com/miyake-san/sogo-agent-platform/tree/main/skills/core/playwright-generate-test
Command: npx skills add https://github.com/miyake-san/sogo-agent-platform --skill playwright-generate-test-miyake-san

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @playwright/test, @playwright/mcp.

What problem does it solve? Writing end-to-end browser tests by hand requires manually discovering selectors and page flows. This Skill drives a real browser through the Playwright MCP server to execute each scenario step first, then emits a working @playwright/test TypeScript file based on the verified interaction history. ## Core Features & Use Cases - Scenario-driven test generation: Provide a user scenario and the Skill walks through it step by step in a live browser via Playwright MCP before writing any code. - Verified test output: Emits a Playwright TypeScript test using @playwright/test, saves it to the tests directory, executes it, and iterates until the test passes. - Use Case: A QA engineer describes a checkout flow scenario; the Skill navigates the site, records the working selectors and actions, and produces a passing regression test file. ## Quick Start Generate a Playwright test for the scenario where a user logs in and adds an item to the cart.

Frequently Asked Questions about playwright-generate-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a Playwright test from a user scenario?

Provide a scenario describing the user flow, and the Skill runs each step in a real browser via the Playwright MCP server. After all steps complete, it emits a TypeScript test using @playwright/test based on the recorded interaction history.

What do I need to install to use Playwright MCP test generation?

You need the Playwright MCP server (npx @playwright/mcp@latest) to run interactive browser steps, plus @playwright/test installed via npm with npx playwright install to execute the generated TypeScript test. Node.js is required.

Does the generated Playwright test get executed automatically?

Yes. The generated test file is saved into the tests directory and executed with @playwright/test. If it fails, the Skill iterates on the test until it passes.

Why does the Skill refuse to write test code immediately?

It is instructed not to generate code prematurely. It must first complete every scenario step through the Playwright MCP tools so the emitted test reflects verified selectors and actions rather than guesses.

What happens if I don't provide a scenario?

The Skill will ask you to provide one. A scenario is required input because the browser steps and final test are both derived from it.