← Back to Skills Marketplace
cclam5

Chrome Screenshot

by cclam5 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
34
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install chrome-screenshot
Description
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...
README (SKILL.md)

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:

  1. Starts a local HTTP server on port 8877
  2. Opens the HTML in headless Chrome via puppeteer-core
  3. Measures the full page height and captures a full-page screenshot
  4. 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 sure python3 is 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.
Usage Guidance
Review the script before installing. It is intended for local HTML screenshots, but use it only with trusted filenames, output paths, and HTML content unless the argument handling is fixed. Avoid running it in directories containing sensitive files, and install puppeteer-core from a trusted, preferably pinned source.
Capability Analysis
Type: OpenClaw Skill Name: chrome-screenshot Version: 1.0.0 The skill uses `scripts/screenshot.sh` to render HTML via a local Python server and headless Chrome. It is classified as suspicious due to a vulnerability where shell arguments (such as width and filename) are interpolated directly into a `node -e` JavaScript string without sanitization, potentially allowing arbitrary code execution if the agent processes untrusted input. Furthermore, the script's use of `python3 -m http.server` exposes the entire directory containing the target HTML file on a local port (8877), and Chrome is launched with the high-risk `--no-sandbox` flag.
Capability Assessment
Purpose & Capability
The skill is coherently designed to render local HTML to PNG/PDF, but the implementation builds an inline Node script with unescaped user-provided arguments, creating a material code-execution risk.
Instruction Scope
The SKILL.md scope is narrow and says to use it only for screenshotting locally authored HTML, not for web browsing or page interaction.
Install Mechanism
There is no install spec, but the instructions require external local dependencies such as Node.js, Python, Chrome, and a globally installed, unpinned puppeteer-core package.
Credentials
The script starts a localhost HTTP server for the HTML directory and launches headless Chrome with sandbox-disabling flags; this is purpose-aligned but should be used only with trusted local HTML and directories.
Persistence & Privilege
No credential use or persistent background behavior is shown; the HTTP server is intended to be killed on script exit.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install chrome-screenshot
  3. After installation, invoke the skill by name or use /chrome-screenshot
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of chrome-screenshot skill. - Converts local HTML files to PNG screenshots or PDF documents using puppeteer-core with the system’s installed Chrome. - Provides a shell script for easy usage, handling local HTTP serving and automated screenshot/PDF capture. - Designed for rendering data visualization reports and sharing HTML pages as images or PDFs. - Supports specifying output path and viewport width (default optimized for mobile/WeChat). - Requires Chrome, puppeteer-core, Node.js, and Python 3.
Metadata
Slug chrome-screenshot
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

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.

💬 Comments