← 返回 Skills 市场
web-screenshot
作者
jiaonvmo-maker
· GitHub ↗
· v1.1.3
· MIT-0
1512
总下载
0
收藏
7
当前安装
5
版本数
在 OpenClaw 中安装
/install web-screenshot
功能描述
🖼️ 任意URL全页面截图 + PDF导出工具。当用户要求截取网页、保存网页快照、截图存档、做QA对比、导出PDF时使用。支持百度/知乎/微信公众号/小红书等中文网站,自动等待JS渲染交付PNG/JPG/PDF。
使用说明 (SKILL.md)
When to Use(中文场景)
- 用户要求「截取某个网页」
- 用户要求「保存网页快照」「截图存档」
- 做 QA 对比、报告配图
- 需要把网页导出为 PDF
- 快速查看某个 URL 的视觉效果
- 登录后才可见的页面:不支持,详见 Limitations
适用场景示例
用户:"帮我截一下这个知乎回答"
用户:"把百度搜索结果截图发给我"
用户:"这个公众号文章截图存档"
用户:"把这个页面导出PDF"
用户:"全页面截图,要看到页面底部"
Tool
Playwright Node.js (via npx cache, no install needed)
Path: /root/.npm/_npx/e41f203b7505f1fb/node_modules
Quick Use — Shell Script
bash skills/web-screenshot/scripts/screenshot.sh \x3Curl> [output] [--fullpage|--pdf]
Examples:
# Basic screenshot (viewport)
bash scripts/screenshot.sh https://www.baidu.com /tmp/baidu.png
# Full-page screenshot (scrolls to capture entire page)
bash scripts/screenshot.sh https://example.com /tmp/full.png --fullpage
# PDF export
bash scripts/screenshot.sh https://example.com /tmp/page.pdf --pdf
Quick Use — Inline Node.js
NODE_PATH=/root/.npm/_npx/e41f203b7505f1fb/node_modules node -e "
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({ headless: true, args: ['--no-sandbox'] });
const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
await page.goto('YOUR_URL', { waitUntil: 'domcontentloaded', timeout: 15000 });
await page.waitForTimeout(2000);
await page.screenshot({ path: '/tmp/output.png', fullPage: false });
await browser.close();
})().catch(e => { console.error(e.message); process.exit(1); });
"
Parameters
| Parameter | Default | Notes |
|---|---|---|
| URL | required | Target URL, must be valid |
| output path | auto timestamp | /tmp/openclaw/screenshot_YYYYMMDD_HHMMSS.png |
--fullpage |
viewport only | Captures entire scrollable page |
--pdf |
screenshot | Exports as A4 PDF |
Tips
- For Chinese content: Playwright handles UTF-8 fine, no extra config needed
- For dynamic pages: increase
waitForTimeout(e.g.5000instead of2000) - For PDF:
printBackground: trueensures background colors/images are included - Output size: ~100-150KB for typical pages, ~300KB+ for full-page
Limitations
Login-gated / anti-automation pages: Some sites detect headless browsers and return blank content. Workaround:
- Use the site's API for data instead of screenshots
- Use a real logged-in browser for those pages
- Public static pages work fine
Known sites with issues: GitHub (sometimes), A2H Market (confirmed), sites with Cloudflare protection
安全使用建议
This skill appears to be what it claims — a Playwright-based screenshot/PDF tool — but before installing consider: (1) The script hardcodes NODE_PATH to /root/.npm/_npx/...; ensure Playwright is actually available there or modify the script to use npx or an explicit install. (2) There's no install spec — add or run npm/yarn/npx to provide Playwright if your environment lacks it. (3) The script suppresses node stderr (2>/dev/null), which hides errors — remove suppression when debugging. (4) Rendering arbitrary URLs runs untrusted page content inside a headless browser; run the skill in an isolated/sandboxed environment (container) to limit blast radius and potential browser-exploit risk. (5) Login-gated or anti-bot pages may fail as documented. If you need higher assurance, request an install spec (trusted release host) or update the script to fetch Playwright reliably rather than relying on a specific cache path.
功能分析
Type: OpenClaw Skill
Name: web-screenshot
Version: 1.1.3
The skill is a utility for capturing web screenshots and exporting PDFs using Playwright. The core logic in `scripts/screenshot.sh` generates a temporary Node.js script to automate a headless Chromium browser. While it uses a hardcoded path for Node modules (`/root/.npm/_npx/...`) and disables the browser sandbox (common in containerized environments), there is no evidence of data exfiltration, malicious execution, or prompt injection. The behavior is consistent with the stated purpose of the tool.
能力评估
Purpose & Capability
Name/description align with the included script and SKILL.md: both implement screenshot and PDF export using Playwright. Minor oddity: the SKILL.md and script assume a specific npx cache path (/root/.npm/_npx/...), which is not justified by the description and may not exist in target environments.
Instruction Scope
Runtime instructions and the shell script only generate a temporary Playwright JS file, launch a headless Chromium to visit the provided URL, and save a screenshot or PDF. The skill does not read unrelated system files or environment variables, nor does it send captured data to external endpoints.
Install Mechanism
There is no install specification; the SKILL.md claims 'via npx cache, no install needed' and the script sets NODE_PATH to a specific /root npx cache. This is fragile (may fail if Playwright isn't present at that path) but not inherently malicious.
Credentials
The skill requests no environment variables, no credentials, and no config paths. The only environment usage is a local NODE_PATH override inside the script (pointing to a cached npx path), which is internal to execution and not a secret.
Persistence & Privilege
The skill is not always-enabled, can be invoked by users, does not persist configuration or modify other skills, and only writes a temporary JS file and output screenshots/PDFs.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install web-screenshot - 安装完成后,直接呼叫该 Skill 的名称或使用
/web-screenshot触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.3
v1.1.3: 优化描述为功能导向,提升搜索排名;增加中文使用场景示例
v1.1.2
更新描述,聚焦商业服务能力(支持截图/PDF/全页截图,5元/张)
v1.1.1
v1.1.1 - 增加中文搜索标签,优化描述,提高发现率
v1.1.0
v1.1.0 - Add PDF export, full-page screenshot, shell wrapper script, error handling
v1.0.0
Initial release: Playwright Node.js headless screenshot for URLs
元数据
常见问题
web-screenshot 是什么?
🖼️ 任意URL全页面截图 + PDF导出工具。当用户要求截取网页、保存网页快照、截图存档、做QA对比、导出PDF时使用。支持百度/知乎/微信公众号/小红书等中文网站,自动等待JS渲染交付PNG/JPG/PDF。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1512 次。
如何安装 web-screenshot?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install web-screenshot」即可一键安装,无需额外配置。
web-screenshot 是免费的吗?
是的,web-screenshot 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
web-screenshot 支持哪些平台?
web-screenshot 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin, win32)。
谁开发了 web-screenshot?
由 jiaonvmo-maker(@jiaonvmo-maker)开发并维护,当前版本 v1.1.3。
推荐 Skills