
Puppeteer
- 116 installs
- 84 repo stars
- Updated January 28, 2026
- aidotnet/moyucode
Automate headless browser flows—navigation, scraping, screenshots, and form actions—for E2E checks, data extraction, or agent tools that must interact with real web UIs.
About
Skill for integrating Puppeteer browser automation: configure headless Chromium, script navigation and DOM interaction, capture artifacts, and embed reliable web UI automation in tests, agents, or data-collection workflows.
- Headless browser launch patterns
- Selector and wait strategies
- Screenshot and PDF capture
- Scraping with politeness controls
- CI-friendly browser setup
Puppeteer by the numbers
- 116 all-time installs (skills.sh)
- Ranked #722 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aidotnet/moyucode --skill puppeteerAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 116 |
|---|---|
| repo stars | ★ 84 |
| Last updated | January 28, 2026 |
| Repository | aidotnet/moyucode ↗ |
What it does
Automate headless browser flows—navigation, scraping, screenshots, and form actions—for E2E checks, data extraction, or agent tools that must interact with real web UIs.
Files
Puppeteer Tool
Description
Headless Chrome/Chromium automation for PDF generation, screenshots, web scraping, and testing.
Source
- Repository: puppeteer/puppeteer
- License: Apache-2.0
- Maintainer: Google
Installation
npm install puppeteerUsage Examples
Generate PDF from HTML
import puppeteer from 'puppeteer';
async function generatePDF(html: string, outputPath: string) {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setContent(html, { waitUntil: 'networkidle0' });
await page.pdf({
path: outputPath,
format: 'A4',
margin: { top: '20mm', right: '20mm', bottom: '20mm', left: '20mm' },
printBackground: true,
});
await browser.close();
}
// Usage
const html = `
<html>
<head><style>body { font-family: Arial; }</style></head>
<body><h1>Invoice #001</h1><p>Total: $100.00</p></body>
</html>
`;
await generatePDF(html, 'invoice.pdf');Take Screenshot
async function takeScreenshot(url: string, outputPath: string) {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setViewport({ width: 1920, height: 1080 });
await page.goto(url, { waitUntil: 'networkidle2' });
await page.screenshot({
path: outputPath,
fullPage: true,
type: 'png',
});
await browser.close();
}Web Scraping
async function scrapeData(url: string) {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto(url, { waitUntil: 'domcontentloaded' });
const data = await page.evaluate(() => {
const items = document.querySelectorAll('.product');
return Array.from(items).map(item => ({
title: item.querySelector('h2')?.textContent?.trim(),
price: item.querySelector('.price')?.textContent?.trim(),
}));
});
await browser.close();
return data;
}Form Automation
async function submitForm(url: string, formData: Record<string, string>) {
const browser = await puppeteer.launch({ headless: false });
const page = await browser.newPage();
await page.goto(url);
// Fill form fields
for (const [selector, value] of Object.entries(formData)) {
await page.type(selector, value);
}
// Submit
await page.click('button[type="submit"]');
await page.waitForNavigation();
await browser.close();
}PDF Options
interface PDFOptions {
path?: string;
scale?: number; // 0.1 - 2, default 1
displayHeaderFooter?: boolean;
headerTemplate?: string;
footerTemplate?: string;
printBackground?: boolean;
landscape?: boolean;
pageRanges?: string; // '1-5, 8, 11-13'
format?: 'Letter' | 'Legal' | 'A4' | 'A3';
width?: string;
height?: string;
margin?: { top, right, bottom, left };
}Tags
browser, pdf, screenshot, automation, scraping
Compatibility
- Codex: ✅
- Claude Code: ✅