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.
npx agentmods add skills/mineru98/imagine/image-to-codenpx skills add Mineru98/imagine --skill image-to-codegit clone --depth 1 https://github.com/Mineru98/imagineWrote 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.
[](https://agentmods.dev/skills/mineru98/imagine/image-to-code)<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>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.
| Model | Per session | Once 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 |
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.
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.
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)
오케스트레이터만 에이전트를 호출한다. 에이전트끼리 서로 호출하지 않는다.
- Input Normalizer → Request Planner
- Vision Analyst (시퀀스)
Promise.all— Layout Architect / Design Token Extractor / Asset Extractor / A11y Advisor (병렬)- Code Generator → Visual Verifier
- 실패 시 hotspot으로 Code Generator 1회 재호출 (correction_passes 상한 1)
설정
config.json의 기본값을 따르며, CLI 플래그로 개별 덮어쓴다. 상세는 config.json 주석과 설계 §6 참조.
실패 모드
- 입력 이미지 미존재 / 포맷 미지원 → 즉시 에러.
- Visual Verifier가 두 번 연속 임계값 미달 → 경고 배너와 함께 1차 결과 저장(
--strict아닐 때). - OAuth 세션 이슈 →
imagine스킬과 동일하게reference/installation.md안내로 위임.
What ships with it
9 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.
- config.json 329 B
- prompts/code-generator.md 6.1 KB
- prompts/verifier-critic.md 4.2 KB
- prompts/vision-analyst.md 3.6 KB
- scripts/lib/diff-runner.js 4.6 KB runs code
- scripts/lib/input-normalizer.js 2.1 KB runs code
- scripts/lib/orchestrator.js 4.1 KB runs code
- scripts/lib/request-planner.js 1.7 KB runs code
- scripts/run.js 2.0 KB runs code
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.
- 4d ago First seen · 89 lines · 112 tokens per session scan A 0626a4ef0dfb
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.
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…
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…
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.
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…
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.
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.