/install chrome-screenshot
Chrome Screenshot
Converts HTML files to PNG screenshots (or PDF documents) using the system's installed Chrome via puppeteer-core.
Prerequisites
- Chrome installed at
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome - puppeteer-core installed globally:
npm install -g puppeteer-core - Node.js
Script: scripts/screenshot.sh
scripts/screenshot.sh \x3Chtml-file> [output-path] [width]
html-file: Path to the HTML file (required)output-path: Output PNG path (default:/tmp/screenshot.png)width: Viewport width in px (default:420, good for mobile/微信)
The script:
- Starts a local HTTP server on port 8877
- Opens the HTML in headless Chrome via puppeteer-core
- Measures the full page height and captures a full-page screenshot
- Saves as PNG, cleans up the HTTP server
Usage
Screenshot an HTML report
bash scripts/screenshot.sh /path/to/report.html /tmp/output.png 420
Then send the image via the message tool:
{
"action": "send",
"media": "/tmp/output.png",
"message": "📊 Report Title"
}
PDF output (optional)
Chrome's print-to-PDF can generate PDFs instead:
bash scripts/screenshot.sh /path/to/report.html /tmp/output.pdf 420
Notes
- Do NOT use this skill for web browsing or page interaction—only for screenshotting locally authored HTML.
- The HTML file is served via Python's
http.server. Make surepython3is available. - For the best visual result in the screenshot, author the HTML with an explicit width matching the screenshot width.
- The HTTP server binds to 127.0.0.1 on port 8877.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install chrome-screenshot - After installation, invoke the skill by name or use
/chrome-screenshot - Provide required inputs per the skill's parameter spec and get structured output
What is Chrome Screenshot?
Take full-page screenshots of HTML files as PNG images using Chrome + puppeteer-core, without downloading any browser. Use when: (1) rendering a data visuali... It is an AI Agent Skill for Claude Code / OpenClaw, with 34 downloads so far.
How do I install Chrome Screenshot?
Run "/install chrome-screenshot" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Chrome Screenshot free?
Yes, Chrome Screenshot is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Chrome Screenshot support?
Chrome Screenshot is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Chrome Screenshot?
It is built and maintained by cclam5 (@cclam5); the current version is v1.0.0.