Screenshot to Interface
Treat references as evidence, not as a bitmap to trace blindly. Reconstruct the underlying layout and behavior while preserving maintainability and rights.
Trigger boundary
Use this skill for:
- implementing a page, screen, component, or flow from screenshots;
- translating a design comp into responsive components;
- auditing why an implementation differs from its reference;
- inferring a coherent component/system model from multiple visual states.
Do not trigger for:
- deciding an original visual direction without a reference—use
product-design-director;
- a production web/mobile audit unrelated to reference fidelity—use the platform builder;
- extracting or redistributing protected assets without permission;
- image OCR or screenshot transcription where no interface reconstruction is requested.
Required inputs
Obtain or record as unknown:
- all reference images and their source/provenance;
- pixel dimensions, device scale factor, viewport, orientation, theme, locale, and state if known;
- target repository, stack, routes, and existing design system;
- required interactions, responsive range, browsers/devices, and accessibility target;
- asset rights and available original logos/icons/fonts/images;
- acceptable fidelity tolerance and whether content may be adapted.
Do not infer one desktop screenshot as the complete responsive specification.
Provenance
This skill is an original restructuring that selectively adapts visual-reference and fidelity concepts from Leonxlnx/taste-skill. Read references/provenance.md and preserve the root notice.
Safety baseline
- Inspect repository and working-tree state before editing.
- Reuse existing tokens/components when they can express the reference without distortion.
- Do not replace project architecture, framework, or styling system solely for visual convenience.
- Do not embed screenshots as the interface, hard-code coordinates for one viewport, or use inaccessible canvas/text images for ordinary UI.
- Do not download fonts/assets from a reference without rights and license evidence.
- Preserve user code and keep generated or broad formatting changes out of the diff.
Workflow
1. Build the reference register
For every image record:
ID/path:
Source and rights:
Pixel dimensions/device scale:
Inferred viewport/device:
Theme/locale/state:
Known relationships to other images:
Quality issues/crops/occlusion:
Mark what is visible, implied, or unknown. Do not present guessed font names, exact pixel values, or interaction behavior as observed facts.
2. Inspect the target implementation context
Identify:
- framework, rendering model, routes, component and styling conventions;
- existing tokens, fonts, icons, assets, layout primitives, and accessibility helpers;
- content/data boundaries and state management;
- test, story, screenshot, and browser/device verification tooling;
- constraints such as CSP, image optimization, localization, theming, or native safe areas.
If production architecture is missing or unsafe, reconstruct the bounded interface first and hand hardening to the relevant builder.
3. Decompose the visual structure
Use references/visual-decomposition.md. Infer:
- page/screen regions and stacking contexts;
- layout model: flow, grid, flex, overlay, sticky/fixed, scroll container;
- containers, gutters, alignment lines, column spans, aspect ratios, and whitespace rhythm;
- typography roles, wrapping, line height, emphasis, and truncation;
- semantic color/surface/elevation/border/radius rules;
- components, variants, repeated motifs, and one-off art-directed exceptions;
- interactive, loading, empty, selected, disabled, error, and navigation states visible across images.
Choose relative constraints before literal pixels. Derive a model that explains all references with minimal exceptions.
4. Handle content and assets
Follow references/asset-handling.md:
- prefer provided originals and repository assets;
- match crop/focal treatment through responsive media containers;
- recreate simple geometric decoration in CSS/SVG only when legally and technically appropriate;
- replace unavailable protected assets with approved placeholders that preserve layout, and disclose fidelity impact;
- load fonts through the project's licensed mechanism or select an approved metric-compatible alternative;
- preserve alt text and decorative semantics.
Do not stretch a raster crop to hide missing source material.
5. Infer responsive behavior
Across references, distinguish invariant rules from viewport-specific outcomes. Infer:
- fluid versus capped dimensions;
- wrap/reflow/reorder/collapse behavior;
- breakpoint conditions where composition fails;
- media crop and focal-point changes;
- navigation and control transformations;
- touch target, safe-area, keyboard, orientation, and dynamic-type behavior;
- content overflow for long text and localization.
For missing breakpoints, formulate hypotheses and test intermediate widths. Prefer continuity over a collection of unrelated snapshots.
6. Design component boundaries
Create components where there is semantic behavior, state, repeated structure, or a stable visual primitive. Avoid:
- one component per visual rectangle;
- a giant page component with repeated magic values;
- abstractions used once that obscure geometry;
- premature universal tokens from one screenshot;
- duplicating an existing project primitive with slightly different styling.
Separate content/data from layout when it enables state and responsive testing. Keep art-directed exceptions explicit.
7. Establish the first implementation
Implement in this order:
- semantic document/screen structure and interaction model;
- major geometry, scroll behavior, and responsive containers;
- typography metrics and content wrapping;
- assets/media crops;
- color, borders, radii, elevation, and effects;
- states and transitions;
- fine optical alignment.
Use real or shape-representative content early. A layout tuned to short placeholders is not faithful.
8. Compare iteratively
Use references/fidelity-loop.md. At each target viewport/state:
- capture the implementation in the same dimensions, theme, content, and scroll position;
- compare side by side and, where tooling permits, overlay/difference images;
- classify mismatches by structure, geometry, typography, asset, color/material, state, or rendering;
- fix the highest-level mismatch first;
- repeat at intermediate responsive widths to avoid overfitting.
Never declare fidelity from memory or from inspecting source code alone.
9. Verify accessibility and interaction
Even when the reference omits them, implement:
- correct landmarks/headings/roles or native semantics;
- keyboard/touch/pointer operation and visible focus;
- accessible names, error/status communication, and logical order;
- sufficient contrast or document a reference conflict requiring design decision;
- reduced motion and no information conveyed only through animation/color;
- zoom, dynamic type, localization, and content overflow behavior.
When accessibility requires a visible deviation, preserve hierarchy and document the reason rather than silently copying an inaccessible reference.
10. Finish and hand off
Return:
- reference register and uncertainty log;
- structural/component/responsive model;
- asset/provenance decisions;
- exact files changed;
- target and intermediate viewport comparison results;
- interaction/accessibility checks;
- known fidelity differences with reason and severity;
- production concerns for the platform builder.
Interaction boundaries
product-design-director resolves ambiguous or conflicting visual direction.
production-web-builder owns data, auth, rendering architecture, performance, SEO, observability, and production browser verification beyond the reference-bound slice.
- Flutter/Expo builders own native platform conventions, performance, release, and device integration.
documentation-synchronizer updates user/developer documentation and screenshots after the final behavior stabilizes.
Failure handling
- If reference dimensions or state are unknown, test multiple plausible viewports and label confidence.
- If images conflict, establish whether they represent breakpoints, themes, states, or different revisions; do not merge them arbitrarily.
- If an asset is unavailable or unlicensed, preserve layout with an approved substitute and report the gap.
- If exact fidelity requires brittle fixed positioning, revise the underlying model and document any deliberate tolerance.
- If browser/font rendering creates small differences, verify font files, weight availability, device scale, antialiasing, and screenshot environment before tuning offsets.
Stop conditions
Stop when the component model explains all supplied references, comparisons pass the agreed tolerance at target and intermediate viewports, accessibility/interaction requirements are met or conflicts are explicitly decided, and remaining differences are documented. Do not claim production readiness outside the reconstructed scope.
1---2name: screenshot-to-interface3description: Reconstruct a maintainable interface from screenshots or visual references through evidence capture, structural decomposition, asset handling, responsive inference, component boundaries, accessibility, and iterative visual comparison. Use when fidelity to supplied visual evidence is the primary requirement. Do not use for greenfield art direction, generic frontend production hardening, or copying assets without rights.4---56# Screenshot to Interface78Treat references as evidence, not as a bitmap to trace blindly. Reconstruct the underlying layout and behavior while preserving maintainability and rights.910## Trigger boundary1112Use this skill for:1314- implementing a page, screen, component, or flow from screenshots;15- translating a design comp into responsive components;16- auditing why an implementation differs from its reference;17- inferring a coherent component/system model from multiple visual states.1819Do not trigger for:2021- deciding an original visual direction without a reference—use `product-design-director`;22- a production web/mobile audit unrelated to reference fidelity—use the platform builder;23- extracting or redistributing protected assets without permission;24- image OCR or screenshot transcription where no interface reconstruction is requested.2526## Required inputs2728Obtain or record as unknown:29301. all reference images and their source/provenance;312. pixel dimensions, device scale factor, viewport, orientation, theme, locale, and state if known;323. target repository, stack, routes, and existing design system;334. required interactions, responsive range, browsers/devices, and accessibility target;345. asset rights and available original logos/icons/fonts/images;356. acceptable fidelity tolerance and whether content may be adapted.3637Do not infer one desktop screenshot as the complete responsive specification.3839## Provenance4041This skill is an original restructuring that selectively adapts visual-reference and fidelity concepts from Leonxlnx/taste-skill. Read [`references/provenance.md`](references/provenance.md) and preserve the root notice.4243## Safety baseline4445- Inspect repository and working-tree state before editing.46- Reuse existing tokens/components when they can express the reference without distortion.47- Do not replace project architecture, framework, or styling system solely for visual convenience.48- Do not embed screenshots as the interface, hard-code coordinates for one viewport, or use inaccessible canvas/text images for ordinary UI.49- Do not download fonts/assets from a reference without rights and license evidence.50- Preserve user code and keep generated or broad formatting changes out of the diff.5152## Workflow5354### 1. Build the reference register5556For every image record:5758```text59ID/path:60Source and rights:61Pixel dimensions/device scale:62Inferred viewport/device:63Theme/locale/state:64Known relationships to other images:65Quality issues/crops/occlusion:66```6768Mark what is visible, implied, or unknown. Do not present guessed font names, exact pixel values, or interaction behavior as observed facts.6970### 2. Inspect the target implementation context7172Identify:7374- framework, rendering model, routes, component and styling conventions;75- existing tokens, fonts, icons, assets, layout primitives, and accessibility helpers;76- content/data boundaries and state management;77- test, story, screenshot, and browser/device verification tooling;78- constraints such as CSP, image optimization, localization, theming, or native safe areas.7980If production architecture is missing or unsafe, reconstruct the bounded interface first and hand hardening to the relevant builder.8182### 3. Decompose the visual structure8384Use [`references/visual-decomposition.md`](references/visual-decomposition.md). Infer:8586- page/screen regions and stacking contexts;87- layout model: flow, grid, flex, overlay, sticky/fixed, scroll container;88- containers, gutters, alignment lines, column spans, aspect ratios, and whitespace rhythm;89- typography roles, wrapping, line height, emphasis, and truncation;90- semantic color/surface/elevation/border/radius rules;91- components, variants, repeated motifs, and one-off art-directed exceptions;92- interactive, loading, empty, selected, disabled, error, and navigation states visible across images.9394Choose relative constraints before literal pixels. Derive a model that explains all references with minimal exceptions.9596### 4. Handle content and assets9798Follow [`references/asset-handling.md`](references/asset-handling.md):99100- prefer provided originals and repository assets;101- match crop/focal treatment through responsive media containers;102- recreate simple geometric decoration in CSS/SVG only when legally and technically appropriate;103- replace unavailable protected assets with approved placeholders that preserve layout, and disclose fidelity impact;104- load fonts through the project's licensed mechanism or select an approved metric-compatible alternative;105- preserve alt text and decorative semantics.106107Do not stretch a raster crop to hide missing source material.108109### 5. Infer responsive behavior110111Across references, distinguish invariant rules from viewport-specific outcomes. Infer:112113- fluid versus capped dimensions;114- wrap/reflow/reorder/collapse behavior;115- breakpoint conditions where composition fails;116- media crop and focal-point changes;117- navigation and control transformations;118- touch target, safe-area, keyboard, orientation, and dynamic-type behavior;119- content overflow for long text and localization.120121For missing breakpoints, formulate hypotheses and test intermediate widths. Prefer continuity over a collection of unrelated snapshots.122123### 6. Design component boundaries124125Create components where there is semantic behavior, state, repeated structure, or a stable visual primitive. Avoid:126127- one component per visual rectangle;128- a giant page component with repeated magic values;129- abstractions used once that obscure geometry;130- premature universal tokens from one screenshot;131- duplicating an existing project primitive with slightly different styling.132133Separate content/data from layout when it enables state and responsive testing. Keep art-directed exceptions explicit.134135### 7. Establish the first implementation136137Implement in this order:1381391. semantic document/screen structure and interaction model;1402. major geometry, scroll behavior, and responsive containers;1413. typography metrics and content wrapping;1424. assets/media crops;1435. color, borders, radii, elevation, and effects;1446. states and transitions;1457. fine optical alignment.146147Use real or shape-representative content early. A layout tuned to short placeholders is not faithful.148149### 8. Compare iteratively150151Use [`references/fidelity-loop.md`](references/fidelity-loop.md). At each target viewport/state:152153- capture the implementation in the same dimensions, theme, content, and scroll position;154- compare side by side and, where tooling permits, overlay/difference images;155- classify mismatches by structure, geometry, typography, asset, color/material, state, or rendering;156- fix the highest-level mismatch first;157- repeat at intermediate responsive widths to avoid overfitting.158159Never declare fidelity from memory or from inspecting source code alone.160161### 9. Verify accessibility and interaction162163Even when the reference omits them, implement:164165- correct landmarks/headings/roles or native semantics;166- keyboard/touch/pointer operation and visible focus;167- accessible names, error/status communication, and logical order;168- sufficient contrast or document a reference conflict requiring design decision;169- reduced motion and no information conveyed only through animation/color;170- zoom, dynamic type, localization, and content overflow behavior.171172When accessibility requires a visible deviation, preserve hierarchy and document the reason rather than silently copying an inaccessible reference.173174### 10. Finish and hand off175176Return:177178- reference register and uncertainty log;179- structural/component/responsive model;180- asset/provenance decisions;181- exact files changed;182- target and intermediate viewport comparison results;183- interaction/accessibility checks;184- known fidelity differences with reason and severity;185- production concerns for the platform builder.186187## Interaction boundaries188189- `product-design-director` resolves ambiguous or conflicting visual direction.190- `production-web-builder` owns data, auth, rendering architecture, performance, SEO, observability, and production browser verification beyond the reference-bound slice.191- Flutter/Expo builders own native platform conventions, performance, release, and device integration.192- `documentation-synchronizer` updates user/developer documentation and screenshots after the final behavior stabilizes.193194## Failure handling195196- If reference dimensions or state are unknown, test multiple plausible viewports and label confidence.197- If images conflict, establish whether they represent breakpoints, themes, states, or different revisions; do not merge them arbitrarily.198- If an asset is unavailable or unlicensed, preserve layout with an approved substitute and report the gap.199- If exact fidelity requires brittle fixed positioning, revise the underlying model and document any deliberate tolerance.200- If browser/font rendering creates small differences, verify font files, weight availability, device scale, antialiasing, and screenshot environment before tuning offsets.201202## Stop conditions203204Stop when the component model explains all supplied references, comparisons pass the agreed tolerance at target and intermediate viewports, accessibility/interaction requirements are met or conflicts are explicitly decided, and remaining differences are documented. Do not claim production readiness outside the reconstructed scope.