Playwright Skill

A skill that lets an agent write and run Playwright scripts: page tests, forms, screenshots and link checks

  • 3,250 ★ on the repository
  • Last commit
  • MIT
Skill

Broad access

Why this level

  • The agent generates and executes arbitrary Node.js code
  • Setup downloads Playwright and Chromium binaries
All reasons and checks

lackeyjb/playwright-skill

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/playwright-skill

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The agent generates and executes arbitrary Node.js code
  • Setup downloads Playwright and Chromium binaries

This is third-party code. Review the repository files before installing.

What it does

The agent writes custom Playwright code for the task and runs it through the run.js executor, which handles module resolution. The browser is visible by default, and results come back with console output and screenshots. The skill detects running dev servers and ships helper functions, while the full API reference loads only when needed.

Who it is for. Developers and QA engineers who need browser automation straight from the agent.

Good fit when

  • You need to test a signup form or checkout flow
  • You need page screenshots at mobile and desktop widths
  • You need a reusable script with loops, network interception or multiple contexts
  • You are checking broken links and image loading

Not a fit when

  • You just need interactive browsing: the author recommends @playwright/cli
  • You want tool-based control with accessibility snapshots: use playwright-mcp

Example request

Check that the contact form on localhost:3000 submits and take screenshots at mobile and desktop widths

Limitations

Requires Node.js 20+, npm and network access on first setup to download Playwright and Chromium. After installation you must run npm run setup in the skill directory.

How to disable. Remove the playwright-skill plugin in Claude Code or delete the playwright-skill folder from your skills directory.

FAQ

How do I run headless?

Headless is off by default. Explicitly ask the agent to run without a visible browser.

I get module not found errors, what now?

Run automation through run.js, which handles module resolution.

Which should I pick: Playwright MCP, CLI or this skill?

The skill fits one-off checks and tests: the agent writes Playwright code for the task and runs it. For standing browser work over the protocol take the official Playwright MCP, and if saving context matters, look at Microsoft's Playwright CLI.

Discussion

No questions or reviews yet.

Skills

Playwright CLI

playwright-cli

Official

Microsoft's official Playwright CLI with an agent skill: drive a browser through short commands without heavy MCP schemas

CLIExtended access14.7KRepository stars

A skill that tests your agent's code in a real browser: reads your changes, builds a test plan and runs it through Playwright with your own cookies

SkillBroad access3.6KRepository stars

A community Playwright MCP server: browser automation, screenshots, device emulation and test code generation

MCP serverExtended access5.7KRepository stars
Russian stack

A Claude Code skill for driving the 1C web client through Playwright MCP: sessions, navigation, catalogs, documents and test data

SkillBroad access33Repository stars

An adversarial code-audit skill: Hunter finds bugs, Skeptic challenges them, Referee rules, and no source edit happens without your permission

SkillExtended access540Repository stars

A CLI to evaluate and evolve agent skills: declarative YAML cases, runs across engines and structured reports

CLIExtended access1.4KRepository stars

README in short

Playwright Skill is an Agent Skill with a Claude Code plugin wrapper, MIT licensed. The README explains when to choose it over the official @playwright/cli or playwright-mcp. It covers four install methods, setup via npm run setup, example prompts and defaults including SLOW_MO and PW_ARTIFACT_DIR.

README badge

Original SKILL.md

---
name: playwright-skill
description: Complete browser automation with Playwright. Auto-detects dev servers, writes reusable test scripts, and supports screenshots, responsive checks, UX validation, login flows, link checks, and arbitrary browser automation. Use when the user wants to test a website, automate browser interactions, validate web functionality, or perform browser-based testing.
license: MIT
compatibility: Requires Node.js 20+, npm, and network access on first setup to install Playwright and Chromium.
metadata:
  author: lackeyjb
  version: "5.0.0"
allowed-tools: Bash(node:*) Bash(npm:*) Read Write
---

# Playwright Browser Automation

Write and execute focused Playwright scripts for the user's request. Prefer the
skill's executor and helpers, but use the full Playwright API when needed.

## Path resolution

This skill can be installed in several locations, so resolve its directory
first. Set `SKILL_DIR` to the directory containing this SKILL.md file, then run
the commands below as written:

```bash
export SKILL_DIR=<absolute path of the directory containing this SKILL.md>
export TMP_DIR="$(node -p 'require("node:os").tmpdir()')"
```

If shell state does not persist between commands, substitute the literal paths
for `$SKILL_DIR` and `$TMP_DIR` in each command instead.

Common installation paths:

- Plugin system: `~/.claude/plugins/marketplaces/playwright-skill/skills/playwright-skill`
- Manual global: `~/.claude/skills/playwright-skill`
- Project-specific: `<project>/.claude/skills/playwright-skill`

## Workflow

1. For localhost work, detect running servers before writing a URL:

   ```bash
   node -e "require('$SKILL_DIR/lib/helpers').detectDevServers().then(s => console.log(JSON.stringify(s)))"
   ```

   Use the only result automatically. Ask which URL to use when there are
   multiple results. Ask for a URL or offer to start a server when none exist.
2. Write reusable scripts to `$TMP_DIR/playwright-test-*.js` unless the user
   asks to save them in the project. Use `PW_SCRIPT_DIR` to preserve scripts.
3. Use a visible browser by default. Use `headless: true` only when requested
   or when the environment has no display.
4. Put the target URL in a constant or environment variable.
5. Run scripts with `node "$SKILL_DIR/run.js" <script.js>`.
6. Report actions, failures, and artifact paths. Do not claim success without
   checking the resulting page.

## Setup

Run once:

```bash

Report a problem

Foxx AIPlaywright Skill
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.