用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/SocketDev/socket-btm --skill rendering-chromium-to-png命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | rendering-chromium-to-png |
| description | Render pages or extension popups to PNG and inspect pixels to catch real UI regressions. |
| user-invocable | true |
| allowed-tools | Read, Bash(node:*), Bash(pnpm exec playwright:*), Bash(ls:*) |
| model | claude-haiku-4-5 |
| context | fork |
| metadata | {"internal":true} |
Type-checking and tests verify code correctness, not feature correctness — a UI can be
green on tsc/vitest and render broken (empty section, stuck spinner, wrong colors, a
throw that aborts the render partway). This skill gives you eyes: render to a PNG, then
Read the PNG so the actual pixels enter context. It's the HOW behind the fleet's
"verify rendered output before commit" rule.
For a locally served app, run its existing development command through the package.json script
that launches it through portless, then pass the generated HTTPS .localhost URL to this
script. Do not invent a fixed port or a second server command. Use file: only for a genuinely
static page.
node .claude/skills/fleet/rendering-chromium-to-png/screenshot.mts <url|file> \
[--out p.png] [--width 580] [--height 0=full] [--theme dark|light] [--wait 2500] [--full]
Then Read the --out PNG. Defaults: 580px wide, full-page, dark theme, 2.5s settle.
node .claude/skills/fleet/rendering-chromium-to-png/screenshot.mts \
--extension <unpacked-dir> [--page popup.html] [--out p.png] [--width 580] [--theme dark|light]
This loads the extension with its REAL powers — background service worker, content scripts,
chrome.* APIs — via launchPersistentContext + channel: 'chromium' (the documented way
to run extensions in headless Chromium; plain headless silently ignores --load-extension).
It resolves the extension id from the background service worker, navigates to
chrome-extension://<id>/<page> (popup by default), and screenshots it. Use this to see an
extension popup as it actually renders in-browser, not a static file:// approximation.
Read that PNG path. The harness decodes the image; the rendered pixels go into your
context. You observe the UI the same as a human looking at a screenshot.--wait. Each state = its own screenshot.?preview mock, if the app has one, is
still mock data; the layout/colors/bugs are real, the content isn't.)evaluate() may throw "Service worker restarted"; keep interactions short.node_modules/.bin/playwright install chromium first.playwright-core (fleet catalog devDep) drives a headless Chromium. If the binary is
missing the script says so — install it with node_modules/.bin/playwright install chromium.