puppeteer_skill

This skill automates browser tasks with Puppeteer for web scraping, PDF generation, screenshots, and automated testing.
  • TypeScript

72

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill aidotnet/moyucode --skill puppeteer

  • SKILL.md3.4 KB

Overview

This skill uses Puppeteer to automate Chrome/Chromium for tasks like PDF generation, screenshots, web scraping, and form automation. It targets Node.js/TypeScript projects and supports headless and headed browser flows for reliable, scriptable browser interaction. Use it to produce printable PDFs, capture visual regressions, extract page data, or automate repetitive web tasks.

How this skill works

The skill launches a Chrome/Chromium instance, creates pages, navigates to URLs or sets HTML content, and runs actions inside the page context. It exposes APIs for rendering PDFs (with margins, header/footer and page ranges), taking screenshots, evaluating DOM code for scraping, and interacting with forms and controls. You can run Puppeteer headless for CI or headed for debugging and visual verification.

When to use it

  • Generate printable PDFs from HTML or live pages for invoices, reports, or certificates.
  • Capture full-page or viewport screenshots for visual testing and monitoring.
  • Scrape dynamic content where server-side requests miss client-rendered data.
  • Automate form submissions, login flows, and end-to-end browser tests.
  • Render complex styles or JavaScript-driven pages before saving or processing.

Best practices

  • Reuse browser and page instances where possible to reduce startup overhead.
  • Use waitUntil options (networkidle/domcontentloaded) to ensure the page is ready before capture.
  • Run headless in CI and headed locally for debugging; enable slowMo or devtools when diagnosing flakiness.
  • Sanitize and limit scraping frequency to avoid overloading target sites and respect robots/terms.
  • Set explicit viewports, margins and printBackground when generating consistent PDFs or screenshots.

Example use cases

  • Generate A4 invoices with branded header/footer and print-ready margins from HTML templates.
  • Take scheduled screenshots of landing pages to monitor visual drift or availability.
  • Scrape product listings that are populated by client-side JavaScript frameworks.
  • Automate login and data entry for legacy systems without APIs to reduce manual work.
  • Run headless browser tests in CI to validate critical user flows and visual snapshots.

FAQ

Puppeteer downloads a compatible Chromium by default, but you can configure it to use a system Chrome by setting the executablePath option.

How do I make PDFs include CSS backgrounds?

Enable printBackground: true in the PDF options and ensure styles are available before calling page.pdf, using waitUntil to wait for resources.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
puppeteer skill by aidotnet/moyucode | VeilStrat