visual-to-spec

当用户提供参考 UI 截图并要求提取视觉规范、生成设计令牌、创建组件树或生成前端实现契约时使用,适用于仪表盘、落地页、移动端界面、以图片为主的 UI、全景场景、3D 展览界面以及截图转规范任务。

仓库最近推送
GitHub Stars
145
Forks
9
Issues / PRs
0

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "visual-to-spec":https://skillpi.com/zh/skills/deepskill-d49d86d92ca11d75d8cdb92dcdffdaf3207f3b05962438224eb72594b098424c。安装前核对上游来源和版本:https://github.com/Jason904/ui-skill-lab。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

当用户提供参考 UI 截图并要求提取视觉规范、生成设计令牌、创建组件树或生成前端实现契约时使用,适用于仪表盘、落地页、移动端界面、以图片为主的 UI、全景场景、3D 展览界面以及截图转规范任务。

0 下载

介绍来源: third_party · Jason904 · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
输入和输出
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
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-visible components must have bbox and visual evidence in the screenshot; components without bbox must not be labeled reference-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

  1. Every extracted value must include source, confidence, confidenceLabel, and strictness.
  2. reference-visible must include bbox or reference bbox within the same component detail; visibility claims without bbox are invalid.
  3. Phase 1 must output uiType, one of: application-dashboard, panorama-scene, image-led-landing, mobile-app, poster-like-ui, unknown.
  4. If uiType is panorama-scene or image-led-landing, phases 5/6 must use the image layer + overlay layer layout model.
  5. Components not present in the screenshot must be listed in Rejected Assumptions, not placed in the component tree.
  6. 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.
  7. Every color in the component tree must exist in tokens.json.
  8. Every component dimension must match layout-spec.md.
  9. Sum of sibling component widths must not exceed parent container width; overlay components must verify bbox does not overflow.
  10. Typography scale must decrease monotonically: h1 > h2 > h3 > body.
  11. No orphan tokens (defined but unused).
  12. 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 rules
  • token-schema.md — Token JSON schema definition and field descriptions
  • output-files.md — Structure templates for each output file
  • source-strictness-rules.md — Complete rules for source/confidence/strictness/bbox labels
  • script-backed-boundary.md — Boundary definitions for LLM / script / human operations

examples/

  • tokens.example.json — Complete tokens.json example
  • component-tree.example.md — Component tree example, including panorama-scene vs dashboard branching
  • layout-spec.example.md — Layout spec example, including overlay coordinate model
  • visual-analysis.example.md — Visual analysis example, including UI type, visible elements, rejected assumptions
  • human-review-needed.example.md — Human review checklist example

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • Skill 功能明确,将 UI 截图转换为前端实现契约,解决设计师与前端开发者之间的协作痛点。
  • 覆盖多种 UI 类型(仪表盘、落地页、移动端、全景场景等),适用场景广泛。
触发精准90/100

亮点

  • 触发词精准完整,覆盖多种变体,边界清晰,用户易于理解何时使用该 Skill。
结构规范95/100

亮点

  • Phase/步骤清晰(9 个阶段),有出口条件,含端到端示例,frontmatter 完整,文档结构优秀。
执行可靠88/100

亮点

  • 工具来源明确,参数正确,覆盖主要异常(如低置信度项进入人工审核),不可逆操作有确认机制。
证据可验 (前四项均值)90/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 截图或屏幕采集

    只采集明确选择的窗口或区域,避开密码、客户资料等敏感信息,分享前再次检查。

    主文档提及 · 第 28 行

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。