screenshot

screenshot is a skill for Claude Code from ryanzhao1011/workframe. It costs 173 tokens per session (4,040 once invoked), scanned C, original, MIT.

A tool that opens HTML or a local web address in a browser and saves the result as a PNG screenshot.

In plain words
What is it for?
It sets the viewport, runs optional setup code, waits for a page or element, and captures a full page or selected area.
Why use it?
It provides a repeatable way to capture pages for records or publishing without manually taking screenshots.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Part of the core plugin — 36 skills, 4 agents, 12 hooks shipped together

Good fit It sets the viewport, runs optional setup code, waits for a page or element, and captures a full page or selected area.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ryanzhao1011/workframe/screenshot
Install

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.

Any agent
npx skills add ryanzhao1011/workframe --skill screenshot
Clone the repo
git clone --depth 1 https://github.com/ryanzhao1011/workframe

Made for: Claude Code.

Or install core, the plugin that ships this one along with the rest of its 36 skills, 4 agents, 12 hooks.

Wrote 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.

agentmods badge for screenshot

README.md
[![agentmods](https://agentmods.dev/badge/skills/ryanzhao1011/workframe/screenshot/github.svg)](https://agentmods.dev/skills/ryanzhao1011/workframe/screenshot)
Your own site
<a href="https://agentmods.dev/skills/ryanzhao1011/workframe/screenshot"><img src="https://agentmods.dev/badge/skills/ryanzhao1011/workframe/screenshot/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for screenshot

Your own site · 80×15
<a href="https://agentmods.dev/skills/ryanzhao1011/workframe/screenshot"><img src="https://agentmods.dev/badge/skills/ryanzhao1011/workframe/screenshot.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 173 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,040 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00173 $0.04040
Opus 5.5 $0.00069 $0.01616
Sonnet 5.5 $0.00035 $0.00808
Haiku 4.5 $0.00017 $0.00404

Measured 3d ago against content hash 8d6bf1a9f9c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

screenshot scanned grade C with 1 finding 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 3d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/screenshot.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

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 的语义)
plugins/core/skills/screenshot/SKILL.md · 269 lines

How it starts

The opening of the file, as written. The whole thing — 269 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 重新渲染(自适应宽度)

Read the full file on GitHub · 269 lines

Files

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.

Changes

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.

  1. 3d ago Changed 8d6bf1a9f9c9
  2. 1mo ago Changed · -5 lines · +93 tokens per session scan D → C 960d0ef8b073
  3. 3mo ago First seen · 274 lines · 80 tokens per session scan D 9f0eae49feb2

Subscribe to this mod's changes

screenshot is a skill published in the GitHub repository ryanzhao1011/workframe (9 stars, last pushed 5d ago), licensed MIT. It adds 173 tokens to every session and 4,040 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

screenshot compared with skills from other repositories

screenshot next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
screenshotryanzhao1011/workframeSkill95d agoMITC173Claude Code
feature-acceptancemayuemarsha-del/pm-skillsSkill56mo agoMITA192Claude Code
qaFlorianBruniaux/claude-code-pluginsSkill475d agoMITA37Claude Code
browser-qaAbdurRafay2004/handoffSkill613d agoMITA85Claude Code
pentest-webfatihkan/badiSkill81mo agoMITA75Claude Code
browser-useKripu77/software-factorySkill62mo agoMITA40Claude Code
browserspencermarx/open-code-reviewSkill39519d agoApache-2.0A15Claude Code