playwright-skill

by lackeyjbVerified

Claude Code Skill for browser automation with Playwright. Model-invoked - Claude autonomously writes and executes custom automation for testing and validation.

3,014
Stars
229
Forks
JavaScript
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/lackeyjb/playwright-skill

Getting Started

Guides for using skills like playwright-skill.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

Playwright Skill

General-purpose Playwright automation for coding agents

An Agent Skill that enables coding agents to write and execute Playwright automation on the fly, from simple page tests to complex multi-step flows. It is also packaged as a Claude Code Plugin for convenient installation.

Claude autonomously decides when to use this skill based on your browser automation needs, loading only the minimal information required for your specific task.

Made using Claude Code.

Features

  • Any Automation Task - Claude writes custom code for your specific request, not limited to pre-built scripts
  • Visible Browser by Default - See automation in real-time with headless: false
  • Portable executor - Runs file and inline scripts with stable module resolution
  • Progressive Disclosure - Concise SKILL.md with full API reference loaded only when needed
  • Safe Cleanup - Smart temp file management without race conditions
  • Comprehensive Helpers - Optional utility functions for common tasks

Installation

This repository contains a standard Agent Skill and a Claude Code plugin wrapper. The recommended installation method is Vercel's skills CLI, which installs skills into the native locations for supported agents.

Why this skill?

Use this skill when the agent needs to write a real Playwright program: loops, assertions, multiple contexts, network interception, screenshots, video, or a script you want to keep and rerun. It also provides dev-server detection and a small set of focused helpers.

For straightforward interactive browsing, start with Microsoft's official @playwright/cli and install its agent skills with playwright-cli install --skills. For tool-based browser control with accessibility snapshots, use playwright-mcp. This project is the code-first option when the automation itself is the useful artifact.

Understanding the Structure

This repository uses the plugin format with a nested structure:

playwright-skill/              # Plugin root
├── .claude-plugin/           # Plugin metadata
└── skills/
    └── playwright-skill/     # The actual skill
        └── SKILL.md

The repository keeps the skill inside the plugin's skills/ directory. Installers handle that layout automatically; manual copying is only a fallback for clients without an installer.


Option 1: Install with skills (Recommended)

Install globally for your user:

npx skills add lackeyjb/playwright-skill --skill playwright-skill --global --yes

Install only for the current project by omitting --global:

npx skills add lackeyjb/playwright-skill --skill playwright-skill --yes

To target specific agents, add --agent followed by one or more agent IDs:

npx skills add lackeyjb/playwright-skill --skill playwright-skill --agent claude-code cursor --global --yes

After installation, run setup from the installed skill directory:

npm run setup

See the skills CLI documentation for supported agents and options.

Option 2: Claude Code Plugin

Install via Claude Code's plugin system for automatic updates and team distribution:

# Add this repository as a marketplace
/plugin marketplace add lackeyjb/playwright-skill

# Install the plugin
/plugin install playwright-skill@playwright-skill

# Navigate to the skill directory and run setup
cd ~/.claude/plugins/marketplaces/playwright-skill/skills/playwright-skill
npm run setup

Verify installation by running /help to confirm the skill is available.


Option 3: Other Agent Installations

Agent Skills are supported by Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI, OpenCode, and other clients. Install the directory containing SKILL.md using the client’s documented skill path. If a client has no installer, copy skills/playwright-skill/ into its documented skill directory and run npm run setup there.

Option 4: Download Release

  1. Download and extract the latest release from GitHub Releases
  2. Copy only the skills/playwright-skill/ folder to:
    • Global: ~/.claude/skills/playwright-skill
    • Project: /path/to/your/project/.claude/skills/playwright-skill
  3. Navigate to the skill directory and run setup:
    cd ~/.claude/skills/playwright-skill  # or your project path
    npm run setup
    

Verify Installation

Run /help to confirm the skill is loaded, then ask Claude to perform a simple browser task like "Test if google.com loads".

Quick Start

After installation, ask your agent to test or automate a browser task. It will write custom Playwright code, execute it, and return results with screenshots and console output.

Usage Examples

Test Any Page

"Test the homepage"
"Check if the contact form works"
"Verify the signup flow"

Visual Testing

"Take screenshots of the dashboard in mobile and desktop"
"Test responsive design across different viewports"

Interaction Testing

"Fill out the registration form and submit it"
"Click through the main navigation"
"Test the search functionality"

Validation

"Check for broken links"
"Verify all images load"
"Test form validation"

How It Works

  1. Describe what you want to test or automate
  2. Your agent writes custom Playwright code for the task
  3. The universal executor (run.js) runs it with proper module resolution
  4. Browser opens (visible by default) and automation executes
  5. Results are displayed with console output and screenshots

