playwright-local

jezweb/claude-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/jezweb/claude-skills --skill playwright-local
0 commentsdiscussion
summary

Fast, persistent browser automation with session continuity across sequential agent commands.

  • Supports three browser modes: headless Chromium, real Chrome with profile support, and cloud-hosted remote browsers with proxy configuration
  • Includes 15+ command categories covering navigation, page inspection, interactions, data extraction, cookie management, and JavaScript execution
  • Offers cloud session management, local server tunneling via Cloudflare, and parallel subagent execution thro
skill.md

Playwright Local Browser Automation

Status: Production Ready ✅ Last Updated: 2026-01-21 Dependencies: Node.js 20+ (Node.js 18 deprecated) or Python 3.9+ Latest Versions: [email protected], [email protected], [email protected] Browser Versions: Chromium 143.0.7499.4 | Firefox 144.0.2 | WebKit 26.0

⚠️ v1.57 Breaking Change: Playwright now uses Chrome for Testing builds instead of Chromium. This provides more authentic browser behavior but changes the browser icon and title bar.


Quick Start (5 Minutes)

1. Install Playwright

Node.js:

npm install -D playwright
npx playwright install chromium

Python:

pip install playwright
playwright install chromium

Why this matters:

  • playwright install downloads browser binaries (~400MB for Chromium)
  • Install only needed browsers: chromium, firefox, or webkit
  • Binaries stored in ~/.cache/ms-playwright/

2. Basic Page Scrape

import { chromium } from 'playwright';

const browser = await chromium.launch({ headless: true });
const page = await browser.newPage();

await page.goto('https://example.com', { waitUntil: 'networkidle' });
const title = await page.title();
const content = await page.textContent('body');

await browser.close();
console.log({ title, content });

CRITICAL:

  • Always close browser with await browser.close() to avoid zombie processes
  • Use waitUntil: 'networkidle' for dynamic content (SPAs)
  • Default timeout is 30 seconds - adjust with timeout: 60000 if needed

3. Test Locally

# Node.js
npx tsx scrape.ts

# Python
python scrape.py

Why Playwright Local vs Cloudflare Browser Rendering

Feature Playwright Local Cloudflare Browser Rendering
IP Address Residential (your ISP) Datacenter (easily detected)
Stealth Plugins Full support Not available
Rate Limits None 2,000 requests/day free tier
Cost Free (your CPU) $5/10k requests after free tier
Browser Control All Playwright features Limited API
Concurrency Your hardware limit Account-based limits
Session Persistence Full cookie/storage control Limited session management
Use Case Bot-protected sites, auth flows Simple scraping, serverless

When to use Cloudflare: Serverless environments, simple scraping, cost-efficient at scale When to use Local: Anti-bot bypass needed, residential IP required, complex automation


The 7-Step Stealth Setup Process

⚠️ 2025 Reality Check: Stealth plugins work well against basic anti-bot measures, but advanced detection systems (Cloudflare Bot Management, PerimeterX, DataDome) have evolved significantly. The detection landscape now includes:

  • Behavioral analysis (mouse patterns, scroll timing, keystroke dynamics)
  • TLS fingerprinting (JA3/JA4 signatures)
  • Canvas and WebGL fingerprinting
  • HTTP/2 fingerprinting

Recommendations:

  • Stealth plugins are a good starting point, not a complete solution
  • Combine with realistic user behavior simulation (use steps option)
  • Consider residential proxies for heavily protected sites
  • "What works today may not work tomorrow" - test regularly
  • For advanced scenarios, research alternatives like nodriver or undetected-chromedriver

Step 1: Install Stealth Plugin (Node.js)

npm install playwright-extra playwright-stealth

For puppeteer-extra compatibility:

npm install puppeteer-extra puppeteer-extra-plugin-stealth

Step 2: Configure Stealth Mode

playwright-extra:

import { chromium } from 'playwright-extra';
import stealth from 'puppeteer-extra-plugin-stealth';

chromium.use(stealth());

const browser = await chromium.launch({
  headless: true,
  args: [
    '--disable-blink-features=AutomationControlled',
    '--no-sandbox',
    '--disable-setuid-sandbox',
  ],
});

const context = await browser.newContext({
  userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
  viewport: { width: 1920, height: 1080 },
  locale: 'en-US',
  timezoneId: 'America/New_York',
});

Key Points:

  • --disable-blink-features=AutomationControlled removes navigator.webdriver flag
  • Randomize viewport sizes to avoid fingerprinting
  • Match user agent to browser version (Chrome 120 example above)

Step 3: Mask WebDriver Detection

await page.addInitScript(() => {
  // Remove webdriver property
  Object.defineProperty(navigator, 'webdriver', {
    get: () => undefined,
  });

  // Mock plugins
  Object.defineProperty(navigator, 'plugins', {
    get: () => [1, 2, 3, 4, 5],
  });

  // Mock languages
  Object.defineProperty(navigator, 'languages', {
    get: () => ['en-US', 'en'],
  });

  // Consistent permissions
  const originalQuery = window.navigator.permissions.query;
  window.navigator.permissions.query = (parameters) => (
    parameters.name === 'notifications' ?
      Promise.resolve({ state: Notification.permission }) :
      originalQuery(parameters)
  );
});

Step 4: Human-Like Mouse Movement

// Simulate human cursor movement
async function humanClick(page, selector) {
  const element = await page.locator(selector);
  const box = await element.boundingBox();

  if (box) {
    // Move to random point within element
    const x = box.x + box.width * Math.random();
    const y = box.y + box.height * Math.random();

    await page.mouse.move(x, y, { steps: 10 });
    await page.mouse.click(x, y, { delay: 100 });
  }
}

Step 5: Rotate User Agents

const userAgents = [
  'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
  'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
]
how to use playwright-local

How to use playwright-local on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add playwright-local
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/jezweb/claude-skills --skill playwright-local

The skills CLI fetches playwright-local from GitHub repository jezweb/claude-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/playwright-local

Reload or restart Cursor to activate playwright-local. Access the skill through slash commands (e.g., /playwright-local) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.429 reviews
  • Noor Okafor· Dec 24, 2024

    Useful defaults in playwright-local — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Lucas Diallo· Nov 15, 2024

    I recommend playwright-local for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Layla Bhatia· Nov 7, 2024

    Keeps context tight: playwright-local is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • James Farah· Oct 6, 2024

    playwright-local reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Benjamin Harris· Sep 13, 2024

    playwright-local is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Rahul Santra· Sep 9, 2024

    playwright-local reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Dev Brown· Sep 5, 2024

    playwright-local fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Pratham Ware· Aug 28, 2024

    I recommend playwright-local for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Layla Jain· Aug 24, 2024

    playwright-local is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Advait Gupta· Aug 4, 2024

    playwright-local fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

showing 1-10 of 29

1 / 3