Puppeteer
A comprehensive skill catalog for AI agents
npx -y skills add G1Joshi/Agent-Skills --skill puppeteerAssembled 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
stealthplugins: If scraping, usepuppeteer-extra-plugin-stealthto 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 afinallyblock or via a test runner hook.