Index of every page on this site: llms.txt
All skills
chensir-indie avatar

/image-to-layered-html-prototype

@b6c2291
Run it yourself

Rebuild approved app images as editable HTML/CSS/SVG or repair their fidelity; also supports UI concepts, prompts, scoped design reviews and refinement, multi-page design systems and optional Flutter handoff.

Use this Skill: https://skilld.dev/gh/chensir-indie/app-dev-skills/image-to-layered-html-prototype

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈60 tokens for metadata: the name and description. ≈1.9k when used: this file. ≈19k more on demand in 20 files.

Description uses 3.0% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈242 characters, or 3.0%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Image to Layered HTML Prototype

Choose the requested branch. Full reconstruction defaults to layered_rebuild: editable DOM text, visible semantic controls, CSS/SVG backplates and separate photo/subject assets. A one-to-one request raises fidelity; full-screen images, UI slices, Canvas or transparent hotspots cannot replace editable layers.

Choose the starting point

Request Action and endpoint
Directions, prompts or reference images only Follow imagegen workflow; stop at the requested concept artifact
Full prototype from a product direction Generate, inspect and lock a front-facing UI reference, then follow steps 1–5
Full prototype from approved images Preserve the approved direction and follow steps 1–5
Fidelity repair of existing HTML Preserve source/assets/interactions, save before captures and inventory the page; apply the relevant steps below
Design review or refinement Follow design quality review; review-only does not edit, authorized refinement delivers changes and before/after checks without an automatic full pixel contract
Multiple references Freeze every page; accept page by page unless the user requests all drafts first

Distinguish faithful reconstruction from active refinement. “Improve” does not unlock frozen design constraints. For exploration/refinement, select one primary standard using design sources, preserving project conventions. If the goal is store artwork or competitor analysis, read the available corresponding skill's actual SKILL.md before routing; its absence need not block useful scoped work.

Before dependent scripts, run sh scripts/doctor.sh from this skill directory (--scope python or --scope browser as appropriate). Follow setup for repairs. Concepts/prompts need no rendering environment; continue independent work while dependent checks remain pending.

For an existing reconstruction, preserve its source and before screenshot, add data-artboard to the existing root if absent, then run:

node scripts/inventory_page.cjs /absolute/path/to/page

It requires index.html, reference/source.png and [data-artboard]. Its DOM inventory/captures do not supply independent reference measurements or acceptance.

1. Freeze the reference and acceptance target

Record full-resolution reference/SHA, page/state, language and fixture data. Lock image/CSS pixels, DPR and browser environment using render contract; retain the full reference even when measuring crops.

Before implementation, establish design tokens/components and freeze one_to_one limits and role ROIs. Keep fixed ceilings and the baseline unchanged when checks fail. For multiple pages, freeze expected-pages.json from the complete reference set.

Gate: reference identity, states and acceptance targets are traceable.

2. Measure independently and establish contracts

Use reference geometry to measure the source image before comparing with DOM geometry. Keep referenceBounds (source layout box), bounds (implementation box) and text referenceInkBounds (visible glyphs) distinct, with methods/evidence bound to the source SHA. OCR ink is not a CSS line box; copied DOM values are not source measurements.

Apply geometry, typography and layer manifest contracts to all visible text and controls, using unique selectors.

Gate: complete layer contracts and independently attributable reference/implementation measurements.

3. Reconstruct assets and layered HTML

Apply asset audit, reconstruction and HTML/CSS contract. Prefer original assets; extract or reconstruct missing individual assets with provenance and uncertainty. Approximate subjects can support structural debugging but not visual acceptance.

Place assets in the real HTML and compare actual browser A/B captures at full-image and asset-ROI scale. Use compare_candidate.py before contracts exist, then compare_iteration.py with frozen ROIs; follow visual convergence. Improvement alone is not acceptance.

Gate: independently editable/hideable layers, visible primary interactions with return/close behavior, and adaptation evidence for baseline, smaller/larger screens and long copy.

4. Capture and converge

Follow acceptance and visual convergence. Wait for fonts/images; stabilize data, clock, scroll and animation. Capture current-source screenshots, DOM and hash receipts:

node scripts/capture_native.cjs /absolute/path/to/prototype playwright home
python3 scripts/diagnose_visual.py /absolute/path/to/prototype --state home

The state ID labels evidence; it does not activate the state. Trigger and verify routes/dialogs/forms/selections in the same browser session before capture. Defaults are file:// and DPR=1; implement other render-contract policies explicitly.

Keep reference/actual pairs, overlays, threshold-0 raw diffs and layer-toggle proofs. Repair assets/background/fonts before details, one cause category per iteration, checking regressions. After two non-improving iterations in one category, change the asset or measurement/rendering method. Enforce acceptance's exact local limits: at least 75% ROI union, 80% matching-role coverage for key layers and required layer centers; full-image averages do not replace local checks.

Inspect design quality without relaxing frozen limits or applying unrequested redesign. Record concrete observations for asset identity, background, typography, contours, layering and controls in manualReview.states[].

Gate: every requested state has a real trigger/current capture, frozen numeric checks pass and visual inspection finds no unresolved mismatch.

5. Accept and deliver each page

python3 scripts/validate_manifest.py /absolute/path/to/prototype/layer-manifest.json
python3 scripts/validate_prototype.py /absolute/path/to/prototype

Mark passed only when strict validation and manual visual review pass. --structure-only, file/hash presence and numeric success establish only their own scope. Report editability, fidelity, interactions and adaptation separately. Repair critical differences; for actual blockers, record missing items, attempts, errors and failed checks.

Apply the gate to every page; any pending page leaves the batch pending. For all-drafts-first requests, follow multi-page progress: deliver editable drafts, separate assets and native captures for every reference, then finish measurements/contracts and strict acceptance per page. Continue feasible pages while another is blocked.

Deliver source, assets, references, tokens, manifests, render configuration, state matrix, measurement tables, interaction map and evidence under the design-system and acceptance contracts. Read Flutter mapping only for that handoff. Link existing files with next goal, reference SHA, pages/states, entrypoints, four acceptance statuses and failed checks. Prototype captures remain distinct from actual app captures for store materials.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts28d3 checks · Risk SAFE
  • Gen Agent Trust Hub28d

    This skill is a legitimate development tool for converting UI images into layered HTML. It uses browser automation and image analysis. The main security considerations are its inherent attack surface for indirect prompt injection (as it processes user-provided HTML and images) and its use of standard dynamic execution patterns for environment setup and browser interaction.

  • Socket28d

    No alerts

  • Snyk28d

    Risk: LOW · No issues

Signed by skilld at b6c2291. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 weeks ago.

Activeupdated 4 weeks ago

README badge

README badge for chensir-indie/app-dev-skills/image-to-layered-html-prototype