screenshot-to-code

screenshot-to-code is a skill for Claude Code from JoaoEquer/Oficina. It costs 127 tokens per session (1,513 once invoked), scanned A, original, MIT.

A workflow that turns a screenshot, mockup, Figma export, or UI photo into working front-end code, then compares the rendered page with the image.

In plain words
What is it for?
Use it to build screens in React, Next.js, Vue, or plain HTML and CSS, with Tailwind CSS where supported.
Why use it?
It reduces the guesswork involved in matching a visual reference's layout, spacing, colors, and type styles.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the oficina plugin — 23 skills, 5 commands shipped together

Good fit Use it to build screens in React, Next.js, Vue, or plain HTML and CSS, with Tailwind CSS where supported.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/joaoequer/oficina/screenshot-to-code
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 JoaoEquer/Oficina --skill screenshot-to-code
Clone the repo
git clone --depth 1 https://github.com/JoaoEquer/Oficina

Made for: Claude Code.

Or install oficina, the plugin that ships this one along with the rest of its 23 skills, 5 commands.

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-to-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/joaoequer/oficina/screenshot-to-code/github.svg)](https://agentmods.dev/skills/joaoequer/oficina/screenshot-to-code)
Your own site
<a href="https://agentmods.dev/skills/joaoequer/oficina/screenshot-to-code"><img src="https://agentmods.dev/badge/skills/joaoequer/oficina/screenshot-to-code/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-to-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/joaoequer/oficina/screenshot-to-code"><img src="https://agentmods.dev/badge/skills/joaoequer/oficina/screenshot-to-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 127 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,513 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.00127 $0.01513
Opus 5.5 $0.00051 $0.00605
Sonnet 5.5 $0.00025 $0.00303
Haiku 4.5 $0.00013 $0.00151

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

Security

Grade A, and why

screenshot-to-code 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 3d 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.

skills/screenshot-to-code/SKILL.md · 66 lines

How it starts

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

Provenance: github.com/OneWave-AI/claude-skills (screenshot-to-code), audited 2026-10-13 (SKILL.md read in full, instruction-only, no scripts). Why: user sends a screenshot of a UI he likes and it is rebuilt faithfully, with a render-and-compare loop. Replaces image-to-code from taste-skill, which needs an image generator that Claude Code lacks.

Screenshot to Code

Recreate the UI in the image as clean, responsive, accessible code, then check the render against the image.

Workflow

  1. Pick the target stack. If the user is inside a project, match it: read package.json for React/Next/Vue and the Tailwind version, and reuse existing components, tokens, and icon libraries. Do not ask when the repo already answers it. With no project:

    • Single screen or quick prototype: one self-contained index.html (Tailwind via the browser build, see references/stack-setup.md).
    • App or multi-screen: React + TypeScript + Tailwind v4 on Vite.
    • User mentions Next.js, SSR, or routing: Next.js App Router.
  2. Write a short spec before coding. Looking at the image, note:

    • Layout regions top to bottom (nav, hero, sidebar, grid, footer) and the grid or flex structure of each
    • Design tokens: 3-6 colors as hex, font family guess and the type scale, spacing rhythm (usually multiples of 4px), corner radius, shadow style
    • Repeated components (cards, list rows, buttons) that should be one component with props
    • What the image cannot show: hover and focus states, mobile layout, real data, content below the fold

    Estimate sizes from the image resolution. If the screenshot is 2x (a Retina capture 2880px wide is a 1440px layout), halve the pixel measurements.

  3. Build. Use semantic elements (header, nav, main, section, button, a), extract repeated pieces into components, and put tokens in one place (Tailwind v4 @theme or CSS custom properties) rather than scattering hex codes. Use real text from the image, not lorem ipsum. For images and logos you cannot extract, use sized placeholders with descriptive alt text. Use an icon library the project already has (default: lucide-react), not hand-drawn SVGs or emoji.

Read the full file on GitHub · 66 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 First seen · 66 lines · 127 tokens per session scan A 1e541c799dd7

Subscribe to this mod's changes

screenshot-to-code is a skill published in the GitHub repository JoaoEquer/Oficina (2 stars, last pushed 4d ago), licensed MIT. It adds 127 tokens to every session and 1,513 once invoked, about $0.0005 per session on Opus 5.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-10-21.

Related

Other skills, from other repositories

generic-react-design-system

Complete design system reference for React applications. Covers colors, typography, spacing, component patterns, glassmorphism effects, GPU-accelerated animations, and WCAG AA accessibility. Use when implementing UI, choosing colors, applying spacing, creating components, or ensuring brand consistency.

travisjneuman/.claude · 59 tokens

mui

Material-UI v7 component library patterns including sx prop styling, theme integration, responsive design, and MUI-specific hooks. Use when working with MUI components, styling with sx prop, theme customization, or MUI utilities.

Dannykkh/skill-olympus · 48 tokens

dev-shadcn

Integration and customization of shadcn/ui (copy-paste React components, Radix + Tailwind). Trigger when the user wants to install shadcn, add components, customize the theme, or when shadcn/ui usage is detected in the project.

christopherlouet/claude-base · 57 tokens

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI).…

mvschwarz/openrig · 77 tokens

ui-web

Generate slop-free UI for React + Tailwind + shadcn/ui. Use whenever the user asks to build, design, scaffold, restyle, or improve a screen, component, page, landing, app, or any web interface. Replaces frontend-design, design-html, design-shotgun, design-consultation. Two phases — tokens first (with approval gate)…

rshzrh/ui-design-skills · 99 tokens

web-artifacts-builder

Build multi-component HTML artifacts using React, Tailwind CSS, and shadcn/ui. Use for complex interactive artifacts requiring state management, routing, or component libraries, not for simple single-file HTML/JSX artifacts.

yunseo-kim/agent-toolbox · 49 tokens