TTokenySpace
返回 Skills 列表

Design Spec Personal

生成并验证 UI 设计交付物:可交互 preview.html、annotated.html、tokens.css、spec.json 与 assumptions.log。支持文字、截图、Sketch、Figma 输入,以及 mobile-h5/web-pc 平台;按需加载 universal、内置或用户导入的...

#中文
0

安装到 Tokeny(自动)

下载 ZIP
安装"design-hiker-skill"技能
技能信息:
- 名称: Design Spec Personal
- 标识: design-hiker-skill
- 描述: 生成并验证 UI 设计交付物:可交互 preview.html、annotated.html、tokens.css、spec.json 与 assumptions.log。支持文字、截图、Sketch、Figma 输入,以及 mobile-h5/web-pc 平台;按需加载 universal、内置或用户导入的...
- 版本: 1.0.0
下载地址:
https://www.tokeny.space/api/skills/design-hiker-skill/download
继续

复制上方内容到 Tokeny 客户端并在会话中发送即可自动安装;也可直接 下载 ZIP并拖动到技能窗口安装。

SKILL.md

design

A unified design skill that produces hi-fi interactive prototypes and implementation-ready specs in a single run. Every output is simultaneously a visual artifact and a precise engineering specification.

What it produces

From any input, always generates the design deliverables plus browser evidence:

FileFor whomWhat it is
preview.htmlPM / DesignerHi-fi interactive prototype
annotated.htmlEngineer / AI coding toolSpec-annotated HTML with data-spec-* attributes
tokens.cssEveryoneCSS custom properties — the single source of truth
spec.jsonAI coding toolMachine-readable full spec with states and assumptions
assumptions.logAI coding toolEvery inferred/estimated value, marked with confidence
preview.measure-report.jsonQA / AI coding toolBrowser-measured geometry, contrast, overflow, and P0/P1 findings
preview.measured.pngReviewerScreenshot captured from the same measured browser session
acceptance.spec.mjsEngineer / CIExecutable P0/P1 and geometry regression contract

How to use this skill

1. Detect your harness. Read the matching reference doc once:

2. Load the core methodology. Read system-prompt.md — the L1→L4 pipeline, quality rules, and output generation guidelines.

3. Identify input type. Read the matching handler:

4. Load the design system. Three-layer stack: universal → standard → brand. Load in order, later layers override earlier ones.

Layer 1 — Universal (progressive load):

Core:

Load only when the current decision needs it:

Layer 2 — Design Standard Profile (load when user specifies a standard, or when platform implies one):

  • 先读 design-system/profiles/registry.json,把用户指定标准按忽略大小写、合并空白的规则匹配唯一 profile_id 或 alias;未知或冲突时阻断,不猜测。
  • 命中后先读 profile.json<profile.entry>,按 tier/capabilities 加载,不通过目录猜能力。禁止在根入口硬编码新增 profile 的文件清单。
  • Tier 1:读 semantic/token-map.jsonsemantic/unmapped-tokens.jsontokens.css;组件和布局使用 universal,未映射语义必须阻断确认。
  • Tier 2:在 Tier 1 基础上读取 routing/component-routing.md 和当前平台 registry;Profile 组件路由是权威来源。
  • Tier 3:再读取 <profile.guide>、深组件规格、templates 和 runtime;Ant Design、Arco Design 属于 Tier 3。
  • 请求的平台必须存在于 profile.platforms。只有 Profile 声明对应 capability 时,才要求 component registry、templates 或 runtime。
  • Ant Design 旧路径 design-system/standards/ant-design 仅作兼容入口;新增规范只进入 design-system/profiles/<profile_id>/

When the user supplies W3C Design Tokens or Style Dictionary JSON, create a Tier 1 profile with:

node scripts/create-profile.mjs --profile <profile-id> --name "<name>" \
  --tokens <tokens.json> --register

Review semantic/unmapped-tokens.json before generation. Do not promote a partial profile to stable or infer unresolved semantic roles without user input.

Layer 3 — Brand (load when user specifies a brand):

5. Run the pipeline. Follow system-prompt.md through L1 → Scene Engine → design-system load → binding gate → L2 → L3 → L4 → output.

6. Verify and deliver. Run agents/run-pipeline.mjs <project-dir> --strict-measure with Node >= 22. A P0/P1 measurement, including icon provenance/rendering/alignment failure, blocks acceptance. Per your harness reference: serve over HTTP, inspect the measured screenshot, fix errors, rerun, then send file + URL.

Output location

All files go to designs/<project-name>/:

designs/<project-name>/
├── preview.html
├── annotated.html
├── tokens.css
├── spec.json
├── assumptions.log
├── preview.measure-report.json
├── preview.measured.png
└── acceptance.spec.mjs

Invocation examples

设计一个商品详情页,移动端,有加购栏和图文详情
从这张截图还原规格,输出给 AI coding 工具用
用 Example Brand 设计系统,设计一个入职申请表单页面
用 Ant Design,设计一个移动端 H5 商品列表页,支持筛选和排序
用 Ant Design,设计一个 PC 后台数据报表页面,含图表和数据表格

评论

加载中…