explaingit

seminechen/yueban-image-to-code

Analysis updated 2026-05-18

27PythonAudience · developerComplexity · 2/5Setup · easy

TLDR

A Codex skill that converts mobile UI screenshots into pixel-accurate HTML, CSS, and JavaScript code at a fixed 750-pixel design width.

Mindmap

mindmap
  root((image to code))
    What it does
      Screenshot to code
      Asset export
      Drift checking
      Manifest generation
    Tech stack
      Python
      Codex
      HTML CSS JS
    Use cases
      Mobile UI conversion
      Pixel accurate reproduction
    Audience
      Frontend developers
      Codex users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Convert a mobile UI design screenshot into working HTML, CSS, and JavaScript code.

USE CASE 2

Export individual transparent PNG assets like avatars and icons from a design image.

USE CASE 3

Verify that generated code matches the original design by comparing rendered screenshots for drift.

USE CASE 4

Preview element bounding boxes on a source image before assets are cut out.

What is it built with?

PythonCodexHTMLCSSJavaScript

How does it compare?

seminechen/yueban-image-to-codeavbiswas/sam2-mlxchanthruu/wind_energy_monitor
Stars272727
LanguagePythonPythonPython
Setup difficultyeasymoderatemoderate
Complexity2/54/53/5
Audiencedeveloperresearcherdata

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires placing the skill directory into Codex's skills folder and invoking it by name in a Codex session.

The README does not state a license, so usage rights are unclear.

In plain English

This repository is a skill for Codex, the OpenAI command-line coding tool, that converts mobile UI screenshots or design images into working HTML, CSS, and JavaScript code. The README is written in Chinese. The stated goal is pixel-accurate reproduction of the original image at a fixed canvas width of 750 pixels, which is a standard width used for mobile UI design in Chinese app development. The workflow starts by reading the source image and calculating a scale factor so that everything fits the 750-pixel-wide canvas. It then creates a manifest file that records the position, size, type, and layer order of every element found in the image. Using that manifest, it exports individual pieces of the image, such as avatars, icons, and illustrations, as separate transparent PNG files. Finally, it generates code that places each element at the exact position from the manifest. Several rules are enforced throughout. The original image is treated as the only visual reference, and the tool is not permitted to substitute similar icons, stock illustrations, or AI-generated placeholders. Text must remain editable rather than being baked into images. Simple shapes like buttons, cards, and dividers are implemented as CSS rather than exported as images. Auto-trimming and smart cropping of exported assets are explicitly disabled. Four Python scripts are included to support the workflow: one previews the bounding boxes on the source image before any cutting happens, one exports individual PNG assets by exact coordinates, one audits the exported PNGs to verify transparency and sizing, and one compares the final rendered screenshot against the original 750px reference image to detect drift. Installation involves placing the directory into Codex's skills folder and then invoking the skill by name from within a Codex session.

Copy-paste prompts

Prompt 1
Use this Codex skill to convert my mobile UI screenshot into pixel-accurate HTML and CSS.
Prompt 2
How do I install this image-to-code skill into Codex's skills folder?
Prompt 3
Explain how the manifest file records element positions before code generation.
Prompt 4
Run the drift-check script to compare my rendered page against the original design image.

Frequently asked questions

What is yueban-image-to-code?

A Codex skill that converts mobile UI screenshots into pixel-accurate HTML, CSS, and JavaScript code at a fixed 750-pixel design width.

What language is yueban-image-to-code written in?

Mainly Python. The stack also includes Python, Codex, HTML.

What license does yueban-image-to-code use?

The README does not state a license, so usage rights are unclear.

How hard is yueban-image-to-code to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is yueban-image-to-code for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.