capture-screen

capture-screen is a command for coding agents from RaNDoM6913/claude-code-superkit. It costs 13 tokens per session (1,945 once invoked), scanned A, original, MIT.

A command that captures a running web page or selected React element as a PNG image for use on a 3D model screen.

In plain words
What is it for?
It is for creating screen textures from app routes or marked elements, with device-specific dimensions and verified image sizes.
Why use it?
It removes the manual work of taking correctly sized screenshots and checking that the development server and capture route are ready.

Command

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.

agentmods
npx agentmods add commands/random6913/claude-code-superkit/capture-screen
Clone the repo
git clone --depth 1 https://github.com/RaNDoM6913/claude-code-superkit

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 capture-screen

README.md
[![agentmods](https://agentmods.dev/badge/commands/random6913/claude-code-superkit/capture-screen.svg)](https://agentmods.dev/commands/random6913/claude-code-superkit/capture-screen)
Your own site
<a href="https://agentmods.dev/commands/random6913/claude-code-superkit/capture-screen"><img src="https://agentmods.dev/badge/commands/random6913/claude-code-superkit/capture-screen.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,945 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin unknown 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 $0.00013 $0.01945
Opus 5 $0.00006 $0.00972
Sonnet 5 $0.00003 $0.00389
Haiku 4.5 $0.00001 $0.00194

Measured today against content hash ce6f84e7149b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

capture-screen scanned grade A 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 today.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -o /dev/null -w "%{http_code}" "http://localhost:<PORT>"
packages/frontend-3d/commands/capture-screen.md · 167 lines

How it starts

The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Capture Screen PNG

Role

Capture a running app screen as a high-resolution PNG in public/textures/ for use as a texture on a 3D model: a full-viewport screenshot of a URL/route, or a single element marked data-screen-id (element capture runs through the Step 5 script).

Hard Rules

  1. Playwright CLI: use ONLY these verified flags — --viewport-size, --device, --full-page, --wait-for-timeout. A --device-scale-factor flag DOES NOT exist; for DPR control beyond a device preset use the Step 5 script.
  2. Dev server not responding → STOP and tell the user to start it. Never screenshot a dead server.
  3. No capture route found → ASK the user for the route. Never assume /capture exists.
  4. Defaults: iPhone 16 Pro Max — viewport 440x956, scale 2x (expected output 880x1912), corner radius R=124 (62pt × 2). Another device → use its Resolution Guide row; non-iPhone corner radius → ask the user or skip rounding, never guess.
  5. Before reporting done, verify the PNG's real dimensions (Step 7); if they differ from expected, report Status: MISMATCH — do not claim OK.

Prerequisites

  • Dev server running (Vite, Next.js, etc.)
  • playwright installed (npx playwright install chromium)
  • sharp installed (only for rounded corners, Step 6)

Resolution Guide

Device Viewport @2x Output
iPhone 15 Pro 393x852 786x1704
iPhone 16 Pro Max 440x956 880x1912
iPad Pro 11" 834x1194 1668x2388
MacBook Pro 14" 1512x982 3024x1964

Steps

1. Resolve inputs

  • <PORT> = $ARGUMENTS if a port number was given, else 3000. Substitute this value everywhere <PORT> appears below.
  • Target device: the default from Hard Rule 4, unless the user named another Resolution Guide device.
  • Done when: <PORT>, viewport, and expected output size are fixed.

2. Check dev server

curl -s -o /dev/null -w "%{http_code}" "http://localhost:<PORT>"
  • Status 200–399 → continue. Anything else, or no output → STOP (Hard Rule 2): "Dev server not responding on port — start it and re-run /capture-screen."
  • Done when: a 2xx/3xx status was actually observed.

Read the full file on GitHub · 167 lines

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. today First seen · 167 lines · 13 tokens per session scan A ce6f84e7149b

Subscribe to this mod's changes

capture-screen is a command published in the GitHub repository RaNDoM6913/claude-code-superkit (2 stars, last pushed 1mo ago), licensed MIT. It adds 13 tokens to every session and 1,945 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.