image-to-code

image-to-code is a skill for Claude Code, Codex from Mineru98/imagine. It costs 112 tokens per session (1,050 once invoked), scanned A, original, MIT.

A tool that turns a screenshot, mockup, or Figma export into an HTML page styled with Tailwind CSS, a utility-based system for writing webpage styles. It saves the result as a standalone page.

In plain words
What is it for?
It helps recreate landing pages, dashboards, and other interfaces from reference images. It can use design tokens, enforce a visual-similarity threshold, and produce alternative versions for exploration.
Why use it?
It removes much of the manual work of rebuilding a visual design in code. It also distinguishes between requests to generate an image and requests to turn an image into webpage markup.

Skill for Claude CodeCodex

Part of the imagine plugin — 8 skills, 10 agents shipped together

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/mineru98/imagine/image-to-code
Any agent
npx skills add Mineru98/imagine --skill image-to-code
Clone the repo
git clone --depth 1 https://github.com/Mineru98/imagine

Made for: Claude Code, Codex.

Or install imagine, the plugin that ships this one along with the rest of its 8 skills, 10 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/mineru98/imagine/image-to-code.svg)](https://agentmods.dev/skills/mineru98/imagine/image-to-code)
Your own site
<a href="https://agentmods.dev/skills/mineru98/imagine/image-to-code"><img src="https://agentmods.dev/badge/skills/mineru98/imagine/image-to-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,050 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00112 $0.01050
Opus 5 $0.00056 $0.00525
Sonnet 5 $0.00022 $0.00210
Haiku 4.5 $0.00011 $0.00105

Measured 4d ago against content hash 0626a4ef0dfb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 4d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/lib/diff-runner.js, scripts/lib/input-normalizer.js, scripts/lib/orchestrator.js, …), 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.

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/image-to-code/SKILL.md · 89 lines

How it starts

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

image-to-code

디자인 이미지(스크린샷·목업·Figma export)를 단일 HTML + Tailwind CSS 페이지로 복원한다. 결과는 프로젝트의 ./pages/<slug>/ 폴더에 저장된다.

트리거 예시

아래 중 하나라도 감지되면 이 스킬이 담당한다.

  • image-to-code <path> (명시 호출)
  • "이 이미지를 웹페이지로 만들어줘"
  • "HTML로 바꿔줘" / "Tailwind로 바꿔줘"
  • "이 스크린샷을 코드로"
  • "목업을 마크업으로"

imagine 스킬과의 트리거 충돌 방침

설계 문서 §7.2를 그대로 따른다.

  • imagine이 담당: "이미지 만들어줘", "그려줘", "~스타일로 바꿔줘" 등 시각 생성·변환 의도.

  • image-to-code가 담당: "웹페이지로", "HTML로", "Tailwind로", "코드로 바꿔줘" 등 마크업 변환 의도.

  • 애매한 요청 (예: "이 이미지 변환해줘"): 자동 추론을 하지 않고 사용자에게 정확히 1턴만 질문한 뒤 선택지 응답을 받아 분기한다. 질문 포맷 고정:

    (A) 다른 이미지로 변환 (imagine)
    (B) HTML / Tailwind 코드로 변환 (image-to-code)
    

    사용자 응답 전에는 어느 스킬도 실행하지 않는다.

사용법

# 가장 기본
node <skill-root>/scripts/run.js ./mockups/landing.png

# 지정 출력
node <skill-root>/scripts/run.js ./ui.jpg --out ./pages/dashboard

# 엄격 모드 (diff < 0.90 이면 실패 exit)
node <skill-root>/scripts/run.js ./ui.jpg --strict

# 탐색 모드 (대안 3개)
node <skill-root>/scripts/run.js ./hero.png --explore

# 디자인 토큰 강제
node <skill-root>/scripts/run.js ./hero.png --tokens ./design/tokens.json

--help 로 옵션 목록을 그대로 출력한다.

출력 규약 (설계 §5.2)

./pages/<slug>/
├── index.html             ← 단일 파일 (Tailwind CDN 기본)
├── tailwind.config.js     ← --tokens 모드에서만 생성
├── assets/
└── image-to-code-run.json ← Run Manifest (디버그용)
  • <slug> 기본값: 입력 파일 basename + 타임스탬프. --out 지정 시 그 경로 그대로 사용.
  • 사용자 프로젝트 루트의 index.html은 절대 덮어쓰지 않는다. 반드시 ./pages/<slug>/ 하위에만 쓴다.

파이프라인 요약 (설계 §4.1)

오케스트레이터만 에이전트를 호출한다. 에이전트끼리 서로 호출하지 않는다.

  1. Input Normalizer → Request Planner
  2. Vision Analyst (시퀀스)
  3. Promise.all — Layout Architect / Design Token Extractor / Asset Extractor / A11y Advisor (병렬)
  4. Code Generator → Visual Verifier
  5. 실패 시 hotspot으로 Code Generator 1회 재호출 (correction_passes 상한 1)

설정

config.json의 기본값을 따르며, CLI 플래그로 개별 덮어쓴다. 상세는 config.json 주석과 설계 §6 참조.

실패 모드

  • 입력 이미지 미존재 / 포맷 미지원 → 즉시 에러.
  • Visual Verifier가 두 번 연속 임계값 미달 → 경고 배너와 함께 1차 결과 저장(--strict 아닐 때).
  • OAuth 세션 이슈 → imagine 스킬과 동일하게 reference/installation.md 안내로 위임.

Read the full file on GitHub · 89 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. 4d ago First seen · 89 lines · 112 tokens per session scan A 0626a4ef0dfb

Subscribe to this mod's changes

image-to-code is a skill published in the GitHub repository Mineru98/imagine (5 stars, last pushed 5d ago), licensed MIT. It adds 112 tokens to every session and 1,050 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

chakra-ui-builder

Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…

chakra-ui/chakra-ui · 214 tokens

image-to-code

Elite website image-to-code skill for Codex. For visually important web tasks, it must first generate the design image(s) itself, deeply analyze them, then implement the website to match them as closely as possible. In Codex, it must prefer large, readable, section-specific images instead of tiny compressed boards…

Leonxlnx/taste-skill · 116 tokens

material-ui-tailwind

Integrates Material UI with Tailwind CSS v4 using cascade layers (enableCssLayer, @layer order) and documents Tailwind v3 interoperability (preflight, important, injectFirst, portals). Use when combining MUI with Tailwind utilities, slotProps className, or theme token bridges.

mui/material-ui · 67 tokens

openbot-screen-layout

The default layout for every OpenBot configuration screen — PageShell and its prose/wide widths, PageSection and PageRows, Item row composition, the settings-row pattern where a summary and a chevron open a dialog, and the size and variant vocabulary. This is what a new screen looks like unless an instruction says…

CopilotKit/OpenBot · 183 tokens

better-typography

Focuses on type scale, spacing, sizing, variable fonts, OpenType features, wrapping, truncation and other details that make typography feel great across your product.

jakubkrehel/skills · 38 tokens

better-colors

Helps you build a color system and answer anything about color in your project. You can generate palettes, use semantic tokens, convert between formats, check contrast and more.

jakubkrehel/skills · 38 tokens