visual-to-spec
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "visual-to-spec" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-d49d86d92ca11d75d8cdb92dcdffdaf3207f3b05962438224eb72594b098424c. Verify the upstream source and version against https://github.com/Jason904/ui-skill-lab before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Used when a user provides reference UI screenshots and requests extraction of visual specifications, generation of design tokens, creation of a component tree, or generation of a frontend implementation contract; applicable to dashboards, landing pages, mobile interfaces, image-centric UIs, panoramic scenes, 3D exhibition interfaces, and screenshot-to-spec tasks.
Introduction source: third_party · Jason904 · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Convert a finalized UI screenshot into a complete frontend implementation contract.
- Inputs and outputs
- | Item | Description | |------|-------------| | reference.png | Finalized UI screenshot (the only required input) | | Project token standards | Optional, adapt to existing standards if available |
- Testing
- Not tested
Browse files
Frontmatter
name: visual-to-spec
description: |
Use when a user provides a reference UI screenshot and asks to extract visual
specs, generate design tokens, create a component tree, or produce a frontend
implementation contract, including dashboards, landing pages, mobile screens,
image-led UIs, panorama scenes, 3D exhibit UIs, and screenshot-to-spec tasks.
argument-hint: "[reference-image]"Version: 2.0.0
visual-to-spec
Convert a finalized UI screenshot into a complete frontend implementation contract.
Trigger Conditions
- User provides a UI screenshot and asks to extract visual specs
- User asks to generate design tokens from a screenshot
- User asks to build a component tree or frontend implementation contract from a screenshot
- User asks to analyze screenshot layout, color, typography, spacing, overlay controls, or panorama/3D scene UI
- Keywords: "extract spec from screenshot", "image to design spec", "screenshot to spec"
Required Inputs
| Item | Description |
|---|---|
| reference.png | Finalized UI screenshot (the only required input) |
| Project token standards | Optional, adapt to existing standards if available |
Outputs
All files written to 03_visual_spec/ directory:
| File | Content |
|---|---|
| visual-analysis.md | UI type, visible element evidence, composition, color, typography, spacing analysis |
| layout-spec.md | Layout positioning and sizing spec, branching by UI type |
| component-tree.md | Hierarchical component tree with per-component style summaries |
| tokens.json | DTCG-inspired design tokens with source/confidence annotations |
| implementation-risks.md | Implementation risk assessment |
| human-review-needed.md | Low-confidence items and manual review checklist |
| DESIGN.md | Summary document referencing all above files |
See references/output-files.md for detailed output formats.
Source of Truth
reference.png is the sole visual source of truth.
- Do not redesign.
- Do not treat UI elements invisible in the screenshot as screenshot facts.
- Do not introduce colors, fonts, spacing, panels, charts, or navigation structures absent from the image.
- Do not default to a dashboard / SaaS / three-column layout; UI type determination must come first.
reference-visiblecomponents must have bbox and visual evidence in the screenshot; components without bbox must not be labeledreference-visible.- Inferred implementation wrapper components (e.g., AppShell, MainContent, SceneImageLayer, OverlayLayer) are permitted but must be labeled
source: inferred-implementation. - For image-led, panorama-scene, 3D exhibit, and product-render screenshots, output an asset strategy: which visual content must be raster/image assets, and which can be implemented as HTML/CSS/SVG.
All values must carry source and confidence annotations.
See references/source-strictness-rules.md for complete rules.
Phase Overview (9 phases, sequential)
| # | Phase | Key Output |
|---|---|---|
| 1 | Global composition analysis + UI type determination + visible element evidence | visual-analysis.md §1 |
| 2 | Color extraction | visual-analysis.md §2 + tokens.json (color) |
| 3 | Typography extraction | visual-analysis.md §3 + tokens.json (typography) |
| 4 | Spacing and grid system | visual-analysis.md §4 + tokens.json (spacing) |
| 5 | Layout specification | layout-spec.md |
| 6 | Component tree construction | component-tree.md |
| 7 | Token merge and validation | tokens.json (final) |
| 8 | Implementation risk assessment | implementation-risks.md |
| 9 | Human review checklist | human-review-needed.md |
See references/extraction-workflow.md for detailed workflow.
Hard Rules
- Every extracted value must include
source,confidence,confidenceLabel, andstrictness. reference-visiblemust include bbox or reference bbox within the same component detail; visibility claims without bbox are invalid.- Phase 1 must output
uiType, one of:application-dashboard,panorama-scene,image-led-landing,mobile-app,poster-like-ui,unknown. - If
uiTypeispanorama-sceneorimage-led-landing, phases 5/6 must use the image layer + overlay layer layout model. - Components not present in the screenshot must be listed in Rejected Assumptions, not placed in the component tree.
- Values with confidence < 0.6 must appear in
human-review-needed.md; low-confidence layout type must go into human review even if confidence >= 0.6. - Every color in the component tree must exist in tokens.json.
- Every component dimension must match layout-spec.md.
- Sum of sibling component widths must not exceed parent container width; overlay components must verify bbox does not overflow.
- Typography scale must decrease monotonically: h1 > h2 > h3 > body.
- No orphan tokens (defined but unused).
- No missing tokens (used in component tree but undefined).
Capability Boundaries
See references/script-backed-boundary.md for detailed boundary definition.
| Category | Examples |
|---|---|
| LLM can do | Visual recognition, UI type determination, color estimation, layout judgment, component classification, proportion estimation |
| Script-assisted | Precise color values, WCAG contrast, delta-E, exact pixel measurement, bbox measurement, visual regression comparison |
| Human confirmation | Low-confidence colors, ambiguous component boundaries, uncertain font identification, whether the main visual needs real assets |
When scripts are unavailable, LLM does best-effort estimation and annotates confidence and notes.
Supporting Files Index
references/
extraction-workflow.md— 9-phase detailed workflow, UI type branching, asset strategy rulestoken-schema.md— Token JSON schema definition and field descriptionsoutput-files.md— Structure templates for each output filesource-strictness-rules.md— Complete rules for source/confidence/strictness/bbox labelsscript-backed-boundary.md— Boundary definitions for LLM / script / human operations
examples/
tokens.example.json— Complete tokens.json examplecomponent-tree.example.md— Component tree example, including panorama-scene vs dashboard branchinglayout-spec.example.md— Layout spec example, including overlay coordinate modelvisual-analysis.example.md— Visual analysis example, including UI type, visible elements, rejected assumptionshuman-review-needed.example.md— Human review checklist example
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- Skill 功能明确,将 UI 截图转换为前端实现契约,解决设计师与前端开发者之间的协作痛点。
- 覆盖多种 UI 类型(仪表盘、落地页、移动端、全景场景等),适用场景广泛。
Highlights
- 触发词精准完整,覆盖多种变体,边界清晰,用户易于理解何时使用该 Skill。
Highlights
- Phase/步骤清晰(9 个阶段),有出口条件,含端到端示例,frontmatter 完整,文档结构优秀。
Highlights
- 工具来源明确,参数正确,覆盖主要异常(如低置信度项进入人工审核),不可逆操作有确认机制。
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Screenshots or screen capture
Capture only a selected window or region. Avoid secrets and private records and review captures before sharing.
Mentioned in main document · lines 28
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.