Install
openclaw skills install chrome-screenshotClawHub Security found sensitive or high-impact capabilities. Review the scan results before using.
Take full-page screenshots of HTML files as PNG images using Chrome + puppeteer-core, without downloading any browser. Use when: (1) rendering a data visualization report and delivering it as an image, (2) converting an HTML page to a shareable screenshot, (3) the user asks for an image/PNG/PDF of an HTML report, (4) the canvas or browser tool is unavailable or impractical. Also generates PDF via Chrome's print-to-PDF.
openclaw skills install chrome-screenshotConverts HTML files to PNG screenshots (or PDF documents) using the system's installed Chrome via puppeteer-core.
/Applications/Google Chrome.app/Contents/MacOS/Google Chromenpm install -g puppeteer-corescripts/screenshot.shscripts/screenshot.sh <html-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:
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"
}
Chrome's print-to-PDF can generate PDFs instead:
bash scripts/screenshot.sh /path/to/report.html /tmp/output.pdf 420
http.server. Make sure python3 is available.