Back to Skills

playwright-flow-recorder

verified

Creates Playwright test scripts from natural language user flow descriptions. This skill should be used when generating E2E tests from scenarios, converting user stories to test code, recording user flows, creating test scripts from descriptions like "user signs up and creates project", or translating acceptance criteria into executable tests. Trigger terms include playwright test, e2e flow, user scenario, test from description, record flow, user journey, test script generation, acceptance test, behavior test, user story test.

View on GitHub

Marketplace

worldbuilding-app-skills

hopeoverture/worldbuilding-app-skills

Plugin

playwright-flow-recorder

testing

Repository

hopeoverture/worldbuilding-app-skills
1stars

plugins/playwright-flow-recorder/skills/playwright-flow-recorder/SKILL.md

Last Verified

January 21, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/hopeoverture/worldbuilding-app-skills/blob/main/plugins/playwright-flow-recorder/skills/playwright-flow-recorder/SKILL.md -a claude-code --skill playwright-flow-recorder

Installation paths:

Claude
.claude/skills/playwright-flow-recorder/
Powered by add-skill CLI

Instructions

# Playwright Flow Recorder

Generate Playwright test scripts from natural language scenario descriptions.

## Overview

To create E2E tests from user flow descriptions, this skill translates natural language scenarios into executable Playwright test code with proper assertions, error handling, and best practices.

## When to Use

Use this skill when:
- Converting user stories to E2E tests
- Generating tests from acceptance criteria
- Creating test scripts from flow descriptions
- Translating business requirements into tests
- Documenting user journeys as executable tests
- Building test coverage for critical user paths

## Flow Description Format

### Simple Flow

```
User signs up with email and password
```

### Detailed Flow

```
1. User navigates to signup page
2. User fills in email field
3. User fills in password field
4. User clicks signup button
5. User sees success message
6. User is redirected to dashboard
```

### Acceptance Criteria Format

```
Given: User is on the homepage
When: User clicks "Get Started"
And: User fills in registration form
And: User submits the form
Then: User sees "Welcome" message
And: User is on the dashboard page
```

## Generation Process

### 1. Parse Flow Description

To analyze the scenario, use `scripts/parse_flow.py`:

```bash
python scripts/parse_flow.py --input "user creates entity and adds relationships"
```

The script identifies:
- Actions (navigate, click, fill, select, etc.)
- Elements (buttons, inputs, links, etc.)
- Assertions (sees, redirected, displays, etc.)
- Data inputs (form values, selections, etc.)

### 2. Map to Playwright Actions

To convert parsed steps to Playwright code, use the action mapping:

**Navigation:**
- "navigates to X" → `await page.goto('/x')`
- "clicks X" → `await page.getByRole('button', { name: /x/i }).click()`
- "selects X from Y" → `await page.getByLabel(/y/i).selectOption('x')`

**Form Input:**
- "fills X with Y" → `await page.getByLabel(/x/i).fill('y')`
- "enters X" → `await page.getB

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
10523 chars