claudeers.
// Claude Skills

claude-skill-playwright-browser

Claude Code skill: a background Playwright browser for screenshots (desktop/tablet/mobile), frontend health checks, visual diffs, scripted UI flows and logge…

// Claude Skills[ cli ][ api ][ desktop ][ web ][ mobile ][ claude ]#claude#accessibility#browser-automation#claude-code#claude-skills#e2e-testing#frontend#playwright#skills◷ MIT$open-sourceupdated 9 days ago

Install with your AI

Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.

Install and set up claude-skill-playwright-browser (claude-skill project) into my current project.
Found on https://claudeers.com/claude-skill-playwright-browser
Repo: https://github.com/AndyShiu/claude-skill-playwright-browser
Homepage/docs: —
Detected install method: claude-skill → # copy this skill into .claude/skills/claude-skill-playwright-browser/
Category: skills. Platforms: cli, api, desktop, web, mobile.
Read the repo's README for exact setup and env vars, then install it and wire it into my project.

Claudeers Health Verdict:
unknown; community-verified: false. Confirm the source before running anything.
// or install directly (claude-skill)
# copy the skill dir into your project:
# .claude/skills/claude-skill-playwright-browser/   (or ~/.claude/skills/claude-skill-playwright-browser/ for all projects)
// or clone
git clone https://github.com/AndyShiu/claude-skill-playwright-browser

// compatibility

Platformscli, api, desktop, web, mobile
Operating systems—
AI compatibilityclaude
LicenseMIT
Pricingopen-source
LanguageJavaScript

Get your FREE $2.50 API credits to access TickAtlas financial data ↗

claude-skill-playwright-browser

English | 繁體中文

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 issue / walking through a flow20k–40k
Batch screenshots of many pages25k–40k (samples a few instead of opening every image)

The main cost is looking at screenshots (~1.5k–2k each). Asking only for the sizes you need, and giving a URL instead of having Claude find the page, saves a lot.


Troubleshooting

SymptomWhat to do
The screenshot shows a login pageThe session expired — ask Claude to log in again
The screenshot shows a loading spinnerAsk Claude to wait for specific content before capturing (it uses --wait-for)
Certificate error on an intranet siteSelf-signed certificate — once you've confirmed the host is trusted, ask Claude to add --insecure
Can't reach localhostThe dev server isn't running — Claude will tell you and can start it
A button "does nothing" but actually shows a confirm dialogBrowser dialogs are dismissed by default; Claude knows to accept them when needed
Need to test Safari compatibilityRun setup.mjs webkit to install WebKit

Manual use (advanced)

You normally don't need this — Claude calls it for you. To run it yourself:

PW="$HOME/.claude/skills/playwright-browser/scripts/pw.mjs"

node "$PW" inspect --url https://example.com --click "Pricing"        # text outline of the page
node "$PW" shot    --url https://example.com --viewport desktop,mobile --full
node "$PW" audit   --url https://example.com                           # full health check, writes report.md
node "$PW" run     --script flow.mjs --url https://example.com         # custom flow
node "$PW" login   --session admin --url https://example.com/login --until-url dashboard   # log in; saves once you reach dashboard
node "$PW" sessions                                                    # list saved sessions
node "$PW" clean   --days 0                                            # delete all temp screenshots

Each command prints one line of JSON. See SKILL.md for every option.


Update & uninstall

  • Update: run git pull in the skill folder; if package.json changed, run node scripts/setup.mjs again
  • Uninstall: delete the skill folder and ~/.claude/playwright/. For the browser cache, run npx playwright uninstall --all in the skill folder before deleting it, or remove ~/Library/Caches/ms-playwright (macOS), ~/.cache/ms-playwright (Linux) or %LOCALAPPDATA%\ms-playwright (Windows)

Repository layout

SKILL.md                     Instructions Claude reads (when and how to use the skill)
scripts/pw.mjs               The CLI: inspect / shot / audit / run / login / diff / sessions / clean
scripts/setup.mjs            Cross-platform one-time setup
references/analysis.md       How to read audit results, thresholds, tracing issues to code
references/project-tests.md  Turning flows into real project tests (Playwright Test + CI)
docs/images/                 README screenshots (made with this skill)
CHANGELOG.md                 Release notes

License

MIT © AndyShiu · See CHANGELOG.md for release notes.

// faq

What is claude-skill-playwright-browser?

Claude Code skill: a background Playwright browser for screenshots (desktop/tablet/mobile), frontend health checks, visual diffs, scripted UI flows and logged-in pages — in any project. | 讓 Claude Code 擁有背景瀏覽器:多尺寸截圖、前端健檢、視覺比對、操作流程與登入頁面,適用任何專案。. It is open-source on GitHub.

Is claude-skill-playwright-browser free to use?

claude-skill-playwright-browser is open-source under the MIT license, so it is free to use.

What category does claude-skill-playwright-browser belong to?

claude-skill-playwright-browser is listed under skills in the Claudeers registry of Claude-compatible tools.

8 views
★ 28 stars
unclaimed
updated 9 days ago

// embed badge

claude-skill-playwright-browser on Claudeers
[![Claudeers](https://claudeers.com/api/badge/claude-skill-playwright-browser.svg)](https://claudeers.com/claude-skill-playwright-browser)

// retro hit counter

claude-skill-playwright-browser hit counter
[![Hits](https://claudeers.com/api/counter/claude-skill-playwright-browser.svg)](https://claudeers.com/claude-skill-playwright-browser)

// reviews

// guestbook

0/500

// related in Claude Skills

🔓

An agentic skills framework & software development methodology that works.

// skillsobra/⟨Shell⟩★ 292,190◷ MIT[ claude ]
🔓

Public repository for Agent Skills

// skillsanthropics/⟨Python⟩★ 178,324[ claude ]
🔓

💫 Toolkit to help you get started with Spec-Driven Development

// skillsgithub/⟨Python⟩★ 138,919◷ MIT[ claude ]
🔓

AI coding assistant skill (Claude Code, Codex, OpenCode, Cursor, Gemini CLI, and more). Turn any folder of code, SQL schemas, R scripts, shell scripts, docs,…

// skillsGraphify-Labs/⟨Python⟩★ 123,800◷ MIT[ claude ]
→ see how claude-skill-playwright-browser connects across the ecosystem