Agent skill

Image To Code

by plugin87 in plugin87/ux-ui-agent-skills

Turn a reference image, screenshot, or mockup into token-driven, accessible code — infer the design system from the reference (palette, type scale, spacing, radius, layout archetype), map it to the…

MITAuto-check passedFrontend & Design

Install Image To Code

skills CLI
$ npx skills add plugin87/ux-ui-agent-skills --skill image-to-code -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install plugin87/ux-ui-agent-skills image-to-code --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/plugin87/ux-ui-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/image-to-code .claude/skills/image-to-code && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
image-to-code
GitHub stars
1.5k
Token cost
~900 tokens
SKILL.md length
358 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

Turn a reference image, screenshot, or mockup into token-driven, accessible code — infer the design system from the reference (palette, type scale, spacing, radius, layout archetype), map it to the…

  • Works in 5 steps: Read the reference like a designer.… → Anchor to a known system if it's close —… → Build the token theme from the inferred… → …
  • The user provides a design/screenshot and wants matching UI code
  • SKILL.md covers Steps and Verification (definition of…
  • Calls npx, npm and python3

What it does

Image To Code is an agent skill from plugin87/ux-ui-agent-skills. Turn a reference image, screenshot, or mockup into token-driven, accessible code — infer the design system from the reference (palette, type scale, spacing, radius, layout archetype), map it to the 3-tier tokens, rebuild it, then verify with the kit's gates. Use when the user provides a design/screenshot and wants matching UI code.

Its SKILL.md is about 900 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering Design systems and Typography. The repository describes itself as: Turn Claude into a senior design architect: DTCG tokens, 52 components, WCAG 2.2 AA-AAA, 138 design systems, any-framework code, and 50 objective gates that fail the build… The licence is MIT.

When your agent uses it

  • The user provides a design/screenshot and wants matching UI code
  • Tasks that involve Design systems
  • Tasks that involve Typography

Example prompts

  • “/image-to-code”

Requirements

  • Python 3
  • Node.js

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Read the reference like a designer. Infer and write down
  2. Anchor to a known system if it's close — browse ${CLAUDE_SKILL_DIR}/../../../taste/aesthetic-systems.md / python3…
  3. Build the token theme from the inferred values → 3-tier DTCG (design-tokens skill); generate a single theme.css. Verify every color pair…
  4. Rebuild layout + components token-driven via ${CLAUDE_SKILL_DIR}/../../../frameworks/adapter-protocol.md +…
  5. Verify against the reference — render and screenshot it, compare side-by-side to the reference; run node…

What it can do on your machine

Read from SKILL.md and the folder at commit 14f8d44. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • npm
    • python3
    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Image To Code loads about 900 tokens when it runs. Until then it costs about 87 tokens; SKILL.md has 358 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~900

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from plugin87/ux-ui-agent-skills at commit 14f8d44, republished under its MIT licence (© plugin87). 358 words, ~900 tokens.

Download SKILL.mdSave it as .claude/skills/image-to-code/SKILL.md (or your agent's skills folder).
name
image-to-code
description
Turn a reference image, screenshot, or mockup into token-driven, accessible code — infer the design system from the reference (palette, type scale, spacing, radius, layout archetype), map it to the 3-tier tokens, rebuild it, then verify with the kit's gates. Use when the user provides a design/screenshot and wants matching UI code.
disable-model-invocation
true

Skill: Image to Code

Step 0 — is the kit here? This skill reads files from the kit. Check once: ls ${CLAUDE_SKILL_DIR}/../../../tokens >/dev/null 2>&1 && echo KIT_OK || echo KIT_MISSING On KIT_MISSING only the skill folders were installed, which is what npx skills add does. Say so plainly, point the user at npx ux-ui-agent-skills init or the plugin install, and stop. Do not guess the contents of a file you could not open.

Reconstruct a design from a visual reference as a real design system, not a one-off copy. Match the system (color/type/spacing language), never lift copyrighted imagery or brand assets.

Steps

  1. Read the reference like a designer. Infer and write down:
    • Palette — 1 dominant surface family, text colors, 1 primary action + at most 1 accent (sample the hues; don't guess random hex).
    • Type — family feel (geometric/grotesk/serif), the scale jumps, display vs. body contrast, weights.
    • Spacing & density — base unit, section rhythm, card padding; airy vs. compact.
    • Radius & depth — radius language (sharp/soft/pill), shadow vs. hairline separation.
    • Layout archetype + sequence — full-bleed hero / asymmetric split / bento / editorial stack (${CLAUDE_SKILL_DIR}/../../../taste/design-taste.md → Variance Mandate).
  2. Anchor to a known system if it's close — browse ${CLAUDE_SKILL_DIR}/../../../taste/aesthetic-systems.md / python3 ${CLAUDE_SKILL_DIR}/../../../scripts/design_systems.py search <term> and adopt that recipe to stabilize decisions.
  3. Build the token theme from the inferred values → 3-tier DTCG (design-tokens skill); generate a single theme.css. Verify every color pair with ${CLAUDE_SKILL_DIR}/../../../scripts/contrast.py / ${CLAUDE_SKILL_DIR}/../../../scripts/validate_contrast.py (light + dark) — a sampled brand color that fails AA gets adjusted; taste never overrides POUR.
  4. Rebuild layout + components token-driven via ${CLAUDE_SKILL_DIR}/../../../frameworks/adapter-protocol.md + ${CLAUDE_SKILL_DIR}/../../../components/*: one shared primitive layer, all 8 states, a11y wired, no emoji (lucide), single theme. Apply taste (design-taste.md) so it doesn't regress to generic.
  5. Verify against the reference — render and screenshot it, compare side-by-side to the reference; run node ${CLAUDE_SKILL_DIR}/../../../scripts/measure_render.mjs, lint_hardcodes.py, taste_audit.mjs, and npm run verify.
Show full SKILL.md (67 more words)Show less

Verification (definition of done)

  • npm run verify is 100% (tokens resolve, contrast AA light+dark, no hardcodes/emoji, real-render WCAG).
  • The rebuilt UI uses ONE inferred token theme — no per-section palettes.
  • A screenshot of the result visibly matches the reference's design language.

Honest limit: this matches the design system, not a pixel-perfect copy. Do not reproduce the reference's photographs, logos, or copyrighted copy — substitute your own or generic placeholders.

© plugin87, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/image-to-code of plugin87/ux-ui-agent-skills.

Open the folder on GitHubat commit 14f8d44

Compare with similar skills

Image To Code next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Image To Code compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Image To Code this skillplugin87/ux-ui-agent-skills1.5k—~900Automated safety check: PassMIT
Impeccablebestofjs/bestofjs3.1k27 repos~2.6kAutomated safety check: PassMIT
Design SystemOhh-889/skyroc79511 repos~1.7kAutomated safety check: PassMIT
Scalar Design Systemscalar/scalar16k—~2.7kAutomated safety check: PassMIT
Stitch Taste Design Systemgoogle-labs-code/stitch-skills8.4k15 repos~3.1kAutomated safety check: PassApache-2.0
UI/UX Design System AdvisorGalaxy-Dawn/claude-scholar5.7k1 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Impeccable

    bestofjs/bestofjs

    A skill your agent uses when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a…

    3.1k GitHub starsUsed in 27 repos~2.6k tokens
    Frontend & DesignAuto-check passed
  • Design System

    Ohh-889/skyroc

    Token architecture, component specifications, and slide generation.

    795 GitHub starsUsed in 11 repos~1.7k tokens
    Frontend & DesignAuto-check passed
  • Scalar's design system — design tokens, theming (@scalar/themes), CSS variables, and the @scalar/components library.

    16k GitHub stars~2.7k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Stitch Taste Design System

    google-labs-code/stitch-skills

    Official

    Generates a DESIGN.md design-language file for Google Stitch that encodes color, typography, layout, component behavior and motion rules to avoid generic AI-looking UI.

    8.4k GitHub starsUsed in 15 repos~3.1k tokens
    Frontend & DesignAuto-check passed
  • UI/UX Design System Advisor

    Galaxy-Dawn/claude-scholar

    Turns a vague UI request into a concrete design system with style, palette, typography and layout guidance from a search script, plus stack-specific implementation advice.

    5.7k GitHub starsUsed in 1 repo~1.1k tokens
    Frontend & DesignAuto-check passed
  • Use UI Kit

    tetherto/pearpass-app-mobile

    A skill your agent uses whenever creating or editing UI in this repo — React Native components, modals, bottom sheets, forms, buttons, inputs, typography, styling, icons, or any .tsx/.jsx work.

    276 GitHub stars~3.3k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed

More from plugin87/ux-ui-agent-skills

All 23 skills in this repo
  • Data-Dense Dashboard Designer

    plugin87/ux-ui-agent-skills

    Lays out dense analytics or trading-terminal screens in banded sections with hand-drawn SVG charts, instead of a wall of identical stat cards.

    1.5k GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • UI Component Spec Designer

    plugin87/ux-ui-agent-skills

    Writes a complete UI component spec with anatomy, variants, sizes, eight interaction states, design-token mapping and accessibility notes before or alongside code.

    1.5k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Design Project Scaffold

    plugin87/ux-ui-agent-skills

    Creates a new design-product project from the kit's product-design template, then installs the engine folders and the Playwright dependency that the quality gates need.

    1.5k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Accessibility Audit

    plugin87/ux-ui-agent-skills

    Audits a UI or design against WCAG 2.2 and ARIA patterns and returns findings with the criterion, severity and a specific fix for each.

    1.5k GitHub stars~542 tokensUpdated today
    Auto-check passed
  • Apply Aesthetic

    plugin87/ux-ui-agent-skills

    Applies a chosen visual direction, an archetype or one of 138 named design systems, by remapping design tokens, then checks contrast before it finishes.

    1.5k GitHub stars~597 tokensUpdated today
    Auto-check passed
  • Brand Kit Design Tokens

    plugin87/ux-ui-agent-skills

    Builds a from-scratch brand design system as three-tier DTCG tokens plus one theme.css with light and dark modes, checked against WCAG contrast rules.

    1.5k GitHub stars~809 tokensUpdated today
    Auto-check passed

Questions about Image To Code

What does Image To Code do?

Turn a reference image, screenshot, or mockup into token-driven, accessible code — infer the design system from the reference (palette, type scale, spacing, radius, layout archetype), map it to the…. Image To Code is an agent skill from plugin87/ux-ui-agent-skills. Turn a reference image, screenshot, or mockup into token-driven, accessible code — infer the design system from the reference (palette, type scale, spacing, radius, layout archetype), map it to the 3-tier tokens, rebuild it, then verify with the kit's gates.

When should I use Image To Code?

Image To Code fits situations like: the user provides a design/screenshot and wants matching UI code; tasks that involve Design systems; tasks that involve Typography.

How do I install Image To Code in Claude Code?

Run `npx skills add plugin87/ux-ui-agent-skills --skill image-to-code -a claude-code`. Or copy the skill folder (.claude/skills/image-to-code in plugin87/ux-ui-agent-skills) into .claude/skills/image-to-code in your project. Claude Code loads it when a task matches its description.

How do I install Image To Code in Codex?

Run `npx skills add plugin87/ux-ui-agent-skills --skill image-to-code -a codex`. Or copy the skill folder (.claude/skills/image-to-code in plugin87/ux-ui-agent-skills) into .agents/skills/image-to-code in your project. Codex loads it when a task matches its description.

Can I use Image To Code in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add plugin87/ux-ui-agent-skills --skill image-to-code -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/image-to-code, .gemini/skills/image-to-code, .github/skills/image-to-code and .opencode/skills/image-to-code in your project.

What does Image To Code need to run?

Going by SKILL.md and its folder, Image To Code needs the command-line tools its instructions call (npx, npm, python3 and node). Our summary lists: Python 3; Node.js.

Does Image To Code access the network?

SKILL.md contains no URLs. Its commands use npx and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Image To Code safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Image To Code use?

Image To Code is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Image To Code use?

About 900 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Image To Code?

Skills that share tags, products or a category with Image To Code: Impeccable (bestofjs/bestofjs, 3.1k stars), Design System (Ohh-889/skyroc, 795 stars), Scalar Design System (scalar/scalar, 16k stars) and Stitch Taste Design System (google-labs-code/stitch-skills, 8.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Image To Code?

plugin87 (a GitHub user) maintains it in plugin87/ux-ui-agent-skills, which has 1,543 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on October 7, 2026.

Source: plugin87/ux-ui-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.