Back to Skills

playwright-skill

IMPORTANT - Path Resolution: This skill can be installed in different locations (plugin system, manual installation, global, or project-specific). Before executing any commands, determine the skill directory based on where you loaded this SKILL.md file, and use that path in all commands below.

37,204stars6,086forksUpdated 5/12/2026

Security Assessment

Low Risk(80/100)

Detected risks:

Sensitive File Access([API_REFERENCE.md] .env)
Security Score80/100

About playwright-skill

The playwright-skill is a general-purpose browser automation skill designed to execute custom Playwright scripts for testing and automation workflows. It provides a structured process for running browser-based automation tasks while supporting flexible installation paths such as plugin-based, global, manual, or project-specific setups. A key focus of the skill is reliable path resolution, ensuring that all commands are executed relative to the discovered skill directory. The skill also emphasizes safe temporary script handling by requiring automation scripts to be written to the /tmp directory instead of modifying the project or skill source tree.

The skill includes several workflow-oriented capabilities for browser automation. It can automatically detect active localhost development servers before execution, reducing manual configuration when testing local applications. The execution model supports writing parameterized Playwright scripts with configurable target URLs and launching Chromium browsers in visible mode by default for debugging and observation. The workflow guides users through detecting servers, generating temporary automation scripts, and executing them through a centralized runner. Setup instructions are also included for installing Playwright and Chromium using a one-time npm setup command.

This skill is intended for developers, QA engineers, testers, and automation users who need quick browser automation without manually configuring Playwright projects for every task. Typical use cases include testing local web applications, taking screenshots, validating page rendering, responsive testing across viewports, and creating temporary automation workflows that do not clutter existing repositories. It is particularly useful in environments where rapid experimentation and reusable execution patterns are important.

FAQ

How do I install the dependencies required for this skill?

Run `npm run setup` from the resolved skill directory before first use. This installs Playwright and the Chromium browser required for execution.

Does the skill support testing localhost development servers?

Yes. The workflow includes an automatic development server detection step that checks for running localhost servers before executing automation scripts.

Where are Playwright test scripts stored during execution?

The skill requires all generated automation scripts to be written to the `/tmp` directory instead of the skill directory or project source tree.

Does the browser run in headless mode by default?

No. The workflow specifies that Chromium should run with `headless: false` unless the user explicitly requests headless mode.

Can this skill be installed in different environments?

Yes. The documentation describes support for plugin-system installations, manual global installations, and project-specific installations, with path resolution handled dynamically.

All Files

5 files
API_REFERENCE.md16.0 KB
View
lib/helpers.js12.3 KB
View
package.json0.6 KB
View
run.js5.6 KB
View
SKILL.md14.1 KB
View

Install playwright-skill

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill