Skip to content
Back to search

playwright-skill

MarketplaceWorks with Claude CodeGitHub

General-purpose Playwright automation for coding agents

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/lackeyjb-playwright-skill/badge.svg)](/listings/lackeyjb-playwright-skill)

HTML

<a href="/listings/lackeyjb-playwright-skill"><img src="/api/listings/lackeyjb-playwright-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

This repository contains a standard Agent Skill and a Claude Code plugin wrapper. The recommended installation method is Vercel's [`skills`](https://github.com/vercel-labs/skills) CLI, which installs skills into the native locations for supported agents.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 38 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "name": "playwright-skill",
  3. "owner": {
  4. "name": "lackeyjb",
  5. "email": "github@lackeyjb"
  6. },
  7. "metadata": {
  8. "description": "Playwright browser automation skill for coding agents",
  9. "version": "5.0.0"
  10. },
  11. "plugins": [
  12. {
  13. "name": "playwright-skill",
  14. "source": "./",
  15. "description": "Agent Skill for general-purpose browser automation with Playwright. The agent writes and executes custom scripts for testing pages, validating UX, and automating browser tasks.",
  16. "version": "5.0.0",
  17. "author": {
  18. "name": "lackeyjb"
  19. },
  20. "homepage": "https://github.com/lackeyjb/playwright-skill",
  21. "repository": "https://github.com/lackeyjb/playwright-skill",
  22. "license": "MIT",
  23. "keywords": [
  24. "claude-skill",
  25. "claude-code",
  26. "playwright",
  27. "browser-automation",
  28. "testing",
  29. "e2e",
  30. "web-testing",
  31. "automation",
  32. "model-invoked"
  33. ],
  34. "category": "testing",
  35. "tags": ["browser", "automation", "playwright", "testing", "e2e"]
  36. }
  37. ]
  38. }
