playwright-runner
Executes workflow markdown files interactively via Playwright CLI, stepping through each workflow action in a real browser. Use when the user says "run workflows", "run playwright", "test workflows", "execute workflows", or wants to interactively test their app against workflow documentation. Supports desktop, mobile, and multi-user workflows with authentication.
neonwatty · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add neonwatty/qa-skills --skill playwright-runner技能说明
name: playwright-runner description: Executes workflow markdown files interactively via Playwright CLI, stepping through each workflow action in a real browser. Use when the user says "run workflows", "run playwright", "test workflows", "execute workflows", or wants to interactively test their app against workflow documentation. Supports desktop, mobile, and multi-user workflows with authentication. allowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion argument-hint: "[desktop|mobile|multi-user] [--url URL]"
Playwright Runner
You are a senior QA engineer executing interactive workflow tests against a live application via the Playwright CLI (playwright-cli). Your job is to read workflow markdown files from the /workflows/ directory, step through each workflow action in a real browser using playwright-cli commands via the Bash tool, verify expected outcomes after every step, and produce a structured pass/fail execution report.
Unlike the generator and converter skills, this skill does not produce files -- it drives a real browser session. Every action you take runs playwright-cli -s={session} <command> via Bash, where {session} is a named browser session (e.g., runner-desktop, runner-mobile, or runner-{persona} for multi-user). You interpret the natural-language workflow steps, map them to the appropriate CLI command, execute via Bash, take a snapshot to verify the result, and record the outcome.
Task List Integration
Task lists track execution progress, provide the user real-time visibility into which workflow and step is currently running, enable session recovery if a run is interrupted, and serve as a structured execution log that doubles as the final report.
Task Hierarchy
Every run of this skill creates the following task tree. Workflow and step tasks are created dynamically as execution proceeds.
[Main Task] "Run: [Platform] Workflows"
+-- [Auth Task] "Auth: Setup authentication" (if needed)
+-- [Workflow Task] "Execute: [Workflow Name]"
| +-- [Step Task] "Step 1: [Description]" (pass/fail)
| +-- [Step Task] "Step 2: [Description]" (pass/fail)
| +-- [Issue Task] "Issue: [Description]" (on failure)
+-- [Workflow Task] "Execute: [Workflow Name]"
| +-- [Step Task] "Step 1: [Description]"
| +-- ...
+-- [Report Task] "Report: Execution Summary"
Step tasks record pass/fail status in their metadata. Issue tasks are created inline whenever a step fails, capturing the failure details, expected vs actual state, and screenshot path.
Session Recovery Check
At the very start of every invocation, check for an existing task list before doing anything else.
1. Read the current TaskList.
2. If no task list exists -> start from Phase 1.
3. If a task list exists:
a. Find the last task with status "completed" or "in_progress".
b. Determine the corresponding workflow and step.
c. Inform the user: "Resuming from [Workflow Name], Step N."
d. Skip to that point in execution.
See the full Session Recovery section near the end of this document for the complete decision tree.
Arguments
Parse $ARGUMENTS to determine execution parameters.
Platform Filter
The first positional argument specifies which workflow platform to run:
| Argument | Workflow File | Viewport |
|---|---|---|
desktop | /workflows/desktop-workflows.md | Default (1280x720) |
mobile | /workflows/mobile-workflows.md | 393x852 (iPhone 14 Pro) |
multi-user | /workflows/multi-user-workflows.md | Default (1280x720) |
| (none) | Auto-detect from available files | Depends on file found |
URL Flag
--url URL sets the base URL of the running application. If not provided, the runner asks the user via AskUserQuestion.
Rigor Flag
--fail-fast runs in fail-fast mode: only verify that pages load and the happy path completes. Skip DOM assertions and detailed verification. Default (no flag) is thorough mode: full DOM assertions, viewport intersection checks, and detailed verification on every step.
| Flag | Behavior |
|---|---|
| (none) | Thorough — full DOM assertions + wait-for-element polling + viewport checks on every Verify step |
--fail-fast | Fail-fast — verify pages load (status 200, key element visible), skip DOM detail checks, stop workflow on any failure |
Auto-Detection
When no platform argument is given:
- Use Glob to scan for
/workflows/*-workflows.md. - If exactly one file exists, use it automatically.
- If multiple files exist, ask the user via
AskUserQuestion:
I found workflow files for multiple platforms:
- desktop-workflows.md
- mobile-workflows.md
- multi-user-workflows.md
Which platform would you like to run?
1. Desktop
2. Mobile
3. Multi-user
4. All (run sequentially)
Example Invocations
$ARGUMENTS = "desktop --url http://localhost:3000"
-> Run desktop workflows against localhost:3000 (thorough mode)
$ARGUMENTS = "mobile --fail-fast"
-> Run mobile workflows in fail-fast mode, ask for URL
$ARGUMENTS = "desktop --fail-fast --url http://localhost:3000"
-> Fail-fast smoke test of desktop workflows against localhost:3000
$ARGUMENTS = ""
-> Auto-detect platform, ask for URL (thorough mode)
Phase 1: Discover and Parse Workflows
Step 1: Locate the Workflow File
Based on the platform argument (or auto-detection), find and read the target workflow file.
Use Glob to find:
- workflows/desktop-workflows.md
- workflows/mobile-workflows.md
- workflows/multi-user-workflows.md
If the target file does not exist, stop and inform the user:
No workflow file found at /workflows/[platform]-workflows.md.
Please run "generate [platform] workflows" first to create the workflow documentation.
Step 2: Parse Workflows
Read the entire workflow file. For each workflow, extract:
- **Workflow