puppeteer-automation

puppeteer-automation is a skill for Claude Code from Mindrally/skills. It costs 35 tokens per session (2,256 once invoked), scanned A, original, Apache-2.0.

A guide to automating Chrome or Chromium with Puppeteer, a JavaScript library that controls a browser through code.

In plain words
What is it for?
Use it for web scraping, browser tests, screenshots, PDF files, JavaScript execution, and intercepting network requests.
Why use it?
It helps scripts handle page loading, dynamic content, errors, and browser cleanup consistently.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the mindrally-skills plugin — 217 skills shipped together

Good fit Use it for web scraping, browser tests, screenshots, PDF files, JavaScript execution, and intercepting network requests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mindrally/skills/puppeteer-automation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Mindrally/skills --skill puppeteer-automation
Clone the repo
git clone --depth 1 https://github.com/Mindrally/skills

Made for: Claude Code.

Or install mindrally-skills, the plugin that ships this one along with the rest of its 217 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for puppeteer-automation

README.md
[![agentmods](https://agentmods.dev/badge/skills/mindrally/skills/puppeteer-automation/github.svg)](https://agentmods.dev/skills/mindrally/skills/puppeteer-automation)
Your own site
<a href="https://agentmods.dev/skills/mindrally/skills/puppeteer-automation"><img src="https://agentmods.dev/badge/skills/mindrally/skills/puppeteer-automation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for puppeteer-automation

Your own site · 80×15
<a href="https://agentmods.dev/skills/mindrally/skills/puppeteer-automation"><img src="https://agentmods.dev/badge/skills/mindrally/skills/puppeteer-automation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,256 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 15 Sept 2026
  • Snyk pass 15 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.02256
Opus 5.5 $0.00014 $0.00902
Sonnet 5.5 $0.00007 $0.00451
Haiku 4.5 $0.00003 $0.00226

Measured 5d ago against content hash 75167de9cdd1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

puppeteer-automation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

puppeteer-automation/SKILL.md · 421 lines

How it starts

The opening of the file, as written. The whole thing — 421 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Puppeteer Browser Automation

You are an expert in Puppeteer, Node.js browser automation, web scraping, and building reliable automation scripts for Chrome and Chromium browsers.

Core Expertise

  • Puppeteer API and browser automation patterns
  • Page navigation and interaction
  • Element selection and manipulation
  • Screenshot and PDF generation
  • Network request interception
  • Headless and headful browser modes
  • Performance optimization and memory management
  • Integration with testing frameworks (Jest, Mocha)

Key Principles

  • Write clean, async/await based code for readability
  • Use proper error handling with try/catch blocks
  • Implement robust waiting strategies for dynamic content
  • Close browser instances properly to prevent memory leaks
  • Follow modular design patterns for reusable automation code
  • Handle browser context and page lifecycle appropriately

Project Setup

npm init -y
npm install puppeteer

Basic Structure

const puppeteer = require('puppeteer');

async function main() {
  const browser = await puppeteer.launch({
    headless: 'new',
    args: ['--no-sandbox', '--disable-setuid-sandbox']
  });

  try {
    const page = await browser.newPage();
    await page.goto('https://example.com');
    // Your automation code here
  } finally {
    await browser.close();
  }
}

main().catch(console.error);

Browser Launch Options

const browser = await puppeteer.launch({
  headless: 'new',  // 'new' for new headless mode, false for visible browser
  slowMo: 50,       // Slow down operations for debugging
  devtools: true,   // Open DevTools automatically
  args: [
    '--no-sandbox',
    '--disable-setuid-sandbox',
    '--disable-dev-shm-usage',
    '--disable-accelerated-2d-canvas',
    '--disable-gpu',
    '--window-size=1920,1080'
  ],
  defaultViewport: {
    width: 1920,
    height: 1080
  }
});
// Navigate to URL
await page.goto('https://example.com', {
  waitUntil: 'networkidle2',  // Wait until network is idle
  timeout: 30000
});

// Wait options:
// - 'load': Wait for load event
// - 'domcontentloaded': Wait for DOMContentLoaded event
// - 'networkidle0': No network connections for 500ms
// - 'networkidle2': No more than 2 network connections for 500ms

// Navigate back/forward
await page.goBack();
await page.goForward();

// Reload page
await page.reload({ waitUntil: 'networkidle2' });

Read the full file on GitHub · 421 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed · +3 lines 75167de9cdd1
  2. 1mo ago First seen · 418 lines · 35 tokens per session scan A 2181cd8b5a4a

Subscribe to this mod's changes

puppeteer-automation is a skill published in the GitHub repository Mindrally/skills (275 stars, last pushed 5d ago), licensed Apache-2.0. It adds 35 tokens to every session and 2,256 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

memstack-development-webapp-testing

Use when the user says 'write browser tests', 'test this page', 'playwright test', 'e2e test', 'end to end test', 'browser test', 'test the UI', or needs Playwright-based browser testing for a web application. Do NOT use for unit tests, API tests, or non-browser testing.

cwinvestments/memstack · 75 tokens

browser-test-loop

Use to actually verify a web change in a real browser instead of assuming it works — click through a flow, catch console errors, check a form submits, confirm a fix on the page. Trigger when a UI change needs proof, a bug only reproduces in the browser, or the user asks to test, check, or screenshot the running app.

OneWave-AI/claude-skills · 74 tokens

agent-e2e-test-specialist

Specialist subagent: Playwright, Cypress, and visual regression testing specialist. Use only when the user explicitly asks for E2E tests, browser test automation, or visual regression testing. Trigger phrases: E2E, end-to-end, Playwright, Cypress, visual regression, browser test, screenshot test, Percy, Chromatic.

travisjneuman/.claude · 76 tokens

qa-e2e

End-to-end tests with Playwright or Cypress. Trigger when the user wants to create user journey tests, UI integration tests, or browser automation.

christopherlouet/claude-base · 34 tokens

webapp-testing

Verify a web application works in a real browser with Playwright, covering navigation, form submission, interactions, console errors, screenshots, and responsive layout. Use when a UI feature needs end-to-end confirmation, a form flow must complete, or a change needs regression checking. Requires Node.js and installs…

KhaledSaeed18/dotclaude · 68 tokens

qa-chrome

Visual tests and browser debugging via Chrome. Use to test web pages, verify visual rendering, debug with the console, or automate browser actions. Trigger when the user mentions "visual test", "Chrome", "browser", "browser console", "DOM", "screenshot", "GIF".

christopherlouet/claude-base · 61 tokens