Automate Chrome and Chromium with Puppeteer for scraping, testing, screenshots, and browser workflows.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install puppeteer或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install puppeteer⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/puppeteer/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: Puppeteer slug: puppeteer version: 1.0.0 homepage: https://clawic.com/skills/puppeteer description: Automate Chrome and Chromium with Puppeteer for scraping, testing, screenshots, and browser workflows. metadata: {"clawdbot":{"emoji":"🎭","requires":{"bins":["node"]},"os":["linux","darwin","win32"]}} ---
On first use, read setup.md for integration guidelines.
User needs browser automation: web scraping, E2E testing, PDF generation, screenshots, or any headless Chrome task. Agent handles page navigation, element interaction, waiting strategies, and data extraction.
Scripts and outputs in ~/puppeteer/. See memory-template.md for structure.
~/puppeteer/
├── memory.md # Status + preferences
├── scripts/ # Reusable automation scripts
└── output/ # Screenshots, PDFs, scraped data
| Topic | File | |-------|------| | Setup process | setup.md | | Memory template | memory-template.md | | Selectors guide | selectors.md | | Waiting patterns | waiting.md |
Never click or type immediately after navigation. Always wait for the element:
await page.waitForSelector('#button');
await page.click('#button');
Clicking without waiting causes "element not found" errors 90% of the time.
Prefer stable selectors in this order:
[data-testid="submit"] — test attributes (most stable)#unique-id — IDsform button[type="submit"] — semantic combinations.class-name — classes (least stable, changes often)Avoid: div > div > div > button — breaks on any DOM change.
After clicks that navigate, wait for navigation:
await Promise.all([
page.waitForNavigation(),
page.click('a.next-page')
]);
Without this, the script continues before the new page loads.
Always set viewport for consistent rendering:
await page.setViewport({ width: 1280, height: 800 });
Default viewport is 800x600 — many sites render differently or show mobile views.
Dismiss dialogs before they block interaction:
page.on('dialog', async dialog => {
await dialog.dismiss(); // or dialog.accept()
});
Unhandled dialogs freeze the script.
Always wrap in try/finally:
const browser = await puppeteer.launch();
try {
// ... automation code
} finally {
await browser.close();
}
Leaked browser processes consume memory and ports.
Add delays between requests to avoid blocks:
await page.waitForTimeout(1000 + Math.random() * 2000);
Hammering sites triggers CAPTCHAs and IP bans.
page.click() on invisible element → fails silently, use waitForSelector with visible: truepage.evaluate() returns undefined → cannot return DOM nodes, only serializable dataheadless: 'new' or set user agentpage.waitForNavigation() or data is lostpage.evaluateHandle() to pierce shadow rootsuserDataDir for session persistenceData that stays local:
This skill does NOT:
Install with clawhub install if user confirms:
playwright — Cross-browser automation alternativechrome — Chrome DevTools and debuggingweb — General web developmentclawhub star puppeteerclawhub sync安装 Puppeteer 后,可以对 AI 说这些话来触发它
Help me get started with Puppeteer
Explains what Puppeteer does, walks through the setup, and runs a quick demo based on your current project
Use Puppeteer to automate Chrome and Chromium with Puppeteer for scraping, testing, ...
Invokes Puppeteer with the right parameters and returns the result directly in the conversation
What can I do with Puppeteer in my developer & devops workflow?
Lists the top use cases for Puppeteer, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/puppeteer/ 目录(个人级,所有项目可用),或 .claude/skills/puppeteer/(项目级)。重启 AI 客户端后,用 /puppeteer 主动调用,或让 AI 根据上下文自动发现并使用。
Puppeteer 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Puppeteer 可免费安装使用。请查阅仓库了解许可证信息。
Automate Chrome and Chromium with Puppeteer for scraping, testing, screenshots, and browser workflows.
Puppeteer 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Puppeteer
Identifies repetitive steps in your workflow and sets up Puppeteer to handle them automatically