playwright

Automate interactive browser tasks with Playwright for login, forms, and data extraction.

2|1|Updated Nov 2, 2025
One-click install
npx skills add https://github.com/TianqiYe/tockstalk-bot --skill playwright-tianqiye
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright
Source: https://github.com/TianqiYe/tockstalk-bot/tree/main/.claude/skills/playwright
Command: npx skills add https://github.com/TianqiYe/tockstalk-bot --skill playwright-tianqiye

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill provides a general-purpose browser automation framework using Playwright, consolidating session persistence, stealth handling, retry logic, and dev-server detection to streamline ad-hoc browser tasks such as login testing, data extraction, and form interactions.

Core Features & Use Cases

  • Session Persistence: Save/restore cookies to skip login flows and speed up repeated runs.
  • Stealth & Reliability: Built-in stealth mode, human-like interactions, and automatic retries to handle flaky pages.
  • Cloudflare Handling: Detects Cloudflare challenges and waits for resolution with optional cookie persistence.
  • One-off Automation Patterns: Automate login flows, form submissions, data extraction, and screenshots.
  • Dev Server Detection: Optionally detect running development servers to reuse local endpoints.

Quick Start

Install dependencies with npm install and install Chromium via Playwright:

  • npm install playwright playwright-extra puppeteer-extra-plugin-stealth dotenv
  • npx playwright install chromium Then run a sample script:
  • node run.js path/to/your-script.js

Frequently Asked Questions about playwright

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

FAQPage Schema
How do I automate browser tasks like login and data extraction with Playwright?

To automate browser tasks with Playwright, you can use scripts to handle login flows, form filling, data extraction, and screenshot capture for ad-hoc testing and scraping. It provides utilities for session persistence and error handling.

Can Playwright bypass Cloudflare challenges during web scraping?

Yes, Playwright can handle Cloudflare challenges by utilizing built-in stealth mode and human-like interactions to detect challenges and wait for resolution, with optional cookie persistence to maintain the session.

How do I save and restore browser sessions to skip login flows in Playwright?

You can save and restore browser sessions in Playwright using session persistence utilities that save cookies, allowing you to skip repetitive login flows and significantly speed up repeated automation runs.

Do I need npm to set up Playwright for one-off automation scripts?

Yes, you need npm to set up Playwright for one-off automation scripts. The setup requires running npm install for dependencies and using npx playwright install chromium to prepare the browser environment.

What are the limitations of using Playwright for scheduled monitoring?

Playwright is not designed for scheduled monitoring; it targets single-run automation scenarios such as ad-hoc testing, scraping, and data collection rather than continuous or scheduled website monitoring.

What is the best way to handle flaky pages during Playwright browser automation?

The best way to handle flaky pages during Playwright browser automation is to use built-in stealth mode, human-like interactions, and automatic retry logic to ensure reliable execution of your scraping or testing scripts.