/howtoai-design:image-to-codefrom How to AI — Design
Converts design images — screenshots, mockups, Figma exports, or sketches — into faithful working code. Measures real values, builds, then screenshots and compares against the source until it matches.
Ships in How to AI — Design. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Image in, working code out — and the render should be mistakable for the source at a glance. Two failure modes kill this, and the whole skill exists to prevent them:
13px text and a 22px gap; the code says
text-sm and gap-6 because they're "close". Twenty of those and it's a
different design.Fidelity target → tokens → build → comparison loop. The order matters: extraction before any component code, verification before any "done".
Pick by source quality and say which mode you're in. Ask only when it genuinely changes the work — e.g. a polished mock arrives but the project already has a design system it may need to conform to.
Before writing any component: measure the image and write down the design system
it implies — sampled colors mapped to roles, the spacing scale, the type scale,
radius/border/shadow logic, a component inventory, and an exact transcription of
all readable text. Full procedure: read references/extraction-guide.md.
Run scripts/sample_colors.py <image> for the palette instead of guessing hex
values by eye.
This token block is the contract the build is checked against. If a value isn't in it, you're improvising — go measure.
Render the result at the source's viewport width, screenshot it, put it beside
the source image, list the top 3–5 visual diffs, fix them, repeat. Triage order
and stop conditions: read references/comparison-loop.md. Done means the
remaining diffs are content-level (real photos, real data) — not design-level.
Claims like "matches the mockup" require a comparison screenshot taken after the last code change, not before it.
Recreating a public design to learn from, prototype with, or use internally is normal practice. Shipping a clone of a competitor's actual product UI in a competing product is design theft with real legal exposure (trade dress). Say that once, plainly, when it applies — then respect the user's call.
line-height: the image shows perceived
baseline-to-baseline distance; CSS line boxes include half-leading. Set a
plausible value, then correct text-block heights in the comparison loop — never
by arithmetic alone.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub rubenhassid1/howtoai-skills --plugin howtoai-design12 skills in this plugin
/bannersDesigns banner and cover graphics — LinkedIn banners, X headers, YouTube channel art, event covers, OG images — as pixel-exact HTML at each surface's real dimensions and safe zones./brand-kitBuilds a brand identity system — color roles, type pairing, logo direction, reusable brand tokens other skills consume. Use for "brand kit", "brand identity", "my brand colors", "brand guidelines", or "make my stuff look consistent"./design-critiqueReviews a design — screenshot, URL, Figma export, or built UI — with a severity-ordered verdict on visual quality, usability, and accessibility in one pass. Use for "critique my design", "design review", "is this accessible", "roast my landing page"./design-stylesPicks a named visual style and executes it faithfully — brutalist, neobrutalist, minimalist, soft, glassmorphic, luxury, playful, and more. Use when asked to "make it brutalist", "make it feel soft/premium", or "what style should this be"./design-systemBuilds or extracts a reusable design system: token architecture (primitive, semantic, component) plus a documented component set. Use for "design system", "design tokens", or "component library"./frontend-tasteAesthetic judgment for any web UI being built, replacing AI-default habits with deliberate design decisions. Use while building frontend interfaces, or when asked to make it look good, look less generic, or not look AI-generated.Other plugins' skills for the same job