agentsclimarketplace

Puppeteer

Skill G1Joshi/Agent-Skills/skills/testing/puppeteer

A comprehensive skill catalog for AI agents

Install
npx -y skills add G1Joshi/Agent-Skills --skill puppeteer

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 10 stars10 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Puppeteer headless Chrome automation. Use for browser automation.

SKILL.md

1.6 KB, as published. Nobody here has run it

Puppeteer

Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol.

When to Use

  • Chrome Specific: If testing cross-browser isn't a priority (or you only care about Chromium).
  • Web Scraping: Excellent for scraping SPAs because it renders JS.
  • PDF/Screenshots: The industry standard for "HTML to PDF" generation.

Quick Start

import puppeteer from "puppeteer";

(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.goto("https://developer.chrome.com/");
  await page.pdf({ path: "dv.pdf", format: "A4" });

  await browser.close();
})();

Core Concepts

DevTools Protocol (CDP)

Puppeteer talks directly to Chrome via CDP. This allows deeper control (intercepting network at a low level, CPU profiling) than WebDriver.

Headless by Default

Puppeteer launches Chrome in headless mode by default. Use headless: false to see it.

Best Practices (2025)

Do:

  • Use page.waitForSelector: Before clicking or scraping.
  • Use stealth plugins: If scraping, use puppeteer-extra-plugin-stealth to avoid detection.
  • Use Playwright: Consider switching. Playwright is maintained by the team that built Puppeteer (after moving to Microsoft) and has a better API.

Don't:

  • Don't leak browsers: Always ensure browser.close() is called in a finally block or via a test runner hook.

References

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.