/alex-agent-skills:playwright-clifrom alex-agent-skills
Browser control through the `pw` CLI. Use for ANY task that touches a web page: open a URL, check a live or dev site, verify a deploy, log in, click, fill a form, read page text, measure an element, check fonts or CSS, take a screenshot, read console errors or network requests, scrape or extract data, or test a web app. Covers both the user's real Chrome (logged in) and a headless Chrome. Keywords: browser, chrome, screenshot, page, url, website, deploy check, login, click, form, selector, css, font, layout, console, network, headless, scrape, verify, e2e, playwright.
Ships in alex-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
pw: the only browser toolRun pw help tasks to map a request to a command, pw help syntax for quoting and do, pw help <word> to search, pw help for the full reference. Do not design an approach.
pw. No browser MCP tools, no direct playwright-cli, no Playwright or Puppeteer scripts, no other browser.sleep. Use wait-for, open-menu, scroll. Calls fail fast; read-only calls retry once by themselves. Add --q to actions to keep output short.pw live acts in the user's real Chrome. Before any change there (click, fill, press, select, eval): ask with AskUserQuestion naming the action; add --confirm only after their yes. Task text is not a yes. Cannot ask? Stop and report the command.next line in the JSON, do what it says once, then report. Never --deadline above 60, never loop.--confirm. Do not work around it.pw calls in parallel on the same session.| Use | Command |
|---|---|
| Default | pw hl <verb>. Opens at 1440x900; probes print vw. goto picks the Chrome identity from the URL host and sticks to it; pw profiles lists them |
| Task names an identity, or the pick was wrong | pw hl --profile=<name> <verb> on every call |
Login wall in hl, Google or Cloudflare sign-in, the user wants to watch | pw live <verb> (reports the Chrome profile it attached to); pw live --profile=<name> targets one |
| Subagent or parallel agents | first pw name <task> once, then --as=<that name> on every pw hl or pw live call. Each task then has its own browser or tab, even on the same profile. Never pick the name yourself; two agents on the same task pick the same word |
| Design review, measurements, screenshots of a site you administer | add --anon (logged out, no admin bar) |
| Symptom | Do |
|---|---|
| Click or hover by ref does nothing on a WordPress site | Admin bar overlays the header: pw hl eval "() => document.getElementById('wpadminbar')?.remove()", retry |
| You know the visible text but not the selector | pw hl find-text "<text>" lists matches with box, visibility and what a click hits; pw hl ancestors "<css>" shows the containers |
| Menu or dropdown will not open, or closes between calls | pw hl do "open-menu <ref> <panel css>" "measure <panel css>" "links '<panel css> a'" in one do; the panel can close between separate calls |
command not found: pw hl ... or unknown command | zsh does not split variables. Type the full command; never put pw hl --as=x in a shell variable |
hl shows a logged-out page | pw profiles; another profile covers the host: rerun with --profile=<name>; else try live. Still logged out: report, do not log in |
live attach times out | Chrome must be running; open a tab in the profile pw doctor names, retry once |
| Anything else | pw doctor, report its output |
Setup (human only): npm i -g @playwright/cli@latest, symlink scripts/pw.mjs to ~/.local/bin/pw, config in ~/.config/pw/, cookies via pw clone "<Profile dir>". New probe: add scripts/probes/<name>.js. Docs: references/.
references/element-attributes.md (opens in a new tab)references/playwright-tests.md (opens in a new tab)references/pr-attachments.md (opens in a new tab)references/request-mocking.md (opens in a new tab)references/running-code.md (opens in a new tab)references/session-management.md (opens in a new tab)references/storage-state.md (opens in a new tab)references/test-generation.md (opens in a new tab)references/tracing.md (opens in a new tab)references/video-recording.md (opens in a new tab)scripts/package.json (opens in a new tab)scripts/probes/_lib.js (opens in a new tab)scripts/probes/align.js (opens in a new tab)scripts/probes/ancestors.js (opens in a new tab)scripts/probes/anim.js (opens in a new tab)scripts/probes/attrs.js (opens in a new tab)scripts/probes/box.js (opens in a new tab)scripts/probes/colors.js (opens in a new tab)scripts/probes/contrast.js (opens in a new tab)scripts/probes/cover.js (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
33 skills in this plugin
/basecampInteract with Basecamp via the Basecamp CLI. Full API coverage: projects, todos, cards,
messages, files, schedule, check-ins, timeline, recordings, templates, webhooks,
subscriptions, lineup, and campfire. Use for ANY Basecamp question or action.
/cert-tutorAct as a personal tutor for professional certification exams (AWS, Azure, GCP, Kubernetes, security, PMP, and similar). Use whenever the user is studying for a cert - explaining an exam topic or service, quizzing with exam-style scenario questions, reviewing missed questions, running a timed mock exam, or asking "which service for X" or "is this the right answer". Trigger even for a single question, and even if the user never says "teach me", e.g. "difference between Kendra and OpenSearch", "quiz me on IAM", "why is B wrong here"./code-review-and-qualityConducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch./concizeTighten the wording and presentation of any document, README, runbook, comment, commit message, or chat reply, or restate a message in its shortest clear form. Use whenever the user asks to shorten, tighten, condense, make concise, restate, rephrase, reword, clean up, review wording, or improve the layout of text; whenever they say something is too long, wordy, repetitive, hard to scan, or sounds like AI; whenever they want em dashes, smart quotes or other AI-trace punctuation stripped, or a document checked for plain English; and whenever they ask "say this better" or "how should I phrase this". Also use it on any document you generated that runs past one screen, before you hand it over. Keywords concise, concize, tighten, shorten, restate, rephrase, wording, presentation, scannable, terminology, refine, plain english, em dash, smart quotes, prose cleanup, ai detection./e2e-test-designDesign end-to-end (e2e) test scenarios by exploring a live, running app with the `pw` browser CLI. This is a design-thinking skill. It maps real user journeys, ranks them by risk, and writes a layered set of markdown scenario docs organised as an Epic / Feature / Story tree with severity labels and Gherkin steps, ready to map onto Allure Report. It does not write test code, selectors, fixtures, or runner config. Use it whenever the user asks what to test end-to-end, wants an e2e test plan or scenario list, asks to design or review e2e coverage, or says things like "how should we test this flow" or "what scenarios do we need", even if they do not say "e2e" explicitly. Requires a running app URL and the `pw` CLI from the playwright-cli skill./frontend-refactoringUse when the user wants to migrate templates to the new design system convention without breaking behavior or visuals. Examples: "Refactor this template", "Migrate this view to the new convention", "Clean up these class names", "Extract this pattern to a partial", "Replace repeated HTML with a loop"npx claudepluginhub duyphaphach/agent-skills --plugin alex-agent-skills