ui-preview

A tool guide for taking screenshots of a locally running web interface with Chrome controlled by code. It is set up for the tingly-box frontend in mock mode, so the interface can be viewed without a real browser session.

In plain words
What is it for?
Installing the frontend dependencies, starting the mock interface, capturing screenshots, and visually checking pages or components.
Why use it?
It provides visual evidence that a frontend change looks correct and helps catch layout problems that code or automated tests may miss.

Skill for Claude CodeCodex

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 skills/tingly-dev/tingly-box/ui-preview
Any agent
npx skills add tingly-dev/tingly-box --skill ui-preview
Clone the repo
git clone --depth 1 https://github.com/tingly-dev/tingly-box

Made for: Claude Code, Codex.

Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,597 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
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 $0.00096 $0.01597
Opus 5 $0.00048 $0.00798
Sonnet 5 $0.00019 $0.00319
Haiku 4.5 $0.00010 $0.00160

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

Security

Grade C, and why

ui-preview scanned grade C 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 yesterday.

The scan reads SKILL.md. This mod also ships 4 executable files (docs-screenshots.mjs, regression-credentials.mjs, scenario-routing-graph.mjs, …), 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.

# polluted by npm — wipe it first with `rm -rf node_modules` if you suspect that).

Makes network callslowCapability

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

curl -fsSL -o chrome.zip \
.claude/skills/ui-preview/SKILL.md · 135 lines

How it starts

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

Headless UI preview (Playwright + Chrome for Testing)

Designed for the remote-execution container where:

  • cdn.playwright.dev / dl.google.com are blocked — use Chrome for Testing via storage.googleapis.com.
  • Ubuntu's chromium-browser is a snap stub and won't run.
  • MCP servers can't be registered mid-session — use Playwright's Node API directly.

Setup (run once per fresh container)

⚠️ This project uses pnpm (frontend/pnpm-lock.yaml is the source of truth). Do NOT run npm i here — npm ignores the pnpm lockfile and re-resolves transitive deps, which pulls broken versions (e.g. [email protected] vs the pinned 1.46.1) that crash the whole SPA at load. See Troubleshooting below.

playwright is already a committed devDependency in frontend/package.json, so a plain install provides it — no ad-hoc add/revert needed. @emotion/react / @emotion/styled are likewise already declared.

# 1. Install deps from the lockfile (also fixes a node_modules previously
#    polluted by npm — wipe it first with `rm -rf node_modules` if you suspect that).
cd frontend
pnpm install --frozen-lockfile

# 2. Download Chrome for Testing (Playwright's own Chromium download is blocked)
mkdir -p /tmp/chrome && cd /tmp/chrome
curl -fsSL -o chrome.zip \
  "https://storage.googleapis.com/chrome-for-testing-public/148.0.7778.96/linux64/chrome-linux64.zip"
unzip -q chrome.zip          # → /tmp/chrome/chrome-linux64/chrome

Do NOT modify frontend/package.json / frontend/pnpm-lock.yaml for tooling anymore — everything needed is already committed. If a previous session left them dirty (or npm polluted the tree), reset with:

cd <repo> && git checkout -- frontend/package.json frontend/pnpm-lock.yaml
pnpm -C frontend install --frozen-lockfile

Dev server

cd frontend
USE_MOCK=true node_modules/.bin/vite --mode mock --port 3000 &
until curl -fs http://localhost:3000 >/dev/null; do sleep 1; done

USE_MOCK=true must be a shell env var (read by vite.config.ts before .env.mock).

Read the full file on GitHub · 135 lines

Files

What ships with it

4 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. yesterday First seen · 135 lines · 96 tokens per session scan C 5821600675b4

Subscribe to this mod's changes

ui-preview is a skill published in the GitHub repository tingly-dev/tingly-box (345 stars, last pushed 2d ago), licensed MPL-2.0. It adds 96 tokens to every session and 1,597 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

web-artifact-designer

把视觉/前端设计需求做成可直接在浏览器打开的自包含 HTML 或 SVG 设计稿——海报、信息图、落地页、数据图表、卡片、banner、UI 组件稿、单页应用原型等。When the user asks for a visual design, poster, infographic, landing page, chart, mockup, or complains that existing frontend output looks generic/ugly, use this skill to produce a polished, self-contained HTML/SVG artifact instead of a…

xulelenlp/dsh-web-artifact-designer · 115 tokens

instagram-video-downloader

Instagram视频下载 — 粘贴 Instagram 视频链接,一键解析返回无水印视频下载链接。当用户需要下载 Instagram 视频、保存 IG 视频、获取 Instagram 视频直链时使用。触发词:Instagram视频下载、IG视频下载、Ins视频下载、Instagram视频解析、下载Instagram视频、reel下载。.

redfox-data/redfox-community-dsh · 72 tokens

browser-qa

Use this skill to automate visual testing and UI interaction verification using browser automation after deploying features.

gongyijie85/dsh-ecc · 22 tokens

cordis-plugin-development

Create, modify, debug, or extend dynamic Cordis Plugins, including Host Services and Events, Client Slot and theme UI, Package-private Client-to-Host calls, dynamic Tools, version updates, approval failures, and runtime diagnostics. Use this Skill to route a user request to the correct platform and Inspect Provider…

deepseek-ai/deepseek-harness · 80 tokens

editing-cordis-compositions

Use when creating, changing, or validating a Cordis composition for this harness — writing or editing an agent preset, adding or removing a plugin row, deciding whether something belongs to the host composition or to one session, checking whether a preset you authored actually mounts, or diagnosing a row that mounted…

deepseek-ai/deepseek-harness · 69 tokens

record-browser-gif

Record browser or Web UI interaction demos as optimized GIFs using the available built-in browser, state-based frame capture, and deterministic encoding, then publish to a dedicated assets branch when the task includes attaching the GIF to a pull request. Use when asked to make, record, or generate a GIF that…

deepseek-ai/deepseek-harness · 99 tokens