puppeteer-screenshots
Capture webpage screenshots using Puppeteer in a managed queue with configurable concurrency and timeout. Use when you need to automate page thumbnail generation, capture visual snapshots of URLs, or manage a screenshot pipeline with retry logic. Triggers include "capture screenshot", "take thumbnail", "screenshot queue", "Puppeteer capture", or any task involving automated webpage screenshots.
Best use case
puppeteer-screenshots is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Capture webpage screenshots using Puppeteer in a managed queue with configurable concurrency and timeout. Use when you need to automate page thumbnail generation, capture visual snapshots of URLs, or manage a screenshot pipeline with retry logic. Triggers include "capture screenshot", "take thumbnail", "screenshot queue", "Puppeteer capture", or any task involving automated webpage screenshots.
Teams using puppeteer-screenshots should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/puppeteer-screenshots/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How puppeteer-screenshots Compares
| Feature / Agent | puppeteer-screenshots | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Capture webpage screenshots using Puppeteer in a managed queue with configurable concurrency and timeout. Use when you need to automate page thumbnail generation, capture visual snapshots of URLs, or manage a screenshot pipeline with retry logic. Triggers include "capture screenshot", "take thumbnail", "screenshot queue", "Puppeteer capture", or any task involving automated webpage screenshots.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# puppeteer-screenshots
Managed Puppeteer screenshot queue for capturing webpage thumbnails.
## When to use
- Generating page thumbnails for saved bookmarks
- Capturing visual snapshots of URLs in a queue
- Managing multiple concurrent Puppeteer workers
- Handling screenshot failures with retry logic
## Architecture
The screenshot system runs as part of the bookmark-manager process:
```
POST /api/bookmarks
|
v
ScreenshotQueue.enqueue(bookmarkId)
|
v
Queue (concurrency=SCREENSHOT_CONCURRENCY)
|
v
Puppeteer.launch() -> page.goto(url, {waitUntil:'networkidle2'})
|
v
page.screenshot({path, type:'jpeg', quality:80, clip:{width:1280,height:800}})
|
v
UPDATE bookmarks SET screenshot_status='done', screenshot_path=...
```
## Configuration
| Variable | Default | Description |
|---|---|---|
| `SCREENSHOT_ENABLED` | `1` | Enable/disable entire pipeline (0/1) |
| `SCREENSHOT_CONCURRENCY` | `2` | Number of parallel Puppeteer instances |
| `SCREENSHOT_TIMEOUT_MS` | `15000` | Navigation timeout per page in ms |
| `PUPPETEER_EXECUTABLE_PATH` | (bundled) | Path to system Chromium binary |
## Queue API
### Check queue status
```bash
GET /api/screenshot/queue
```
Response:
```json
{
"pending": 8,
"active": 2,
"failed": 3,
"completed": 231,
"workers": 2
}
```
### Retry all failed screenshots
```bash
POST /api/screenshot/retry
```
### Re-queue a single bookmark
```bash
POST /api/bookmarks/:id/screenshot
```
## Screenshot status values
| Status | Meaning |
|---|---|
| `pending` | Queued, not yet processing |
| `capturing` | Puppeteer is currently navigating the page |
| `done` | Screenshot saved successfully |
| `failed` | Timed out, navigation error, or page load failed |
## Docker - Chromium setup
The Dockerfile installs Chromium via `apk`:
```dockerfile
RUN apk add --no-cache chromium
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
```
Disable Puppeteer's bundled Chromium download to save image size:
```dockerfile
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
```
## Common errors
### Navigation timeout exceeded
Page did not reach `networkidle2` within `SCREENSHOT_TIMEOUT_MS`. Causes:
- Heavy JavaScript on the page
- External resources blocking load
- Network unavailable from container
Fix: Increase `SCREENSHOT_TIMEOUT_MS` or use `waitUntil:'load'` instead.
### net::ERR_CONNECTION_REFUSED
Target URL is not publicly accessible from the container. Private/internal URLs will fail.
### Running without sandbox
In some Docker environments, Chromium requires `--no-sandbox`. Set `PUPPETEER_NO_SANDBOX=1` to add this flag. Only use in trusted environments.
## Storage
Screenshots stored as JPEG (quality 80) at `DATA_DIR/screenshots/{bookmarkId}.jpg`. Served by Express at `/screenshots/:filename` with auth check. Approximate size: 50-200 KB per screenshot. Monitor disk usage if you have many bookmarks.Related Skills
Skill: Uptime Monitoring
## Overview
Skill: Status Page
## Overview
Skill: unit-conversion
## Overview
Skill: recipe-scaler
## Overview
reading-list
Operate the reading-list API to save, manage, tag, search, and export articles.
email-digest
Configure, test, and troubleshoot the reading-list daily email digest delivered via nodemailer.
websocket-realtime
Use the WebSocket connection in poll-builder to receive live vote updates. Use when you need to stream real-time poll results, monitor a poll for new votes, or build a live dashboard. Triggers include "live results", "real-time updates", "stream votes", "watch poll", or "WebSocket".
poll-builder
Self-hosted poll creation tool with real-time results. Use when you need to create a poll, check vote counts, close a poll, export results, or get the shareable link for a poll. Triggers include "create poll", "vote", "poll results", "survey", "collect votes", "share poll", or any task involving polling or voting.
Skill: personal-finance
## Overview
Skill: csv-import
## Overview
Skill: Syntax Highlighting
## Purpose
Skill: Pastebin Core
## Purpose