← 返回 Skills 市场
Script:
34
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (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:
- 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.
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install chrome-screenshot - 安装完成后,直接呼叫该 Skill 的名称或使用
/chrome-screenshot触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
常见问题
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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 34 次。
如何安装 Chrome Screenshot?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install chrome-screenshot」即可一键安装,无需额外配置。
Chrome Screenshot 是免费的吗?
是的,Chrome Screenshot 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Chrome Screenshot 支持哪些平台?
Chrome Screenshot 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Chrome Screenshot?
由 cclam5(@cclam5)开发并维护,当前版本 v1.0.0。
推荐 Skills