design-image-to-code

design-image-to-code is a skill for Claude Code, Codex from DKeken/codex-skills-alternative. It costs 107 tokens per session (1,054 once invoked), scanned A, original, MIT.

A workflow for turning a screenshot or mockup into a runnable local frontend that closely matches the reference.

In plain words
What is it for?
Use it to recreate a visible interface in the project’s frontend stack from one or more reference images.
Why use it?
It helps replace visual guesswork with measured inspection, implementation, screenshot comparison, and iteration.

Skill for Claude CodeCodex

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is reference: ./mocks/pricing.png (1440px wide).

Good fit Use it to recreate a visible interface in the project’s frontend stack from one or more reference images.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/DKeken/codex-skills-alternative
agentmods
npx agentmods add skills/dkeken/codex-skills-alternative/design-image-to-code

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/dkeken/codex-skills-alternative/design-image-to-code.svg)](https://agentmods.dev/skills/dkeken/codex-skills-alternative/design-image-to-code)
Your own site
<a href="https://agentmods.dev/skills/dkeken/codex-skills-alternative/design-image-to-code"><img src="https://agentmods.dev/badge/skills/dkeken/codex-skills-alternative/design-image-to-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,054 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.00107 $0.01054
Opus 5 $0.00053 $0.00527
Sonnet 5 $0.00021 $0.00211
Haiku 4.5 $0.00011 $0.00105

Measured 8d ago against content hash ec1ce132464c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

design-image-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 8d 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/design-image-to-code/SKILL.md · 69 lines

How it starts

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

Design — Image To Code

Reproduce a reference image as a real, runnable frontend — verified by screenshot diff, not "looks roughly like it". The discipline that separates this from generic codegen: you measure the result against the reference and iterate until the gap is minor and explainable.

When to use

  • You have a mockup/screenshot (from a designer, design-ideate, or generated) to implement.
  • "Build this design", "code this screenshot", "make this real".
  • Recreating a UI you can see but don't have code for.

When NOT to use

  • The source is a live site (you can hit its URL/HTML) → design-url-to-code (it can extract real CSS).
  • No image yet, just an idea → design-ideate.
  • You need interactivity/flow wiring, not a static match → design-prototype (run this first to build screens).

Inputs

  • The reference image(s) (path).
  • Target stack: ask; default to matching the repo, else React + Vite + Tailwind + TS.
  • ./design/context.md constraints if present.

Workflow

  1. Inspect the image with a vision/read tool. Inventory every meaningful element. Extract the design system: layout grid, type scale, spacing rhythm, palette, components, radii, shadows.
  2. Reuse before inventing: if adapting an existing project, read its components/tokens/fonts first and use them.
  3. First pass: build to match the primary viewport as closely as possible. Don't chase responsive yet.
  4. Capture: run the app, screenshot at the reference's exact dimensions via a browser-automation tool.
  5. Compare & list mismatches in priority order: layout → type → spacing → color → icons.
  6. Iterate until differences are minor and explainable. Then handle responsive (tablet/mobile).
  7. Missing assets: use supplied files; generate raster assets with an image tool; or use clearly-marked placeholders + a note.

Worked example

reference: ./mocks/pricing.png  (1440px wide)
stack: matches repo → Next.js + Tailwind + Aurora DS
pass 1: built 3-tier pricing grid, header, CTA
capture: screenshot @1440 → ./design/checks/pricing-impl.png
mismatches:
 - [layout] cards 3-col but gap too tight (16 vs ~32 in ref)
 - [type] tier price 32px, ref ~40px
 - [color] "popular" badge wrong accent (#7C3 vs ref #16A34A)
 - [spacing] section pad 48 vs ref ~80
iterate: fix gap=32, price=40px, badge=#16A34A, section pad=80
re-capture: gap now minor (sub-pixel font rendering only) → DONE
responsive: collapse to 1-col < 768px, stack CTA
verify: build clean, typecheck clean, runs at :3000

Read the full file on GitHub · 69 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. 8d ago First seen · 69 lines · 107 tokens per session scan A ec1ce132464c

Subscribe to this mod's changes

design-image-to-code is a skill published in the GitHub repository DKeken/codex-skills-alternative (15 stars, last pushed 3mo ago), licensed MIT. It adds 107 tokens to every session and 1,054 once invoked, about $0.0005 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-30.

Related

Other skills, from other repositories

21st-ui

Find, install, and generate UI with 21st.dev. Use when the user asks for a UI component (pricing table, hero, navbar, dashboard, form, etc.), wants design inspiration, needs a brand logo as an SVG component, or wants to generate new UI from a prompt.

21st-dev/magic-mcp · 63 tokens

vercel-composition-patterns

React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.

calesthio/OpenMontage · 58 tokens

frontend

Builds, styles, and polishes web UI and UX. Use for any frontend, page, component, styling, layout, animation, or visual-quality task, or when asked to make an interface look or feel a certain way.

code-yeongyu/oh-my-openagent · 49 tokens

openai-frontend-design

Use for new frontend applications, dashboards, games, creative websites, hero sections, and visually driven UI from scratch, or when the user explicitly asks for a redesign/restyle/modernization. Builds from clean, airy, high-taste, readable image-generated concept design with section-specific references, faithful…

fcakyon/claude-codex-settings · 71 tokens

interaction-skill

Layer A interaction-mechanics reference anchored to the beui.dev catalog. Stacks on any style skill whenever work adds or changes motion or interaction — micro-interactions, animated components, transitions, gestures, hover/press/state feedback, loading/success/error morphs, 'make it feel alive'. Mandates reading the…

code-yeongyu/oh-my-openagent · 104 tokens

layout-skill

Layer A layout-mechanics reference. Stacks on any style skill when the screen is an app shell, dashboard, settings, list-detail, mail/inbox, or any layout with fixed regions plus a scrolling body — or when a layout breaks under long, empty, or unbroken content. Owns spatial structure and scroll ownership; owns zero…

code-yeongyu/oh-my-openagent · 88 tokens