{
  "markdown": "# Playwright Skill\n\n**General-purpose Playwright automation for coding agents**\n\nAn [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.\n\nClaude autonomously decides when to use this skill based on your browser automation needs, loading only the minimal information required for your specific task.\n\nMade using Claude Code.\n\n## Features\n\n- **Any Automation Task** - Claude writes custom code for your specific request, not limited to pre-built scripts\n- **Visible Browser by Default** - See automation in real-time with `headless: false`\n- **Portable executor** - Runs file and inline scripts with stable module resolution\n- **Progressive Disclosure** - Concise SKILL.md with full API reference loaded only when needed\n- **Safe Cleanup** - Smart temp file management without race conditions\n- **Comprehensive Helpers** - Optional utility functions for common tasks\n\n## Installation\n\nThis 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.\n\n## Why this skill?\n\nUse this skill when the agent needs to write a real Playwright program: loops,\nassertions, multiple contexts, network interception, screenshots, video, or a\nscript you want to keep and rerun. It also provides dev-server detection and a\nsmall set of focused helpers.\n\nFor straightforward interactive browsing, start with Microsoft's official\n[`@playwright/cli`](https://github.com/microsoft/playwright-cli) and install its\nagent skills with `playwright-cli install --skills`. For tool-based browser\ncontrol with accessibility snapshots, use\n[`playwright-mcp`](https://github.com/microsoft/playwright-mcp). This project is\nthe code-first option when the automation itself is the useful artifact.\n\n### Understanding the Structure\n\nThis repository uses the plugin format with a nested structure:\n\n```\nplaywright-skill/              # Plugin root\n├── .claude-plugin/           # Plugin metadata\n└── skills/\n    └── playwright-skill/     # The actual skill\n        └── SKILL.md\n```\n\nThe 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.\n\n---\n\n### Option 1: Install with `skills` (Recommended)\n\nInstall globally for your user:\n\n```bash\nnpx skills add lackeyjb/playwright-skill --skill playwright-skill --global --yes\n```\n\nInstall only for the current project by omitting `--global`:\n\n```bash\nnpx skills add lackeyjb/playwright-skill --skill playwright-skill --yes\n```\n\nTo target specific agents, add `--agent` followed by one or more agent IDs:\n\n```bash\nnpx skills add lackeyjb/playwright-skill --skill playwright-skill --agent claude-code cursor --global --yes\n```\n\nAfter installation, run setup from the installed skill directory:\n\n```bash\nnpm run setup\n```\n\nSee the [`skills` CLI documentation](https://github.com/vercel-labs/skills) for supported agents and options.\n\n### Option 2: Claude Code Plugin\n\nInstall via Claude Code's plugin system for automatic updates and team distribution:\n\n```bash\n# Add this repository as a marketplace\n/plugin marketplace add lackeyjb/playwright-skill\n\n# Install the plugin\n/plugin install playwright-skill@playwright-skill\n\n# Navigate to the skill directory and run setup\ncd ~/.claude/plugins/marketplaces/playwright-skill/skills/playwright-skill\nnpm run setup\n```\n\nVerify installation by running `/help` to confirm the skill is available.\n\n---\n\n### Option 3: Other Agent Installations\n\nAgent Skills are supported by Claude Code, Cursor, GitHub Copilot, Codex,\nGemini CLI, OpenCode, and other clients. Install the directory containing\n`SKILL.md` using the client’s documented skill path. If a client has no\ninstaller, copy `skills/playwright-skill/` into its documented skill directory\nand run `npm run setup` there.\n\n### Option 4: Download Release\n\n1. Download and extract the latest release from [GitHub Releases](https://github.com/lackeyjb/playwright-skill/releases)\n2. Copy only the `skills/playwright-skill/` folder to:\n   - Global: `~/.claude/skills/playwright-skill`\n   - Project: `/path/to/your/project/.claude/skills/playwright-skill`\n3. Navigate to the skill directory and run setup:\n   ```bash\n   cd ~/.claude/skills/playwright-skill  # or your project path\n   npm run setup\n   ```\n\n---\n\n### Verify Installation\n\nRun `/help` to confirm the skill is loaded, then ask Claude to perform a simple browser task like \"Test if google.com loads\".\n\n## Quick Start\n\nAfter 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.\n\n## Usage Examples\n\n### Test Any Page\n\n```\n\"Test the homepage\"\n\"Check if the contact form works\"\n\"Verify the signup flow\"\n```\n\n### Visual Testing\n\n```\n\"Take screenshots of the dashboard in mobile and desktop\"\n\"Test responsive design across different viewports\"\n```\n\n### Interaction Testing\n\n```\n\"Fill out the registration form and submit it\"\n\"Click through the main navigation\"\n\"Test the search functionality\"\n```\n\n### Validation\n\n```\n\"Check for broken links\"\n\"Verify all images load\"\n\"Test form validation\"\n```\n\n## How It Works\n\n1. Describe what you want to test or automate\n2. Your agent writes custom Playwright code for the task\n3. The universal executor (run.js) runs it with proper module resolution\n4. Browser opens (visible by default) and automation executes\n5. Results are displayed with console output and screenshots\n\n## Configuration\n\nDefault settings:\n\n- **Headless:** `false` (browser visible unless explicitly requested otherwise)\n- **Slow Motion:** `0ms` by default; set `SLOW_MO` when useful\n- **Screenshots:** Helper screenshots use the OS temp directory; set `PW_ARTIFACT_DIR` to choose another location\n\n## Project Structure\n\n```\nplaywright-skill/\n├── .claude-plugin/\n│   ├── plugin.json          # Plugin metadata for distribution\n│   └── marketplace.json     # Marketplace configuration\n├── skills/\n│   └── playwright-skill/    # The actual skill (Claude discovers this)\n│       ├── SKILL.md         # What Claude reads\n│       ├── run.js           # Universal executor (proper module resolution)\n│       ├── package.json     # Dependencies & setup scripts\n│       └── lib/\n│           └── helpers.js   # Optional utility functions\n│       └── API_REFERENCE.md # Full Playwright API reference\n├── README.md                # This file - user documentation\n├── CONTRIBUTING.md          # Contribution guidelines\n└── LICENSE                  # MIT License\n```\n\n## Advanced Usage\n\nClaude 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.\n\n## Dependencies\n\n- Node.js\n- Playwright (installed via `npm run setup`)\n- Chromium (installed via `npm run setup`)\n\n## Troubleshooting\n\n**Playwright not installed?**\nNavigate to the skill directory and run `npm run setup`.\n\n**Module not found errors?**\nEnsure automation runs via `run.js`, which handles module resolution.\n\n**Browser doesn't open?**\nVerify `headless: false` is set. The skill defaults to visible browser unless headless mode is requested.\n\n**Install all browsers?**\nRun `npm run install-all-browsers` from the skill directory.\n\n## What is a Skill?\n\n[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.\n\nThis Playwright skill implements the [open Agent Skills specification](https://agentskills.io), making it compatible across agent platforms.\n\n## Contributing\n\nContributions are welcome. Fork the repository, create a feature branch, make your changes, and submit a pull request. See [CONTRIBUTING.md](CONTRIBUTING.md) for details.\n\n## Learn More\n\n- [Agent Skills Specification](https://agentskills.io) - Open specification for agent skills\n- [Claude Code Skills Documentation](https://docs.claude.com/en/docs/claude-code/skills)\n- [Claude Code Plugins Documentation](https://docs.claude.com/en/docs/claude-code/plugins)\n- [Plugin Marketplaces](https://docs.claude.com/en/docs/claude-code/plugin-marketplaces)\n- [API_REFERENCE.md](skills/playwright-skill/API_REFERENCE.md) - Full Playwright documentation\n- [GitHub Issues](https://github.com/lackeyjb/playwright-skill/issues)\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n",
  "bytes": 9033,
  "sha": "52008f1aa357ef27a73e3d42da981f3bb1b8d1bc461fdf2c60f0c136d0b83215",
  "repo_slug": "lackeyjb/playwright-skill",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/skl_lackeyjb_playwright_skill_skills_playwri_bd432284/readme"
}