Playwright Automation logo

Playwright Automation

Visit

MIT Agent Skill that lets coding agents write and run custom Playwright scripts for page tests, form flows, screenshots, and scraping in a visible browser.

Share:
View alternatives

Overview

Playwright Automation is lackeyjb/playwright-skill, a general-purpose, MIT-licensed Agent Skill that lets a coding agent write and execute Playwright code on the fly, from a single page check to multi-step flows. It follows the open Agent Skills specification, so it works in Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI, OpenCode, and other clients, and it is also packaged as a Claude Code plugin.

The README positions it clearly: for simple interactive browsing, start with Microsoft's official @playwright/cli; for tool-based control with accessibility snapshots, use playwright-mcp. This skill is the code-first option, for when the automation script itself is the useful artifact: loops, assertions, multiple contexts, network interception, screenshots, video, or something you want to keep and rerun.

Key Features

  • Custom code per request instead of a fixed set of pre-built scripts.
  • Visible browser by default (headless: false), so you can watch the run; ask for headless when needed.
  • Portable executor (run.js) that runs file or inline scripts with stable module resolution.
  • Progressive disclosure: a short SKILL.md, with the full API_REFERENCE.md (selectors, auth, visual regression, mobile emulation, performance, debugging) loaded only when needed.
  • Dev-server detection and optional helpers in lib/helpers.js.
  • Config via SLOW_MO and PW_ARTIFACT_DIR (screenshots default to the OS temp directory).

Quick Start

npx skills add lackeyjb/playwright-skill --skill playwright-skill --global --yes
# then, from the installed skill directory
npm run setup   # installs Playwright and Chromium

In Claude Code you can instead run /plugin marketplace add lackeyjb/playwright-skill and /plugin install playwright-skill@playwright-skill. Then ask things like "Test the homepage", "Check if the contact form works", or "Take screenshots of the dashboard in mobile and desktop".

Use Cases

  • Quick end-to-end checks of a local app while developing.
  • Responsive screenshots across viewports.
  • Link, image, and form validation sweeps.

Limitations

  • Requires Node.js and a local browser install; npm run install-all-browsers adds Firefox and WebKit.
  • Generated scripts are throwaway unless you save them into your test suite.

FAQ

How is this different from Playwright MCP?

Playwright MCP exposes browser actions as tools. This skill has the agent write and run full Playwright programs.

Where do screenshots go?

To the OS temp directory by default, or to PW_ARTIFACT_DIR if set.

Alternatives

More in Skills and the browser automation tag.

Comments

No comments yet. Be the first to comment!