Back to Skills

puppeteer-automation

Expert guidance for browser automation using Puppeteer with best practices for web scraping, testing, screenshot capture, and JavaScript execution in headless Chrome.

214stars37forksUpdated 8/5/2026

Security Assessment

Safe(92/100)
Security Score92/100

About puppeteer-automation

Puppeteer-automation provides expert guidance for browser automation with Puppeteer in headless or headful Chrome/Chromium. It solves the problem of writing reliable Node.js automation scripts for tasks like web scraping, UI testing, screenshot and PDF capture, and executing JavaScript in a real browser context, with an emphasis on robustness — proper async/await, error handling, waiting strategies for dynamic content, and clean browser lifecycle management to avoid memory leaks.

The documentation is a comprehensive reference covering project setup, browser launch options (including flags such as --no-sandbox and viewport configuration), page navigation with waitUntil strategies, element selection via query selectors and XPath, in-page evaluation, interactions (clicking, typing, keyboard, form handling, file upload), waiting strategies (waitForSelector, waitForFunction, waitForNavigation, request/response waits), screenshot and PDF generation, network request interception and modification, and authentication with HTTP credentials and cookies. It also promotes best practices like modular, reusable design and integration with Jest and Mocha test frameworks.

It targets Node.js developers, QA engineers, and automation practitioners who need to script Chrome for scraping, testing, or document generation. Use cases include automated end-to-end testing, capturing page or element screenshots, generating PDFs from web pages, intercepting and monitoring network traffic, and scraping structured data. The content is standard, legitimate automation guidance delivered as a single SKILL.md; the automation techniques it documents are the same ones used across mainstream web testing and scraping workflows.

FAQ

What can I do with this skill?

Automate Chrome/Chromium with Puppeteer for web scraping, UI testing, screenshot and PDF capture, network interception, and executing JavaScript in the browser, using clean async/await patterns.

What are the prerequisites?

Node.js and the puppeteer npm package (installed via 'npm install puppeteer'). Examples use headless mode with launch flags like --no-sandbox and --disable-setuid-sandbox.

How does it handle dynamic content?

Through robust waiting strategies — waitForSelector (including waiting for elements to disappear), waitForFunction, waitForNavigation, and waitForRequest/waitForResponse — rather than fixed timeouts, which it advises using sparingly.

Can it generate screenshots and PDFs?

Yes — full-page or element screenshots (PNG/JPEG with clipping and quality options) and PDF generation with format, background printing, and margin options.

Does it cover network and authentication?

Yes — request interception to block or modify requests, response monitoring, HTTP basic authentication, and setting, reading, and clearing cookies.

Install puppeteer-automation

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill