figma2unity SKILL.md skillA
figma2unity from prodazhang/figkit is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add prodazhang/figkit/figma2unity@git:20260728.78f596dPins git:20260728.78f596d in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- prodazhang/figkit
- Path
figma2unity/SKILL.md- Versions recorded
- 2
- Latest version
- git:20260728.78f596d, committed Jul 28, 2026
- First version recorded
- Jul 3, 2026
- Size
- 4,109 bytes
- Repository stars
- 14
- License
- MIT
把 figma2html 管线捕获的中间表示(IR:.ui.json 像素快照 + flow.json 交互声明)编译成 Unity UI Toolkit 资产(UXML+USS)与 C# 运行时 flow 绑定器。输入 = figma2html capture 的产物;本 skill 是编译后端,不含 capture。要在 Unity 里还原 figma 界面像素与交互(底屏+弹窗/守卫/列表/勾选)时使用。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# figma2unity — figma2html IR → Unity UI Toolkit
## 这个 skill 干什么
figma2html 产的 **`.ui.json`(像素 IR)+ `flow.json`(交互声明)** → **UXML + USS**(每屏一对)+ **FlowBinder**(C# 运行时把 flow 语义装起来)。
- **像素**:`ui_to_unity.py` 确定性转写——每元素一个 VisualElement/Label、绝对定位父相对几何(算法同 render.js pass2)、样式逐项映射,USS 不支持的项**诚实降级**(跳过 + 文件头注释列丢弃项)。
- **交互**:`FlowBinder.cs` 按 assemble.js 语义实现——底屏常驻 + 弹窗叠加(抽 roots 子树 + 黑色半透 backdrop)、click 事件按 name 绑、guard 全真放行、内置 openModal/closeModal/toggleFlag/send、列表行克隆、checkbox 双态;域内语义走 `IAppHook`。
边界:**capture 归 figma2html**(拉节点树/导素材),本 skill 只吃它的产物;HTML 目标继续用 figma2html,Unity 目标走这里。
## 内容
```
scripts/ ui_to_unity.py(IR→UXML+USS,纯标准库、确定性)
tests/(run_all.py 发现式 runner + 单测 + golden;fixtures 自带)
runtime/ FlowBinder.cs(flow 绑定器,MonoBehaviour)· IAppHook.cs(域内钩子接口)
references/ mapping.md(IR→USS/UXML 映射全表 + known-loss 表 + 坐标缩放 + 资源摆放)
```
## 用法(管线)
1. **拿 IR**:用 figma2html 跑到第 5 步,得到各屏 `.ui.json` + 手写的 `flow.json`
2. **转换**:每屏一次 `python3 scripts/ui_to_unity.py <屏.ui.json> <outdir>` → `<stem>.uxml + <stem>.uss`
3. **进 Unity**:UXML/USS 与 `_assets/` 同放一目录(url 相对 USS 解析);PanelSettings 设 **Scale With Screen Size**,参考分辨率 = `cap.w × cap.h`(见 references/mapping.md)
…Read the whole file at its exact version.
How to install
mdr add prodazhang/figkit/figma2unity@sha256:2b811f9643a87901The line at the top of this page pins the label git:20260728.78f596d, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_dp6ovu5wg6atxmrc)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 2 versions of this file, between Jul 3, 2026 and Jul 28, 2026, about one every 25 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260728.78f596d latest | 2026-07-28 | 78f596d | 4,109 B | A | view · diff |
| git:20260703.4dd6084 | 2026-07-03 | 4dd6084 | 4,107 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (4109 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
prodazhang/figkit · 14 stars · license MIT · pushed 2026-11-04 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_dp6ovu5wg6atxmrc GET https://markdownregistry.com/api/v1/resolve?ref=prodazhang/figkit/figma2unity GET https://markdownregistry.com/api/v1/blob/2b811f9643a87901ec40b61a0bc44036dd70de687b7e5a462699d9a771b2ab25
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.