README.md · README · 246 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Playwright Skill
  2. **General-purpose Playwright automation for coding agents**
  3. An [Agent Skill](https://agentskills.io) 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](https://code.claude.com/docs/en/plugins) for convenient installation.
  4. Claude autonomously decides when to use this skill based on your browser automation needs, loading only the minimal information required for your specific task.
  5. Made using Claude Code.
  6. ## Features
  7. - **Any Automation Task** - Claude writes custom code for your specific request, not limited to pre-built scripts
  8. - **Visible Browser by Default** - See automation in real-time with `headless: false`
  9. - **Portable executor** - Runs file and inline scripts with stable module resolution
  10. - **Progressive Disclosure** - Concise SKILL.md with full API reference loaded only when needed
  11. - **Safe Cleanup** - Smart temp file management without race conditions
  12. - **Comprehensive Helpers** - Optional utility functions for common tasks
  13. ## Installation
  14. This repository contains a standard Agent Skill and a Claude Code plugin wrapper. The recommended installation method is Vercel's [`skills`](https://github.com/vercel-labs/skills) CLI, which installs skills into the native locations for supported agents.
  15. ## Why this skill?
  16. Use this skill when the agent needs to write a real Playwright program: loops,
  17. assertions, multiple contexts, network interception, screenshots, video, or a
  18. script you want to keep and rerun. It also provides dev-server detection and a
  19. small set of focused helpers.
  20. For straightforward interactive browsing, start with Microsoft's official
  21. [`@playwright/cli`](https://github.com/microsoft/playwright-cli) and install its
  22. agent skills with `playwright-cli install --skills`. For tool-based browser
  23. control with accessibility snapshots, use
  24. [`playwright-mcp`](https://github.com/microsoft/playwright-mcp). This project is
  25. the code-first option when the automation itself is the useful artifact.
  26. ### Understanding the Structure
  27. This repository uses the plugin format with a nested structure:
  28. ```
  29. playwright-skill/ # Plugin root
  30. ├── .claude-plugin/ # Plugin metadata
  31. └── skills/
  32. └── playwright-skill/ # The actual skill
  33. └── SKILL.md
  34. ```
  35. 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.
  36. ---
  37. ### Option 1: Install with `skills` (Recommended)
  38. Install globally for your user:
  39. ```bash
  40. npx skills add lackeyjb/playwright-skill --skill playwright-skill --global --yes
  41. ```
  42. Install only for the current project by omitting `--global`:
  43. ```bash
  44. npx skills add lackeyjb/playwright-skill --skill playwright-skill --yes
  45. ```
  46. To target specific agents, add `--agent` followed by one or more agent IDs:
  47. ```bash
  48. npx skills add lackeyjb/playwright-skill --skill playwright-skill --agent claude-code cursor --global --yes
  49. ```
  50. After installation, run setup from the installed skill directory:
  51. ```bash
  52. npm run setup
  53. ```
  54. See the [`skills` CLI documentation](https://github.com/vercel-labs/skills) for supported agents and options.
  55. ### Option 2: Claude Code Plugin
  56. Install via Claude Code's plugin system for automatic updates and team distribution:
  57. ```bash
  58. # Add this repository as a marketplace
  59. /plugin marketplace add lackeyjb/playwright-skill
  60. # Install the plugin
  61. /plugin install playwright-skill@playwright-skill
  62. # Navigate to the skill directory and run setup
  63. cd ~/.claude/plugins/marketplaces/playwright-skill/skills/playwright-skill
  64. npm run setup
  65. ```
  66. Verify installation by running `/help` to confirm the skill is available.
  67. ---
  68. ### Option 3: Other Agent Installations
  69. Agent Skills are supported by Claude Code, Cursor, GitHub Copilot, Codex,
  70. Gemini CLI, OpenCode, and other clients. Install the directory containing
  71. `SKILL.md` using the client’s documented skill path. If a client has no
  72. installer, copy `skills/playwright-skill/` into its documented skill directory
  73. and run `npm run setup` there.
  74. ### Option 4: Download Release
  75. 1. Download and extract the latest release from [GitHub Releases](https://github.com/lackeyjb/playwright-skill/releases)
  76. 2. Copy only the `skills/playwright-skill/` folder to:
  77. - Global: `~/.claude/skills/playwright-skill`
  78. - Project: `/path/to/your/project/.claude/skills/playwright-skill`
  79. 3. Navigate to the skill directory and run setup:
  80. ```bash
  81. cd ~/.claude/skills/playwright-skill # or your project path
  82. npm run setup
  83. ```
  84. ---
  85. ### Verify Installation
  86. Run `/help` to confirm the skill is loaded, then ask Claude to perform a simple browser task like "Test if google.com loads".
  87. ## Quick Start
  88. 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.
  89. ## Usage Examples
  90. ### Test Any Page
  91. ```
  92. "Test the homepage"
  93. "Check if the contact form works"
  94. "Verify the signup flow"
  95. ```
  96. ### Visual Testing
  97. ```
  98. "Take screenshots of the dashboard in mobile and desktop"
  99. "Test responsive design across different viewports"
  100. ```
  101. ### Interaction Testing
  102. ```
  103. "Fill out the registration form and submit it"
  104. "Click through the main navigation"
  105. "Test the search functionality"
  106. ```
  107. ### Validation
  108. ```
  109. "Check for broken links"
  110. "Verify all images load"
  111. "Test form validation"
  112. ```
  113. ## How It Works
  114. 1. Describe what you want to test or automate
  115. 2. Your agent writes custom Playwright code for the task
  116. 3. The universal executor (run.js) runs it with proper module resolution
  117. 4. Browser opens (visible by default) and automation executes
  118. 5. Results are displayed with console output and screenshots
  119. ## Configuration
  120. Default settings:
  121. - **Headless:** `false` (browser visible unless explicitly requested otherwise)
  122. - **Slow Motion:** `0ms` by default; set `SLOW_MO` when useful
  123. - **Screenshots:** Helper screenshots use the OS temp directory; set `PW_ARTIFACT_DIR` to choose another location
  124. ## Project Structure
  125. ```
  126. playwright-skill/
  127. ├── .claude-plugin/
  128. │ ├── plugin.json # Plugin metadata for distribution
  129. │ └── marketplace.json # Marketplace configuration
  130. ├── skills/
  131. │ └── playwright-skill/ # The actual skill (Claude discovers this)
  132. │ ├── SKILL.md # What Claude reads
  133. │ ├── run.js # Universal executor (proper module resolution)
  134. │ ├── package.json # Dependencies & setup scripts
  135. │ └── lib/
  136. │ └── helpers.js # Optional utility functions
  137. │ └── API_REFERENCE.md # Full Playwright API reference
  138. ├── README.md # This file - user documentation
  139. ├── CONTRIBUTING.md # Contribution guidelines
  140. └── LICENSE # MIT License
  141. ```
  142. ## Advanced Usage
  143. 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.
  144. ## Dependencies
  145. - Node.js
  146. - Playwright (installed via `npm run setup`)
  147. - Chromium (installed via `npm run setup`)
  148. ## Troubleshooting
  149. **Playwright not installed?**
  150. Navigate to the skill directory and run `npm run setup`.
  151. **Module not found errors?**
  152. Ensure automation runs via `run.js`, which handles module resolution.
  153. **Browser doesn't open?**
  154. Verify `headless: false` is set. The skill defaults to visible browser unless headless mode is requested.
  155. **Install all browsers?**
  156. Run `npm run install-all-browsers` from the skill directory.
  157. ## What is a Skill?
  158. [Agent Skills](https://agentskills.io) 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.
  159. This Playwright skill implements the [open Agent Skills specification](https://agentskills.io), making it compatible across agent platforms.
  160. ## Contributing
  161. Contributions are welcome. Fork the repository, create a feature branch, make your changes, and submit a pull request. See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
  162. ## Learn More
  163. - [Agent Skills Specification](https://agentskills.io) - Open specification for agent skills
  164. - [Claude Code Skills Documentation](https://docs.claude.com/en/docs/claude-code/skills)
  165. - [Claude Code Plugins Documentation](https://docs.claude.com/en/docs/claude-code/plugins)
  166. - [Plugin Marketplaces](https://docs.claude.com/en/docs/claude-code/plugin-marketplaces)
  167. - [API_REFERENCE.md](skills/playwright-skill/API_REFERENCE.md) - Full Playwright documentation
  168. - [GitHub Issues](https://github.com/lackeyjb/playwright-skill/issues)
  169. ## License
  170. MIT License - see [LICENSE](LICENSE) file for details.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.