image-to-code

image-to-code is a skill for Claude Code, Codex from agentlas-ai/agentlas-desktop. It costs 30 tokens per session (644 once invoked), scanned A, original, Apache-2.0.

A tool that turns a reference screenshot or Figma design into a responsive, interactive frontend prototype. It follows the visual details of the reference while building the interface.

In plain words
What is it for?
Use it to recreate a website or app screen from a screenshot or Figma node, produce matching visual assets, and check the result against the reference design.
Why use it?
It removes guesswork when matching an existing design, including its layout, typography, colours, spacing, and images.

Skill for Claude CodeCodex

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentlas-ai/agentlas-desktop/image-to-code.svg)](https://agentmods.dev/skills/agentlas-ai/agentlas-desktop/image-to-code)
Your own site
<a href="https://agentmods.dev/skills/agentlas-ai/agentlas-desktop/image-to-code"><img src="https://agentmods.dev/badge/skills/agentlas-ai/agentlas-desktop/image-to-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 644 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.00030 $0.00644
Opus 5 $0.00015 $0.00322
Sonnet 5 $0.00006 $0.00129
Haiku 4.5 $0.00003 $0.00064

Measured 3d ago against content hash 223bebe70f9c, 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 3d 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.

plugins/design/skills/image-to-code/SKILL.md · 43 lines

How it starts

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

Skill Purpose

Translates the pinned visual target design (assets/target-design.png) into a fully interactive, responsive frontend prototype by continuously referencing the pinned image, extracting design tokens, and reproducing every layout detail identically.

Preconditions

  • A pinned visual target image (assets/target-design.png or equivalent screenshot/Figma node) must be available. Do not begin implementation from a text-only brief.
  • Adhere to $critical-overrides and $qa-rubric.

Steps

  1. Load & Inspect Pinned Target:
    • Open and continuously reference assets/target-design.png throughout the entire implementation process.
    • Inspect exact typography scale (sizes, optical weights, letter-spacing), color tokens (backgrounds, accents, borders), and layout grid/spacing metrics directly from the image.
  2. Catalog & Produce Real Assets:
    • Catalog all raster assets (hero imagery, avatars, product illustrations, badges) visible in the pinned design.
    • Generate high-resolution assets using Image Gen matching the exact art direction and aspect ratios.
    • Never replace image assets with handcrafted CSS shapes, div drawings, or emoji text glyphs. Use clean SVG icon libraries for standard icons.
  3. Scaffold & Build Frontend Code:
    • Scaffold the prototype matching the intended form factor (mobile app 390x844 or desktop web).
    • Write clean, modular HTML/CSS/JS or framework code faithfully matching the typography, colors, and layout rhythm of the pinned image.
    • Implement functional interactive elements: navigation, tabs, inputs, filters, buttons, modal dialogs, and visible UI states (hover, focus, active, loading).
  4. Launch Local Preview Server:
    • Start the local dev server to render the prototype in a real browser environment.
  5. Continuous 1:1 Side-by-Side QA ($design-qa):
    • Capture live browser screenshots of the rendered prototype (implementation.png).
    • Run side-by-side comparison against assets/target-design.png across the 5 required fidelity surfaces.
    • Remediate all visual discrepancies (P0, P1, P2) in code until design-qa produces final result: passed.
  6. Handoff: Keep the local development server active and present the completed, verified prototype to the user.

Read the full file on GitHub · 43 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. 3d ago First seen · 43 lines · 30 tokens per session scan A 223bebe70f9c

Subscribe to this mod's changes

image-to-code is a skill published in the GitHub repository agentlas-ai/agentlas-desktop (5 stars, last pushed 4d ago), licensed Apache-2.0. It adds 30 tokens to every session and 644 once invoked, about $0.0002 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

shadcn

Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for…

ensemblr-hq/ensemblr · 90 tokens

accessibility

Primary accessibility skill for VS Code. REQUIRED for new feature and contribution work, and also applies to updates of existing UI. Covers accessibility help dialogs, accessible views, verbosity settings, signals, ARIA announcements, keyboard navigation, and ARIA labels/roles.

microsoft/vscode · 54 tokens

cua-driver

Drive a native GUI app (macOS, Windows, Linux) via the cua-driver CLI (default) or MCP server; snapshot its accessibility tree, act through snapshot-bound element tokens, native menu paths, exact window geometry, or pixel coordinates, and verify from fresh state. Use when the user asks you to operate, drive, automate…

trycua/cua · 98 tokens

peekaboo

Use Peekaboo for macOS desktop automation, screenshots, visual UI maps, native accessibility inspection, app/window/menu/dialog control, native app and browser chrome control, browser-page MCP tooling, MCP diagnostics, and Peekaboo repo validation. Use when Codex needs current macOS UI state, direct desktop control…

openclaw/Peekaboo · 82 tokens

gui-settings-ui

GUI desktop app only. How to build a Settings page in the Warp client (app/src/settingsview) so its widgets and settings search behave correctly — picking a PageType, deciding whether a heading belongs in the page-title slot or inside a widget, gating a widget, and scoping searchterms per widget. Use when adding or…

warpdotdev/warp · 86 tokens

figma-code-connect-components

Connects Figma design components to code components using Code Connect mapping tools. Use when user says "code connect", "connect this component to code", "map this component", "link component to code", "create code connect mapping", or wants to establish mappings between Figma designs and code implementations. For…

warpdotdev/warp · 81 tokens