Configuration

Default settings:

  • Headless: false (browser visible unless explicitly requested otherwise)
  • Slow Motion: 0ms by default; set SLOW_MO when useful
  • Screenshots: Helper screenshots use the OS temp directory; set PW_ARTIFACT_DIR to choose another location

Project Structure

playwright-skill/
├── .claude-plugin/
│   ├── plugin.json          # Plugin metadata for distribution
│   └── marketplace.json     # Marketplace configuration
├── skills/
│   └── playwright-skill/    # The actual skill (Claude discovers this)
│       ├── SKILL.md         # What Claude reads
│       ├── run.js           # Universal executor (proper module resolution)
│       ├── package.json     # Dependencies & setup scripts
│       └── lib/
│           └── helpers.js   # Optional utility functions
│       └── API_REFERENCE.md # Full Playwright API reference
├── README.md                # This file - user documentation
├── CONTRIBUTING.md          # Contribution guidelines
└── LICENSE                  # MIT License

Advanced Usage

Claude will automatically load API_REFERENCE.md when needed for comprehensive documentation on selectors, network interception, authentication, visual regression testing, mobile emulation, performance testing, and debugging.

Dependencies

  • Node.js
  • Playwright (installed via npm run setup)
  • Chromium (installed via npm run setup)

Troubleshooting

Playwright not installed? Navigate to the skill directory and run npm run setup.

Module not found errors? Ensure automation runs via run.js, which handles module resolution.

Browser doesn't open? Verify headless: false is set. The skill defaults to visible browser unless headless mode is requested.

Install all browsers? Run npm run install-all-browsers from the skill directory.

What is a Skill?

Agent Skills are folders of instructions, scripts, and resources that agents can discover and use to do things more accurately and efficiently. When you ask Claude to test a webpage or automate browser interactions, Claude discovers this skill, loads the necessary instructions, executes custom Playwright code, and returns results with screenshots and console output.

This Playwright skill implements the open Agent Skills specification, making it compatible across agent platforms.

Contributing

Contributions are welcome. Fork the repository, create a feature branch, make your changes, and submit a pull request. See CONTRIBUTING.md for details.

Learn More

License

MIT License - see LICENSE file for details.

Frequently Asked Questions

What is playwright-skill?

playwright-skill is an open-source testing skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by lackeyjb. Claude Code Skill for browser automation with Playwright. Model-invoked - Claude autonomously writes and executes custom automation for testing and validation. It has 3,014 GitHub stars.

Is playwright-skill safe to use?

Yes. playwright-skill passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install playwright-skill?

Clone the repository with "git clone https://github.com/lackeyjb/playwright-skill" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is playwright-skill written in?

playwright-skill is primarily written in JavaScript. It is open-source under lackeyjb on GitHub, so you can review or fork the full source.

Are there alternatives to playwright-skill?

Yes. SkillsLLM lists many other Testing skills you can browse and compare side by side. Open the Testing category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh playwright-skill against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

Claude-BugHunter

by elementalsouls

A Claude Code skill bundle for bug hunting and external red-team work - 82 skills, 15 slash commands, 681 disclosed-report patterns curated across 24 core vulnerability classes, plus enterprise identity + infrastructure attack matrices.

3,740578Python
Testing
View details

Rapid-MLX

by raullenchai

The fastest local AI engine for Apple Silicon. 4.2x faster than Ollama, 0.08s cached TTFT, 100% tool calling. 17 tool parsers, prompt cache, reasoning separation, cloud routing. Drop-in OpenAI replacement. Works with Claude Code, Cursor, Aider.

3,530401Python
Testing
View details

src-hunter-skill

by MyuriKanao

实战 SRC / 众测 / Bug bounty 漏洞挖掘 Claude Code skill — 19 个攻击类 playbook、305 个结构化 payload、263 个 WAF/EDR 绕过、2887 份 HackerOne 真实案例、88,636 WooYun 案例统计

60187
Testing
View details

100 field-tested Claude Code recipes for knowledge workers — prompts, steps, and 6 installable graded skills.

38048
Testing
View details

Claude Code Skill that turns any idea into a cinematic, model-ready video prompt — Sora · Kling · Veo · Seedance. 21 genre templates, 5-stage structure, eval-tested. Distilled from the AI short Hollywood director PJ Ace called "one of the best short films I've seen in years."

36869Python
Testing
View details

offensive-claude

by hypnguyen1209

Offensive security toolkit for Claude Code covering red team, exploit dev, AD attacks, EDR bypass, mobile pentest

34359Python
Testing
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details