one-shot-ui

one-shot-ui is a skill for Claude Code, Codex from TN0123/one-shot-ui. It costs 28 tokens per session (2,702 once invoked), scanned A, original, MIT.

A command-line tool for comparing a user interface with a reference screenshot and extracting its visual details.

In plain words
What is it for?
Building a UI from a screenshot, checking an existing implementation against a reference, refining pixel-level differences, and transferring a screenshot's visual style to different content.
Why use it?
It reduces guesswork when matching an implementation to a design by reporting positions, sizes, colors, typography, spacing, and other visual properties.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Building a UI from a screenshot, checking an existing implementation against a reference, refining pixel-level differences, and transferring a screenshot's visual style to different content.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tn0123/one-shot-ui/skill
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 TN0123/one-shot-ui --skill skill
Clone the repo
git clone --depth 1 https://github.com/TN0123/one-shot-ui

Made for: Claude Code, Codex.

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 one-shot-ui

README.md
[![agentmods](https://agentmods.dev/badge/skills/tn0123/one-shot-ui/skill.svg)](https://agentmods.dev/skills/tn0123/one-shot-ui/skill)
Your own site
<a href="https://agentmods.dev/skills/tn0123/one-shot-ui/skill"><img src="https://agentmods.dev/badge/skills/tn0123/one-shot-ui/skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,702 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00028 $0.02702
Opus 5 $0.00014 $0.01351
Sonnet 5 $0.00006 $0.00540
Haiku 4.5 $0.00003 $0.00270

Measured 7d ago against content hash 82650590cecb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

one-shot-ui scanned grade A with 0 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 7d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill/SKILL.md · 195 lines

How it starts

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

You have access to the one-shot-ui CLI tool. Use it to analyze reference screenshots and compare your implementations against them.

When to Use

  • The user provides a screenshot or mockup and asks you to build it
  • The user wants to compare their implementation against a design
  • The user wants to iteratively refine a UI to match a reference
  • The user wants a different UI that copies the style/aesthetic of a screenshot (same design language, different content) — see "Style transfer" below

Workflow

Step 1: Extract the design

Run one-shot-ui extract <reference.png> --json --overlay to get:

  • Layout nodes with positions, sizes, colors, gradients, shadows, border radii
  • Text blocks with content, font size, weight, color, and monospace
  • Design tokens (spacing scale, color palette, radius scale)
  • Component clusters (repeated visual patterns)
  • Implementation plan (suggested CSS strategy: grid/flex/absolute)

Pass --dpr for Retina/Mac screenshots. A 2x screenshot reports every pixel at double its CSS value (a 35px heading measures 70px), which throws off fonts, spacing and sizing. If you know the screenshot is from a Retina/Mac display, pass --dpr 2 so sizes and bounds come back in CSS pixels. Otherwise check the report's scale block: units: "css-px" means values are normalized; a scale.scaleHint means it might be Retina and you should re-run with --dpr 2. Build to the reported CSS pixels.

Step 2: Build the UI

Use the extracted data to write the implementation directly. Set exact:

  • Colors (hex values from extraction)
  • Spacing (px values from spacing measurements)
  • Typography (font sizes, weights from text blocks)
  • Border radii, shadows, gradients (from style extraction)

Build to the rulers block — this is the single biggest lever for sizing/spacing. extract reports deterministic pixel-projection "rulers" so you don't have to eyeball or hand-measure geometry:

  • rulers.bands — background-zone heights down the page (e.g. a top header/nav bar's exact height in CSS px, with its background hex). Set those container heights/paddings exactly.
  • rulers.columns — content column left edges and widths (sidebar width, main column, card columns). Drive your container widths / grid tracks from these.
  • rulers.gutters — the exact gaps between columns. Use them for column-gap, margins, padding. These are CSS px (DPR already applied). Matching them up front avoids the slow "off by ~16px, shifted right" iteration loop.

Read the full file on GitHub · 195 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. 7d ago First seen · 195 lines · 28 tokens per session scan A 82650590cecb

Subscribe to this mod's changes

one-shot-ui is a skill published in the GitHub repository TN0123/one-shot-ui (4 stars, last pushed 1mo ago), licensed MIT. It adds 28 tokens to every session and 2,702 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.