playwright

Automate terminal-driven browser interactions and capture screenshots, PDFs, and traces.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/pczhao1210/reuseable-agents-and-skills --skill playwright-pczhao1210
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright
Source: https://github.com/pczhao1210/reuseable-agents-and-skills/tree/main/.agents/skills/playwright
Command: npx skills add https://github.com/pczhao1210/reuseable-agents-and-skills --skill playwright-pczhao1210

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires npx, @playwright/cli, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill removes the friction of driving real browsers from command line environments, enabling reliable navigation, form interactions, snapshots, screenshots, and data extraction without requiring a test framework.

Core Features & Use Cases

  • Terminal-first Browser Automation: Run navigation, clicks, typing, and artifact capture from a shell using a consistent CLI wrapper.
  • Snapshot-driven Element References: Capture stable element refs and re-snapshot after navigation or major DOM changes to avoid brittle selectors.
  • Artifacts & Debugging: Produce screenshots, PDFs, traces, and console/network logs for debugging UI flows and reproducing issues.
  • Use Case: Quickly reproduce a broken checkout flow by opening the page, taking snapshots, interacting with form fields, recording a trace, and saving screenshots to a contained output folder.

Quick Start

Use the playwright skill to open a target URL, snapshot the page, perform interactions using snapshot refs, and save artifacts to output/playwright/<label>/.

Frequently Asked Questions about playwright

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate browser workflows and capture screenshots from the terminal?

You can automate browser workflows from the terminal by using a CLI wrapper to navigate URLs, interact with forms, and save screenshots or snapshots directly to a specified output folder without needing a test framework.

Do I need a test framework to run Playwright CLI for data extraction?

No, you do not need a test framework to run Playwright CLI for data extraction. This approach allows you to perform navigation, form filling, and artifact capture directly from a command line environment.

What is the best way to avoid brittle selectors during browser automation?

The best way to avoid brittle selectors during browser automation is to use snapshot-driven element references. You capture stable element refs and re-snapshot the page after navigation or major DOM changes to maintain reliability.

How do I debug a broken UI flow using command line browser automation?

You can debug a broken UI flow by using command line browser automation to record traces, capture console and network logs, and save screenshots of the interactions to an output directory for issue reproduction.

Does this terminal-driven browser automation approach work without a global Playwright installation?

Terminal-driven browser automation requires either a global Playwright CLI installation or npx to execute the necessary commands for driving browser interactions and capturing artifacts from web pages.

Why are my browser automation snapshots failing after page navigation?

Snapshots often fail after page navigation because the DOM changes. You must re-snapshot the page after navigating or modifying major DOM elements to capture fresh, stable element references for subsequent interactions.