playwright-skill

Automate browser testing by generating and executing Playwright scripts.

3.0k|227|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/lackeyjb/playwright-skill --skill playwright-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-skill
Source: https://github.com/lackeyjb/playwright-skill/tree/main/skills/playwright-skill
Command: npx skills add https://github.com/lackeyjb/playwright-skill --skill playwright-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates browser tasks and web UI testing with Playwright. It auto-detects dev servers, writes deterministic scripts to /tmp, and executes them via a universal executor, saving you time and reducing setup friction.

Core Features & Use Cases

  • Auto-detect dev servers: For localhost testing, automatically detects available servers and tests against them.
  • Deterministic script output: Writes test scripts to /tmp/playwright-test-*.js to avoid cluttering your project.
  • Live, visible browser: Runs with a visible browser by default for debugging and faster iteration.
  • Parameterizable URLs: URLs configurable via environment variables for reuse across environments.
  • Universal executor: Accepts file paths, inline code, or stdin to run Playwright commands quickly.

Quick Start

  1. Install the skill: cd skills/playwright-skill && npm install && npm run setup
  2. Create or supply a test script. Then run: node run.js /tmp/playwright-test-page.js
  3. Or run inline: node run.js "await page.goto('https://example.com')"

Frequently Asked Questions about playwright-skill

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

FAQPage Schema
How do I automate browser testing with Playwright?

Playwright automates browser testing by writing deterministic scripts that execute UI interactions like form submission, navigation, and login flows. This Skill auto-detects local dev servers, generates test scripts to /tmp, and runs them with a visible browser for immediate feedback and debugging.

Can I run Playwright tests against localhost without manual server setup?

Yes. This Skill auto-detects available dev servers on localhost, eliminating manual URL configuration. You supply a test script or inline code, and it executes against the detected server with environment-driven parameters for headers and timeouts.

What's the fastest way to test form validation and login flows in my web app?

Write a Playwright script targeting your specific forms and authentication flows, then run it through this Skill's universal executor. It handles server detection, script generation, and visible browser execution, reducing setup friction for responsiveness and UX validation.

Do I need to install Playwright separately to use this Skill?

Playwright must be installed as a Node.js dependency. This Skill includes a setup command (npm run setup) that installs dependencies and configures the universal runner, so you only need Node.js available in your environment.

Can I parameterize URLs for testing across different environments?

Yes. URLs are configurable via environment variables, allowing you to reuse the same test scripts across local development, staging, and production environments without modifying the test code.

What happens if my test script fails or times out?

The Skill executes Playwright commands with configurable timeouts driven by environment settings. Failed assertions or timeouts surface browser output and error details, visible in the running browser for immediate debugging and iteration.