playwright-cli
Playwright CLI
Terminal-based browser automation using npx playwright. This skill covers the CLI surface: running tests, generating test code via codegen, taking screenshots/PDFs, and CI sharding flags.
Scope boundary
| I want to... | Use |
|---|---|
| Run E2E tests | npx playwright test (this skill) |
| Record a browser session → test code | npx playwright codegen (this skill) |
| One-off screenshot / PDF from a URL | npx playwright screenshot / pdf (this skill) |
| Write / review / tune a Playwright test suite | playwright-test skill |
| Agent-driven real-time browser control (navigate → click → read → assert) | mcp__claude-in-chrome__* tools (not this skill) |
| Interactive data scraping / SPA exploration | claude-in-chrome MCP tools or a Playwright script executed via npx playwright test |
For data scraping / SPA flows where you need to programmatically navigate, click "Load More", extract DOM, and save JSON: write a tests/*.spec.ts and run npx playwright test. See playwright-test skill for the test-authoring patterns.
Quick Reference
# Interactive codegen (generates test code from browser actions)
npx playwright codegen https://example.com
# Run all tests
npx playwright test
# Run specific file
npx playwright test tests/login.spec.ts
# Run specific test by title
npx playwright test -g "should login"
# Debug mode (opens Playwright Inspector)
npx playwright test --debug
# UI mode (visual test runner with time-travel)
npx playwright test --ui
# Headed mode (see the browser)
npx playwright test --headed
# Specific browser
npx playwright test --project=chromium
# Generate trace
npx playwright test --trace on
# View report
npx playwright show-report
# Install browsers
npx playwright install
npx playwright install chromium --with-deps # CI-optimized
Sharding for CI
npx playwright test --shard=1/3
npx playwright test --shard=2/3
npx playwright test --shard=3/3
Screenshot / PDF
# Screenshot from CLI
npx playwright screenshot --browser=chromium https://example.com screenshot.png
# PDF (Chromium only)
npx playwright pdf https://example.com page.pdf
More from mizchi/skills
empirical-prompt-tuning
Methodology for iteratively improving agent-facing instructions (skills / slash commands / CLAUDE.md / code-gen prompts) by having a bias-free executor run them and evaluating two-sidedly (executor self-report + instruction-side metrics) until improvements plateau. Use after creating or revising a prompt or skill.
38gh-fix-ci
Debug or fix failing GitHub PR checks running in GitHub Actions. Inspects checks/logs via `gh`, drafts a fix plan, and implements only after explicit approval. Out of scope: external CI (e.g. Buildkite) — report only the details URL.
9tech-article-reproducibility
Evaluate the reproducibility of technical articles. Dispatch a subagent to simulate a first-time reader reproducing the work locally and list missing information. Use as the final check on a draft before publication.
8node-sqlite-vec
Set up Node 24+ built-in `node:sqlite` with the loadable `sqlite-vec` extension for vector / RAG storage in TypeScript, without `better-sqlite3`. Covers extension loading, vec0 BigInt rowids, vitest incompatibility (use `node --test`), tsconfig flags for `.ts` imports, and a CLI shebang.
5cloudflare-deploy
Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.
5mizchi-blog-style
Japanese-language style guide and AI-tone detection rubric for mizchi-authored blog posts (zenn / dev.to). Includes a subagent dispatch procedure that scores a draft on two axes — looks-like-mizchi vs sounds-AI-generated. Use after drafting an article during the style-matching revision loop.
5