# UI Image to Code Studio — Screenshot & Website to Code Skill for Codex **Screenshot to code · Website to code · Visual editor · Codex Skill** [English](README.md) · [简体中文](README_ZH.md) · [Visual cases](examples/README.md) · [5-minute setup](#install-in-five-minutes) · [Maintenance](MAINTENANCE.md) · [Changelog](CHANGELOG.md) · [Search & discovery](docs/SEARCH_DISCOVERY.md) [![Validate Skill](https://github.com/zwq-top/ui-image-to-code-studio/actions/workflows/validate.yml/badge.svg)](https://github.com/zwq-top/ui-image-to-code-studio/actions/workflows/validate.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-2563eb.svg)](LICENSE) [![Version](https://img.shields.io/badge/version-0.1.2-16a34a.svg)](CHANGELOG.md) [![Maintenance: active](https://img.shields.io/badge/maintenance-active-16a34a.svg)](MAINTENANCE.md) [![Codex Skill](https://img.shields.io/badge/Codex-Skill-111827.svg)](skill/SKILL.md) ![UI Image to Code Studio — screenshot to maintainable code and visual refinement](docs/images/social-preview.png) Turn an authorized UI screenshot or website into traceable visual evidence, maintainable frontend source, browser-validated parity, and an editable Studio document. Refine the final few pixels visually, then let Codex review and apply a minimal source patch with revision and rollback evidence. `screenshot-to-code` · `website-to-code` · `ui-to-code` · `screenshot-to-react` · `Codex Agent Skill` · `visual editor` · `browser automation` · `visual parity` ## Understand it in 30 seconds | You provide | Codex produces | You receive | | --- | --- | --- | | AI-generated UI, an authorized screenshot, or a mockup | Atomic structure, geometry, text, icon, control, and hierarchy evidence | Real React, Vue, or HTML/CSS/JS source | | An authorized public or local URL | Visible pages, menu states, stable interactions, and screenshots | A state graph and reproducible interaction evidence | | An optional screen recording | Timing, transitions, and button destinations | Interaction specifications without inventing unseen behavior | | Final visual adjustments | Stable element identities and semantic revisions | Editable layers, real-project preview, source patch, and rollback record | This is not a screenshot slicer. The source is the product; screenshots are evidence. ## The result: real UI, editable layers, safe source roundtrip ![UI Image to Code Studio with a page directory, editable DOM layers, canvas, and properties](docs/images/studio-editor.png) Studio can select menus, icons, text, containers, and controls independently. A saved change carries stable `data-ui-id` identities, a revision, and a source-baseline hash. Codex can then review the semantic operation, generate a minimal patch, and validate the actual project URL rather than trusting an editor-only preview. | Maintainable output | Visual refinement | Verification and recovery | | --- | --- | --- | | Semantic components, responsive layout, consistent SVG assets | Atomic layers, eight-way resize, rulers, guides, snapping, undo/redo | Fixed-viewport screenshots, real-project preview, revision rollback | ## Workflow ```mermaid flowchart LR A["Screenshot / authorized URL"] --> B["Visual and interaction evidence"] B --> C["UI specification"] C --> D["Real frontend source"] D --> E["Browser parity checks"] E --> F["Studio refinement of real DOM"] F --> G["Codex minimal source patch"] G --> H["Refresh / verify / roll back"] ``` Shortest prompt: ```text Use ui-image-to-code in blind-visual mode to recreate this authorized screenshot. Build atomic layer evidence first, generate maintainable source, validate it in the browser, then prepare the real UI for Studio refinement and a safe source roundtrip. ``` ## Verified visual cases ### Flagship · Case 01 — PixelCraft Workbench The first image is a fresh screenshot of the real local project running at `http://127.0.0.1:4310/`; it is not a screenshot of the reference website. ![PixelCraft Workbench real runtime home](examples/designkit-cn/media/runtime-home.jpg) [![26-second real interaction demo](examples/designkit-cn/media/pixelcraft-demo-cover.png)](examples/designkit-cn/media/pixelcraft-demo.mp4) This replays the existing local implementation through Home → Product Set → Settings → Cutout → Editable Design. The runnable source uses the original **PixelCraft Workbench / 像素造物台** name and a code-native SVG mark rather than third-party branding. [Try the live demo](https://zwq-top.github.io/ui-image-to-code-studio/) · [Download the demo source ZIP](examples/designkit-cn/media/pixelcraft-workbench-demo-source.zip) · [Browse source](examples/designkit-cn/demo/) · [Play MP4](examples/designkit-cn/media/pixelcraft-demo.mp4) · [Open interaction trace](examples/designkit-cn/media/interaction-trace.json) | Home | Product set | Cutout | Editor | | --- | --- | --- | --- | | ![Home](examples/designkit-cn/artifacts/implemented-home.png) | ![Product set](examples/designkit-cn/artifacts/implemented-product-set.png) | ![Cutout](examples/designkit-cn/artifacts/implemented-cutout.png) | ![Editor](examples/designkit-cn/artifacts/implemented-editor.png) | **Case status: completed.** The home page and three feature surfaces are runnable; the six-step interaction path, unified code-native SVG icons, live demo, downloadable source, and browser captures are public. This case is accepted as a runnable visual implementation with a core interaction demo. Universal Studio-to-source integration for arbitrary external projects is a separate capability, not a reason to mark this showcase as failed. [Open the completed PixelCraft case](examples/designkit-cn/README.md) · [Read its acceptance review](examples/designkit-cn/artifacts/gate-review.json) ### Additional cases The remaining examples are intentionally separated from the flagship: Case 02 verifies a multi-page menu journey, while Case 03 documents editable Studio layers and the safe revision protocol. #### Case 02 — Renovation Viral Assistant The first image is a fresh screenshot of the actual project running at `http://127.0.0.1:4321/?view=home&mock_data=1`. ![Renovation Viral Assistant real runtime home](examples/renovation-viral-assistant/artifacts/runtime-home.jpg) | Home state | Analysis | Script factory | | --- | --- | --- | | ![Home](examples/renovation-viral-assistant/artifacts/home-reference.jpg) | ![Analysis](examples/renovation-viral-assistant/artifacts/analysis-reference.jpg) | ![Script factory](examples/renovation-viral-assistant/artifacts/script-factory-reference.jpg) | This Chinese dashboard case used `blind-visual` mode without reading source. All three states were replayed in a real browser with zero console errors, and Studio page-tree and deep-layer screenshots are included. It is complete within its published acceptance scope: a multi-page browser journey with editable semantic layers. [Open the complete Renovation case](examples/renovation-viral-assistant/README.md) #### Case 03 — Studio editable layers and revision protocol ![Studio editable layers, canvas, and properties](docs/images/studio-editor.png) This capability case shows the page directory, semantic layers, real-DOM canvas, properties, stable `data-ui-id` identities, and revision model working together. The editor, identity protocol, installer, and source-roundtrip smoke tests are packaged. When connected to a concrete project, Codex runs that project's preview, apply, refresh, verification, and rollback adapter. [Open the Studio capability case](examples/studio-visual-editor/README.md) ## Questions people use to find this Skill ### Is there a Codex Skill that converts screenshots to React, Vue, or HTML? Yes. After `ui-image-to-code` is installed, Codex can turn an authorized UI screenshot into atomic visual evidence, maintainable frontend source, and browser-validated output. ### Can an AI-generated UI image become editable layers and real code? Yes. The image is evidence, not the final product. The workflow generates semantic source and stable Studio layers so geometry, text, icons, and styling can be refined later. ### Can Codex recreate an authorized website from a URL? Yes, within the visible and authorized scope. The Skill records pages, menus, click destinations, stable states, and screenshots instead of inventing hidden behavior. ### Does Studio discover the latest real project menu automatically? Yes. Before Studio import, the Skill starts the current project on loopback, safely replays its stable menu entries in an isolated browser, records localized labels and real layer counts, and blocks stale or hand-written menu manifests. Single-click switches the real UI; double-click or the disclosure control expands that menu's editable layers inline. ### Can I fine-tune the generated UI like Figma or Photoshop? Studio provides layers, properties, rulers, guides, snapping, zoom, pan, undo, and revisions. Codex then reviews the semantic edit and prepares a minimal source patch. ### Does source-blind screenshot reconstruction work? Use `blind-visual` mode when the test must not inspect hidden source. Screenshot evidence, visible interactions, and browser results remain the only implementation inputs. ### Can a screen recording capture menu transitions and motion? Yes, as supplemental interaction evidence. Stable screenshots, URLs, action traces, and browser replay remain the acceptance evidence. See [Search and discovery](docs/SEARCH_DISCOVERY.md) for the discovery model, canonical metadata, and query map. ## Install in five minutes Ask Codex: ```text Install the ui-image-to-code Skill from https://github.com/zwq-top/ui-image-to-code-studio/tree/main/skill and tell me how to validate it. ``` Or install manually in PowerShell: ```powershell git clone https://github.com/zwq-top/ui-image-to-code-studio.git Copy-Item -Recurse -Force .\ui-image-to-code-studio\skill $HOME\.codex\skills\ui-image-to-code ``` Restart Codex, open a new task, attach an authorized screenshot, and ask to use `ui-image-to-code`. See [Install and Run](docs/INSTALL_AND_RUN.md) for the full walkthrough. ## Delivery gates A result cannot be presented as complete unless it passes the applicable gates: 1. Atomic text, icon, control, container, and image evidence. 2. No screenshot-as-page shortcut and no Emoji/Unicode product icons. 3. A fixed viewport and repeatable browser screenshot. 4. Critical interaction states represented by observed evidence. 5. Studio changes mapped to stable identities and a known source baseline. 6. Real-project preview, verification, and rollback kept as separate states. 7. Visible P0 issues cleared and every case evaluated against its declared acceptance scope. ## Project maturity `v0.1.2` is an installable MIT-licensed release. It includes two completed visual case dossiers, one Studio capability case, evidence schemas, smoke-tested scripts, and CI release gates. The current product is a Codex Skill plus local engineering tools; fidelity is verified per project with browser evidence rather than promised as an automatic universal percentage. ## Maintenance, releases, and public evidence | Status | Public evidence | | --- | --- | | Maintenance | **Active** · [policy and supported versions](MAINTENANCE.md) | | Current release | `0.1.2` · [GitHub Release](https://github.com/zwq-top/ui-image-to-code-studio/releases/tag/v0.1.2) | | Changes | [Changelog](CHANGELOG.md) · [compare with main](https://github.com/zwq-top/ui-image-to-code-studio/compare/v0.1.2...HEAD) | | Next work | [Roadmap](ROADMAP.md) · [adoption plan](docs/ADOPTION_AND_FEEDBACK.md) | | Engineering health | [Issues](https://github.com/zwq-top/ui-image-to-code-studio/issues) · [Actions](https://github.com/zwq-top/ui-image-to-code-studio/actions) · [release process](docs/RELEASE_PROCESS.md) | | Open-source application evidence | [Codex for Open Source readiness](docs/CODEX_FOR_OSS_READINESS.md) | Every tagged release is built from the matching Changelog section, attaches an installable ZIP and SHA-256 checksum, and links back to maintenance and verification evidence. Activity claims must be supported by real commits, CI, issues, pull requests, releases, or public adoption records. ## Documentation - [Visual case gallery](examples/README.md) - [Install and run](docs/INSTALL_AND_RUN.md) - [End-to-end walkthrough](docs/END_TO_END_WALKTHROUGH.md) - [Architecture](docs/ARCHITECTURE.md) - [Maintenance and release status](MAINTENANCE.md) - [Changelog](CHANGELOG.md) - [Release process](docs/RELEASE_PROCESS.md) - [Codex for Open Source readiness](docs/CODEX_FOR_OSS_READINESS.md) - [Public release boundary](docs/PUBLIC_RELEASE_BOUNDARY.md) - [Media and SEO kit](docs/PROJECT_MEDIA_KIT.md) - [Roadmap](ROADMAP.md) - [Contributing](CONTRIBUTING.md) ## License The public repository is licensed under [MIT](LICENSE). Third-party products, screenshots, trademarks, and referenced UI remain subject to their respective owners and usage permissions. Use the workflow only on interfaces you are authorized to inspect or reproduce.