tn0123 avatar

One Shot Ui

tn0123/one-shot-ui

Exposes five tools for deterministic UI diffing: extract layout regions and design tokens from a reference screenshot, capture screenshots of your implementation, compare them with pixel and structural diffs, and get ranked CSS fixes with exact values like "width: 616px" or "gap: 176px". The compare tool returns heatmaps and classifies deltas by type (layout, color, typography). The suggest_fixes tool outputs copy-paste CSS or Tailwind classes ranked by visual impact. Runs locally over stdio, uses Playwright for capture and OCR for text extraction. Reach for this when your AI agent gets a UI 90% right but stalls on subtle spacing, color, or shadow mismatches that need concrete corrections instead of vague nudges.

GitHub stars
2
tools
7
transport
STDIO
last updated
Jun 2, 2026

Tools

7 tools

Public tool metadata for what this MCP can expose to an agent.

comparePixel + structural diff between two screenshots

Pixel + structural diff between two screenshots

No parameter schema in public metadata yet.

convergeClosed-loop optimizer: pixel-verified CSS patch + structural fidelity score, flags hidden/clipped text

Closed-loop optimizer: pixel-verified CSS patch + structural fidelity score, flags hidden/clipped text

No parameter schema in public metadata yet.

suggest_fixesTailwind/CSS fix suggestions from a diff

Tailwind/CSS fix suggestions from a diff

No parameter schema in public metadata yet.

extractAnalyze a screenshot into layout, color, and text data

Analyze a screenshot into layout, color, and text data

No parameter schema in public metadata yet.

tokensDesign tokens + a reusable style system (palette, spacing, type, radii)

Design tokens + a reusable style system (palette, spacing, type, radii)

No parameter schema in public metadata yet.

planGenerate an implementation strategy

Generate an implementation strategy

No parameter schema in public metadata yet.

style_checkCheck a new UI conforms to a reference's design language

Check a new UI conforms to a reference's design language

No parameter schema in public metadata yet.

Sponsors

Readme

one-shot-ui

Catch what the eye can't.

Deterministic screenshot diffing for AI coding agents. Turn a reference screenshot into structured data, diff any build against it — pixel, layout, color, and type — then get the exact CSS to fix. Or copy a UI's design language onto a brand-new screen.

npm version license node

one-shot-ui diffs an agent's build against the reference screenshot and flags the exact deltas

The problem

AI agents get UI ~90% of the way there — then stall. The layout looks right, but a card is 8px too tall, a panel is the wrong shade of gray, a shadow is flat, a gap is off by 24px. Asking the model to "look at the screenshot again and fix it" is slow, and you get a different answer every time.


View the full README on GitHub

Details

Repository
github.com/tn0123/one-shot-ui
Package
one-shot-ui
Transport
STDIO
Registry
MCP registry, active