Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add mythkiven/figma-ios-codegen --skill figma-ios-design-token-mappinggit clone --depth 1 https://github.com/mythkiven/figma-ios-codegenWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-design-token-mapping)<a href="https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-design-token-mapping"><img src="https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-design-token-mapping/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-design-token-mapping"><img src="https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-design-token-mapping.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00054 | $0.01414 |
| Opus 5.5 | $0.00022 | $0.00566 |
| Sonnet 5.5 | $0.00011 | $0.00283 |
| Haiku 4.5 | $0.00005 | $0.00141 |
Grade A, and why
figma-ios-design-token-mapping scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.
颜色 / 字体:映射表优先,未命中走标准 UIKit
权威配置:
.cursor/bindings/color_map.json、.cursor/bindings/font_map.json
示例包(MK):.cursor/bindings/examples/mk/
说明:.cursor/bindings/README.md
本 skill 不写死任何设计系统类名;宿主 token 只活在映射 JSON 的 value 里。
核心规则(强制)
Figma 颜色/字体
→ 查 bindings 对应 map
→ 命中:原样输出 map 里的代码片段
→ 未命中:用同文件 fallback 模板(标准 UIKit)
禁止:
- ❌ 无视映射表手写未在 map 中的宿主 API / 臆造 token
- ❌ 映射未命中时编造不存在的设计系统 API
- ❌ 把映射 value 再「翻译」一遍(value 已是最终代码)
1. 颜色
数据来源
design.json[node_id].fills[].color(已是 rgba(r,g,b,a) 字符串)。
TEXT 文字色也在 fills[].color(text 字段只是文案字符串,没有 text.color)。
评论色变更:comments.json 中 confidence>=medium 且含 color / color_correction 的评论优先于节点 fills(阶段 1 不把颜色写进 design.json,与 iconfont 回写不同)。
查表步骤
- 读
.cursor/bindings/color_map.json - 用节点颜色按以下 key 依次尝试(命中即停):
- 数据包原文,如
rgba(255,255,255,0.9) - 规范化:
rgba(r,g,b,1)/rgba(r,g,b,0.9)(alpha=1 不写.0) - hex:
#FFFFFF或带 alpha#FFFFFFE6 - 旧式元组:
255,255,255,0.9
- 数据包原文,如
- 命中 → 输出
map[key](本仓示例如MKUIStyle.mk_c12()) - 未命中 → 用
fallback,替换占位符:
| 占位符 | 含义 |
|---|---|
{r} {g} {b} |
0–255 整数 |
{a} |
0–1 透明度 |
默认 fallback:
UIColor(red: {r}/255.0, green: {g}/255.0, blue: {b}/255.0, alpha: {a})
映射文件形状
{
"schema_version": "1.0.0",
"fallback": "UIColor(red: {r}/255.0, green: {g}/255.0, blue: {b}/255.0, alpha: {a})",
"map": {
"#FFFFFF": "MKUIStyle.mk_c12()",
"rgba(255,255,255,0.9)": "MKUIStyle.mk_c12_90()"
}
}
map 为空 = 全部走 UIKit(适合个人开发者)。
接入宿主色板:把「色值 → 一段 Swift 代码」写入 map,或从 examples/mk/ 复制后按需改。详见 bindings/README。
2. 字体
数据来源
design.json[node_id].font(含 family / style 或 weight / size)与 text。
查表步骤
- 读
.cursor/bindings/font_map.json - 构造 key(与
examples/mk的 font_map 一致):{family},{Weight},{size}
例:PingFang SC,Medium,14
亦尝试:{family}|{Weight}|{size} - 命中 → 输出
map[key](本仓示例如MKUIStyle.mk_f14_m()) - 未命中 → 用
fallback:
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 139 lines · 54 tokens per session scan A 04eda09be051
figma-ios-design-token-mapping is a skill published in the GitHub repository mythkiven/figma-ios-codegen (9 stars, last pushed 3mo ago), licensed MIT. It adds 54 tokens to every session and 1,414 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
figma-codegen
Generate framework-aware code from a Figma design. Reads the project's stack profile and emits code matching the existing framework (React/Vue/Svelte/Next/etc.) and styling (Tailwind/CSS/CSS-in-JS), reusing existing components and design tokens instead of regenerating from scratch. Triggers whenever the user wants a…
figma-build
Build a Figma design from code or a description — the reverse of figma-codegen. Reuses the connected file's existing design system (components, variables, styles) instead of drawing primitives with hardcoded values. Triggers whenever the user wants something created or updated IN Figma from code or a spec — e.g.…
sleek-design-mobile-apps
Design mobile app screens with Sleek, edit Sleek projects, and implement their designs in React Native or HTML.
compose-ui
Writes and reviews composables for Compose and CMP: the Route/Screen/leaf split, state-read placement and stability, loading/empty/error UX states, LazyColumn lists and grids, animation choice, accessibility and semantics, design-system tokens, CMP Res resources, Coil images, and keyboard/focus. Use when touching…
cometchat-flutter-v6-customization
Theme and brand the Flutter v6 UI Kit — light/dark mode, the CometChatColorPalette / CometChatTypography / CometChatSpacing theme extensions, per-widget style objects, and view slots. Triggers: 'change chat colors flutter', 'dark mode chat flutter', 'match my brand flutter', 'customize cometchat theme flutter'…
Audit Apple-platform UI work against Human Interface Guidelines with HIG Doctor
Run a repeatable HIG compliance audit over app code before shipping UI changes, then use the findings to guide remediation.