⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

version unknown

playwright-browser

@andyshiu⭐ 48 stars

Headless, reproducible browser automation with Playwright for any project — screenshots of web pages or local dev servers (desktop/tablet/mobile, full page or one element, single page or every page/menu of an app in one batch), frontend audits (console errors, failed requests, broken images/links, responsive overflow, axe accessibility, LCP/CLS performance), before/after visual comparison, scripted E2E flows (log in, click, fill, page through, assert), and logged-in pages via saved sessions. Use this whenever the user wants to screenshot or visually check a site, find frontend bugs, see how a page looks on mobile, compare the UI before and after a CSS/code change, reproduce a bug from an issue or ticket and capture evidence images for it, verify a UI flow works, or run/write a browser test — even if they never say "Playwright" or "browser". If Claude in Chrome could also do the job, briefly ask which to use (with a recommendation) instead of silently picking.

Use with your AI agent

Open your project in any AI assistant that can read your files. Works with ChatGPT, Claude, Claude Code, Codex, Cursor, Hermes Agent, OpenClaw, Grok Bot, and more.

Download SKILL.md

Your agent needs access to this page’s linked instructions and your project files. Copying does not install or execute anything.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐ 48 on GitHubGitHub ↗

Growing

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

claude-skill-playwright-browser

English | 繁體中文

License: MIT Release Node.js ≥18 Playwright 1.63 Platforms Claude Code skill

Gives Claude Code a browser that runs in the background. Ask in plain language — "screenshot the homepage on mobile", "why does the Submit button do nothing on this page?", "health-check the checkout page" — and Claude opens a browser, clicks around, takes screenshots, runs checks, and hands you the results and files. It never touches the browser you're using, and it works in any project (frontend, backend, even non-Node projects).


What it does

FeatureDetails
📸 ScreenshotsDesktop / tablet / mobile, full page or a single element, many pages in one batch
🩺 Frontend health checkConsole errors, failed API calls (4xx/5xx), broken images, broken links, mobile layout overflow (and which element causes it), accessibility issues (axe), performance (LCP / CLS)
🔍 Visual comparisonSave a baseline before a CSS change, compare afterwards, get a diff image with changes highlighted in red
🧭 UI flowsLog in, click through menus, fill forms, page through lists, assert results — with a screenshot at each step and an automatic screenshot on failure
🔐 Sites that need loginYou log in once yourself; Claude then reuses that session in the background (your password is never stored)
🧪 Real testsWhen you want it, turn a flow into a Playwright Test in your project and run it in CI

See it in action

Screenshots on every screen size

Frontend health check

Before / after visual comparison

All images were produced by this skill against a small demo site.

Examples

Just talk to Claude — no need to mention "Playwright":

Take mobile and desktop screenshots of the homepage at localhost:5173
A customer says our site scrolls sideways on iPhone — find the element that's too wide
Health-check the new checkout page before we ship it
I changed the header CSS — compare before and after
On the admin "Orders" page, does going to page 2 actually load different data?
This issue says "Submit" does nothing — reproduce it on dev and capture screenshots
Screenshot every page in the admin menu and save them to my Desktop

Claude sticks to what you asked: ask for a screenshot and you get a screenshot; ask about one bug and it deals with that bug. A full check with a list of recommendations only happens when you ask for a review or a health check.

Claude in Chrome or this skill?

Better with Claude in ChromeBetter with this skill
Uses the tab you have open right now, in your logged-in browserRuns in the background, doesn't touch your browser
You want to watch it workMust be repeatable with consistent results
A quick one-off lookSeveral sizes or many pages in one batch
Health checks, reports, before/after comparisons, tests

When both would work, Claude asks which one you prefer and suggests one.

Head-to-head test

Same task for both, run by two fresh Claude agents: "take mobile screenshots of these 3 report pages" on a logged-in internal admin app (URLs given).

Claude in ChromeThis skill
Tokens48,04548,853
Time93 s47 s
Tool calls97
Mobile size500×667 — Chrome windows can't go narrower than 500 px390×844 (real iPhone size, 3× scale)
OutputJPEG in a temp folder, had to be movedPNG saved where you asked
Full-page captureNot availableAvailable
LoginYour Chrome's existing loginSession saved earlier with this skill

Takeaways: tokens were a wash for a small job like this — most of both totals is each agent's fixed overhead. The skill was twice as fast and produced true phone-width screenshots; Chrome can't emulate widths below ~500 px, so layout bugs that only appear at 390 px are out of its reach. One run each with URLs provided — tasks with more pages or steps should favour the skill further, but that part hasn't been measured.


Install

Requirements: Claude Code, Node.js 18+ (node -v), macOS / Linux / Windows, about 150 MB of disk for Chromium.

1. Clone into a skills directory (the folder must be named playwright-browser)

# Just for you, available in every project
git clone https://github.com/AndyShiu/claude-skill-playwright-browser.git ~/.claude/skills/playwright-browser

# Or for a single project (commit it with the project to share with your team)
git clone https://github.com/AndyShiu/claude-skill-playwright-browser.git <project>/.claude/skills/playwright-browser

On Windows the personal location is %USERPROFILE%\.claude\skills\playwright-browser.

Windows / Git Bash: Claude Code on Windows uses Git Bash by default, which rewrites arguments that start with / into Windows paths (--until-url /dashboard becomes C:/Program Files/Git/dashboard). The skill undoes this for its own options automatically. If you run other commands by hand and hit the same thing, drop the leading / (e.g. --until-url dashboard), prefix the command with MSYS_NO_PATHCONV=1, or use PowerShell / cmd.

2. That's it. The first time Claude uses the skill it notices the runtime isn't installed, tells you, and runs the one-time setup. To install up front instead:

node ~/.claude/skills/playwright-browser/scripts/setup.mjs                  # Chromium only
node ~/.claude/skills/playwright-browser/scripts/setup.mjs firefox webkit   # also Firefox and WebKit (Safari's engine)

npm packages go into node_modules/ inside the skill folder (git-ignored); browsers go into Playwright's shared cache, so every project and every copy of the skill shares one download. Your projects are never touched.


Sites that need login

  1. Tell Claude you want to work on a site that needs login — it opens a browser window for you
  2. Log in yourself in that window (only you type your credentials; they're never stored)
  3. Close the window when you're done — or Claude sets it to save and close automatically once you reach a given page

From then on Claude can use that session in the background. After every run, any tokens the site refreshed are saved back, so a session you keep using stays logged in. If it sits idle past the site's login lifetime, Claude detects the redirect to the login page and asks you to log in again — it will never hand you a login screen as the result.


Where files go

The skill folder contains no personal data, so it's safe to share or commit.

WhatWhereNotes
Login sessions~/.claude/playwright/sessions/<project>/Contain cookies / tokens, readable only by you. Never commit or share them
Visual baselines~/.claude/playwright/baselines/<project>/Reference screenshots for before/after comparisons
Screenshots & reportsclaude-playwright/ in the system temp dirDeleted after 7 days; Claude asks where to save anything you want to keep

Token usage

Rough extra cost of one use inside an existing conversation:

TaskApprox. tokens
One screenshot5k–7k
Three screen sizes8k–10k
Full health check of one page12k–18k
Investigating one

// HOW IT'S BUILT

KEY FILES

SKILL.mdREADME.md

// REPO STATS

48 stars