playwright-skill
Skill3.2k starsChanged 4 months agoMITView on GitHub
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.
- Reads credentials
17 other projects use a version of this.
Trending
Quiet since September.about the whole repository
Most recently taken up by
- jovd83/playwright-skilltheir own version, first seen Sep 28, 2026
- NTPhat0322/claude-skillstheir own version, first seen Sep 28, 2026
- testdino-hq/playwright-skilltheir own version, first seen Sep 6, 2026
- appautomaton/webmatontheir own version, first seen Aug 25, 2026
- LambdaTest/agent-skillstheir own version, first seen Jul 24, 2026
- noahsilve123/claude-skillsettheir own version, first seen Jul 3, 2026
Who's talking about lackeyjb/playwright-skill
- A Hacker News story“Show HN: Playwright Skill for Claude Code – Less context than playwright-MCP”Hacker News · Oct 20, 2025 · 189 points
- @mathias.blog“I'm testing agent-browser as a replacement for github.com/lackeyjb/pla... So far, I'm super impressed! …”Bluesky · Jan 22, 2026 · 5 likes
- @zebudu.bsky.social“Powerful skill!”Bluesky · Oct 21, 2025 · 2 likes
- shivam-verma-philips-1/ai-team“New skills”GitHub · Aug 2, 2026 · 1 reactions
- github/copilot-plugins“Add plugins for other Microsoft owned MCPs (Docs, playwright, etc).”GitHub · Feb 6, 2026 · 1 reactions
The biggest 5 of 17 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 17
Talked about on GitHub, Bluesky and Hacker News (17 times).
On GitHub · 11
- Aug 2, 2026New skills — shivam-verma-philips-1/ai-team1 reaction
- Feb 6, 2026Add plugins for other Microsoft owned MCPs (Docs, playwright, etc). — github/copilot-plugins1 reaction · 2 comments
- Sep 29, 2026agent-skills.github.lackeyjb.playwright-skill: init at 5.0.0 — sudosubin/agents.nix0 reactions
- May 12, 2026Audit candidate: lackeyjb/playwright-skill — xiaolai/nlpm0 reactions · 29 comments
- Mar 9, 2026[SUBMISSION] lackeyjb/playwright-skill — ProSkillsMD/proskills0 reactions · 6 comments
6 more on GitHub
- Mar 9, 2026[SUBMISSION] playwright-skill — ProSkillsMD/proskills0 reactions · 4 comments
- Feb 24, 2026Add Playwright E2E testing with full issue-to-PR orchestration skill — imkacarlson/life-trackersays it tested it0 reactions
- Feb 20, 2026playwright-skill — AAswordman/OperitSkillMarket0 reactions
- Jan 22, 2026New skill: /lackeyjb-playwright-skill (low risk) — aiskillstore/marketplace0 reactions
- Jan 11, 2026Add playwright-testing skill from lackeyjb/playwright-skill — timbuchinger/loadoutsays it tested it0 reactions
- Oct 21, 2025HN Top Posts 2025-10-21 — EFLql/hackernews-daily0 reactions
On Bluesky · 5
- Jan 22, 2026I'm testing agent-browser as a replacement for github.com/lackeyjb/pla... So far, I'm super impressed! Watching this thing log in via Clerk… — @mathias.blogsays it tested it5 likes and reposts · 1 reply
- Oct 21, 2025Powerful skill! — @zebudu.bsky.social2 likes and reposts
- Oct 26, 2025lackeyjb/playwright-skill: Claude Code Skill for browser automation with Playwright. Model-invoked - Claude autonomously writes and… — @latitude77.bsky.social1 likes and repost
- Oct 26, 2025なるほどClaude Skillはこんな風に公開されていくんだな — @matsuu.bsky.social1 likes and repost
- Oct 20, 2025Show HN: Playwright Skill for Claude Code – Less context than playwright-MCP | Discussion — @hackernewsbot.bsky.social1 likes and repost
On Hacker News · 1
- Oct 20, 2025Show HN: Playwright Skill for Claude Code – Less context than playwright-MCP189 points · 45 comments
Used with
Projects with it also use playwright-ci, playwright-migration and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
zebbernSkillplaywright-ci
Production-ready CI/CD configurations for Playwright — GitHub Actions, GitLab CI, CircleCI, Azure DevOps, Jenkins, Docker, parallel sharding, reporting, code coverage, and global setup/teardown.
Also in 3 projects that use this
zebbernSkillplaywright-migration
Step-by-step migration guides for moving to Playwright from Cypress or Selenium/WebDriver — command mappings, architecture changes, and incremental adoption strategies.
Also in 3 projects that use this
MicrosoftSkillplaywright-cli
Automate browser interactions, test web pages and work with Playwright tests.
Also in 4 projects that use this
- +1 more from zebbern
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- zebbern/claude-code-guide★ 4.6ksame name
- testdino-hq/playwright-skill★ 383same name
- LambdaTest/agent-skills★ 373same name
- CommandCodeAI/agent-skills★ 131same name
- appautomaton/webmaton★ 20same name
- DangQuangSE/team-development-skills★ 19same name
- idanbeck/claude-skills★ 14same name
- xfstudio/skills★ 9same name
- appautomaton/playwright-skill★ 6same name
- ai4brands-design/claude-skills★ 2same name
7 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 7 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 16 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Write and execute focused Playwright scripts for the user's request.
- Very specific: line 28
If shell state does not persist between commands, substitute the literal paths for $SKILL_DIR and $TMP_DIR in each command instead.
- Distinctive: line 45
Use the only result automatically.
- Very specific: line 47
Write reusable scripts to $TMP_DIR/playwright-test-*.js unless the user asks to save them in the project.
- Very specific: line 49
Use a visible browser by default.
- Distinctive: line 51
Put the target URL in a constant or environment variable.
- Very specific: line 52
Run scripts with node "$SKILL_DIR/run.js" <script.js>.
- Distinctive: line 107
Prefer locators that describe what a user sees, in this order:
- Distinctive: line 149
Use test credentials supplied by the user.
- Distinctive: line 174
Start Chrome with remote debugging enabled, then connect with Playwright:
- Distinctive: line 199
Use Playwright locators and assertions directly for actions, waits, extraction, authentication, tables, and retries.
“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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:
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
For localhost work, detect running servers before writing a URL:
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.
- Write reusable scripts to
$TMP_DIR/playwright-test-*.jsunless the user asks to save them in the project. UsePW_SCRIPT_DIRto preserve scripts. - Use a visible browser by default. Use
headless: trueonly when requested or when the environment has no display. - Put the target URL in a constant or environment variable.
- Run scripts with
node "$SKILL_DIR/run.js" <script.js>. - Report actions, failures, and artifact paths. Do not claim success without checking the resulting page.
Setup
Run once:
cd "$SKILL_DIR" && npm run setupThis installs Playwright and Chromium. Use cd "$SKILL_DIR" && npm run
install-all-browsers when Firefox or WebKit is required.
Minimal example
const os = require('node:os');
const path = require('node:path');
const { chromium } = require('playwright');
const targetUrl = process.env.TARGET_URL || 'http://localhost:3000';
const artifactDir = process.env.PW_ARTIFACT_DIR || os.tmpdir();
(async () => {
const browser = await chromium.launch({ headless: false });
try {
const page = await browser.newPage();
await page.goto(targetUrl);
console.log('Page loaded:', await page.title());
await page.screenshot({ path: path.join(artifactDir, 'page.png'), fullPage: true });
} finally {
await browser.close();
}
})();Run it:
node "$SKILL_DIR/run.js" "$TMP_DIR/playwright-test-page.js"For short one-off tasks, use inline execution:
node "$SKILL_DIR/run.js" -e "const browser = await chromium.launch({headless: false}); try { const page = await browser.newPage(); await page.goto('https://example.com'); console.log(await page.title()); } finally { await browser.close(); }"The -e process exits as soon as the snippet settles, so close the browser
inside the snippet.
Current Playwright patterns
Prefer locators that describe what a user sees, in this order:
page.getByRole()with an accessible namepage.getByLabel()for form controlspage.getByText()for visible contentpage.getByTestId()when the application provides a test contract
Actions auto-wait for actionability. Use web-first assertions or a locator's
waitFor() instead of waitForSelector(), fixed sleeps, or networkidle.
await page.getByLabel('Email').fill('test@example.com');
await page.getByRole('button', { name: 'Sign in' }).click();
await page.waitForURL('**/dashboard');
await page.getByRole('heading', { name: 'Dashboard' }).waitFor();Common tasks
Responsive checks
{
const os = require('node:os');
const path = require('node:path');
const artifactDir = process.env.PW_ARTIFACT_DIR || os.tmpdir();
const viewports = [
{ name: 'desktop', width: 1440, height: 900 },
{ name: 'mobile', width: 390, height: 844 },
];
for (const viewport of viewports) {
await page.setViewportSize(viewport);
await page.goto(targetUrl);
await page.screenshot({ path: path.join(artifactDir, `${viewport.name}.png`), fullPage: true });
}
}Login flow
Use test credentials supplied by the user. Never invent or expose real credentials. Verify both the navigation and a post-login element.
await page.goto(`${targetUrl}/login`);
await page.getByLabel('Email').fill(process.env.TEST_EMAIL);
await page.getByLabel('Password').fill(process.env.TEST_PASSWORD);
await page.getByRole('button', { name: /sign in|log in/i }).click();
await page.waitForURL('**/dashboard');
await page.getByRole('heading', { name: /dashboard/i }).waitFor();Save scripts and artifacts
PW_SCRIPT_DIR=./playwright-tests node "$SKILL_DIR/run.js" "$TMP_DIR/playwright-test-login.js"
PW_ARTIFACT_DIR=./playwright-artifacts node "$SKILL_DIR/run.js" "$TMP_DIR/playwright-test-page.js"PW_SCRIPT_DIR copies file-based scripts before execution and adds a timestamp
when a filename already exists. PW_ARTIFACT_DIR controls helper screenshot
output; the default is the operating system temporary directory.
Connect to an existing Chrome session
Start Chrome with remote debugging enabled, then connect with Playwright:
const browser = await chromium.connectOverCDP('http://127.0.0.1:9222');
const page = browser.contexts()[0].pages()[0];This reuses cookies and extensions in that session. Do not use it for secrets unless the user explicitly asks; a connected browser has the user's access.
Helpers
const helpers = require(`${process.env.PW_SKILL_DIR}/lib/helpers`);
const servers = await helpers.detectDevServers();
const browser = await helpers.launchBrowser('chromium');
const context = await helpers.createContext(browser);
const page = await context.newPage();
await helpers.handleCookieBanner(page);
await helpers.takeScreenshot(page, 'result');Available helpers are detectDevServers, getExtraHeadersFromEnv,
launchBrowser, createContext, handleCookieBanner, and takeScreenshot.
Use Playwright locators and assertions directly for actions, waits, extraction,
authentication, tables, and retries.
Configuration
PW_BROWSER:chromium,firefox, orwebkitforlaunchBrowser().PW_CHANNEL: installed browser channel such aschromeormsedge.PW_EXECUTABLE_PATH: explicit browser executable path.PW_HEADLESS:trueorfalse; visible mode is the default.SLOW_MO: action delay in milliseconds.PW_HEADER_NAMEandPW_HEADER_VALUE: one extra HTTP header.PW_EXTRA_HEADERS: JSON object of extra HTTP headers.PW_SCRIPT_DIR: directory for preserving file-based scripts.PW_ARTIFACT_DIR: directory for helper-generated screenshots.
See API_REFERENCE.md for network interception, API mocking, authentication state, video, visual checks, device emulation, and CI patterns.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

