Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/ryanzhao1011/workframe/screenshotnpx skills add ryanzhao1011/workframe --skill screenshotgit clone --depth 1 https://github.com/ryanzhao1011/workframeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ryanzhao1011/workframe/screenshot)<a href="https://agentmods.dev/skills/ryanzhao1011/workframe/screenshot"><img src="https://agentmods.dev/badge/skills/ryanzhao1011/workframe/screenshot.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00080 | $0.04026 |
| Opus 5 | $0.00040 | $0.02013 |
| Sonnet 5 | $0.00016 | $0.00805 |
| Haiku 4.5 | $0.00008 | $0.00403 |
Grade D, and why
screenshot scanned grade D with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
node "$(cat .claude/workframe-state/plugin-root.txt)/skills/screenshot/scripts/screenshot.js" --config <path/to/config.json> Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
- ❌ 不要在 screenshot.js 内 process.exit 之前 `rm -rf` 输出目录(破坏调用方拿走 PNG 的语义) How it starts
The opening of the file, as written. The whole thing — 274 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Screenshot Skill — 通用 HTML 截图
环境依赖:Node.js 18+ · puppeteer-core(首次运行自动装到
tmp/screenshot-deps/)· Edge / Chrome / Chromium(系统已有任一即可,跨平台自动探测)
1. 定位
只做一件事:把 HTML 或本地 URL 渲染成 PNG。
做:
- 启动 headless 浏览器
- 设置 viewport
- 打开 source(本地 HTML / file:// URL)
- 按配置依次执行
setup_js(可选 raw JS hook)→wait_selector/wait_ms→ 截图(全页或selector) - 自适应宽度(
fit_to_selector自动扩 viewport,源自原 flowchart-screenshot 能力) - 输出 PNG 到
tmp/screenshots/<task-id>/
不做:
- 不上传任何外部文档系统(属项目配备的发布 skill,如
feishu-publish) - 不生成 PRD/spec / 不写需求文档(属
prd-writer/requirement-analysis) - 不长期保留图片——任务结束
tmp/整体清理;调用方需要长期保留则显式移到assets/ - 不实现业务交互 DSL——不接受
actions: [openWizard, goToStep:2]这类业务步骤抽象。复杂交互让调用方在setup_js里写 raw JS(可访问page和sleep)
定位澄清(与 Claude in Chrome 互补,勿混):本 skill = HTML / URL → 静态 PNG 归档(headless 出图,供入库 / 发布引用);交互式页面的实时调试核对(边改边看视觉 / 动效 / 交互)走 Claude in Chrome 扩展 + 本地 http server 流程(见
html-demo/prd-writer/html-prototype.md)。两者互补:前者沉淀静态图,后者驱动实时调试,不互相替代。
2. 输入输出契约
2.1 配置文件(JSON)
示例中
<iteration-dir>占位符 = 调用方的子需求目录(定义见prd-writer/html-prototype.md「落盘路径」);不经 prd-writer 直接调用时,source填实际 HTML 路径即可。
{
"source": "<iteration-dir>/prototypes/index.html",
"task_id": "T-20260429-001",
"viewport": { "width": 1440, "height": 900, "deviceScaleFactor": 2 },
"captures": [
{
"name": "01-entry",
"wait_ms": 800
},
{
"name": "02-step1",
"setup_js": "await page.evaluate(() => openWizard()); await sleep(500);"
},
{
"name": "03-step2-upload",
"setup_js": "await page.evaluate(() => goToStep(1)); await sleep(400);"
},
{
"name": "00-flowchart",
"selector": ".mermaid svg",
"fit_to_selector": ".mermaid svg",
"wait_selector": ".mermaid svg",
"wait_timeout": 45000,
"wait_ms": 2500
}
]
}
2.2 字段说明
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
source |
string | △ | 默认页面:HTML 文件路径(相对 cwd 或绝对)/ file:// URL / http(s):// URL。与 captures[].source 二选一——两者皆无时该 capture 报错 既无顶层 config.source,也无 cap.source |
task_id |
string | 否 | 输出子目录名;省略时用 YYYYMMDD-HHmmss-<8位hash> |
viewport |
object | 否 | 默认 {width:1440,height:900,deviceScaleFactor:2} |
captures[] |
list | 是 | 每项一张截图。字段名就是 captures——写成 items 之类不报错,静默产出 0 张图 |
captures[].name |
string | 是 | 输出文件名(不含 .png) |
captures[].source |
string | △ | 覆盖顶层 source(与上一次不同则重新 goto)。每个 Mermaid 块各渲一个 HTML 时用它,此时顶层 source 可省略 |
captures[].selector |
string | 否 | CSS 选择器;省略则全页 (fullPage: true) |
captures[].setup_js |
string | 否 | raw JS(async body),打开页面后、截图前执行;可访问 page 和 sleep(ms) |
captures[].wait_selector |
string | 否 | 截图前等待该 selector 出现(page.waitForSelector) |
captures[].wait_timeout |
number | 否 | wait_selector 超时(默认 30000ms) |
captures[].wait_ms |
number | 否 | 截图前固定等待(默认 0) |
captures[].fit_to_selector |
string | 否 | 测量该 selector bounding box 后,扩大 viewport 重新渲染(自适应宽度) |
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 274 lines · 80 tokens per session scan D 9f0eae49feb2
screenshot is a skill published in the GitHub repository ryanzhao1011/workframe (4 stars, last pushed 17d ago), licensed MIT. It adds 80 tokens to every session and 4,026 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it D with 2 findings (reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
feature-acceptance
研发提测后接管浏览器,对照 PRD(必给)+ HTML 原型(自动找)逐项验收线上实现,产出差异清单(实现 / 部分实现 / 未实现 / 与原型或 PRD 不一致)+ 截图证据 + 阻塞问题排序。Use whenever PM 说「验收 XX」「跑一下 XX」「研发提测了」「对一下需求和线上」「点一下 XX 看符不符合需求」「看哪些实现了哪些没做」「上线前 check」「灰度验收」「acceptance」「QA check」,or 给出 PRD 路径 + 线上 URL 让 Claude 走流程。也适用于 PM 想自己点某功能、判断和需求差异时陪她一起跑。区别于 prd skill:本 skill 验证线上现状,不修改 PRD…
browser-qa
Use to exercise the running app in a real browser — after UI changes, before ship, or when the user asks to QA the site, smoke-test a branch, or check "does it actually work". Drives affected routes headlessly via Playwright, captures console errors, failed requests, and screenshots, and produces a report with a…
html-prototype
Generate HTML prototypes (single-file, browser-openable) for product mockups using the user's design system — fonts, color scales, radii, shadows, components, all driven by a tokens.css file. Use when the user asks to make a 原型 / mockup / HTML 设计图 / 设计图给前端 for a PRD module, OR redesign an existing prototype. Output…
prd
Write, rewrite, polish, restructure, or review product requirements documents (PRDs). Use whenever a task touches a 需求文档 / PRD —— 新写、重构、统一口径、补页面结构 / 字段 / 规则 / 边界 / 异常处理、加指标口径定义、按数据看板或某类骨架组织章节,或把讨论 / 会议记录整理成正式产品文档。Trigger even when the user does NOT say "写需求" —— e.g. "把这个加到…
ui-walkthrough
把一份 UI 设计 HTML 和研发上线的页面,同视口、同状态截图比对 + 读 computed style 实锤,产出 UI 还原度差异清单(结构 / 组件 / 颜色 / 字体 / 圆角 / 图标 / 间距 七维,每条标明设计值 vs 线上值)。Use whenever PM 说「UI 走查」「走查一下 UI」「对一下 UI」「UI 还原度」「还原度走查」「线上跟设计稿对一下」「前端还原得对不对」「页面跟这份 HTML 对一下」「UI 验收」「设计还原走查」,或给出 设计 HTML 路径 + 线上 URL 让 Claude 比视觉差异。区别于 feature-acceptance skill:那个验业务逻辑 / 字段 / 操作…
daily-research
Daily research briefing. When the user says "今天的调研""跑一份调研简报""每日调研""今日行业动态""扫一下最近有什么新东西""补一下今天的简报",或在会话里要求生成 / 补一份当日情报简报时,触发本 skill。它在当前会话里实时联网调研用户配置的领域(默认是 AI 应用层 / 框架 / 论文 / 模型 / 研究员与厂商落地动态),产出一份中文简报写入 /YYYY-MM-DD.md。即使用户没说"用 skill"、只说"今天调研呢""帮我看下今天有什么进展"也要触发。本 skill 只生成简报,不自动归档。.