agentsclimarketplace

Figma ios variables detection

Skill mythkiven/figma-ios-codegen/.cursor/skills/figma-ios-variables-detection

Figma to iOS UIKit codegen: deterministic data package + Agent skills (Cursor/Claude) for baseline Swift UI.

Install
npx -y skills add mythkiven/figma-ios-codegen --skill figma-ios-variables-detection

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 25 days oldThe repository was created 25 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 8 stars8 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Translate Figma Variables multi-mode warnings (already detected by figma-ios-preload-data) into top-of-file Swift comments so dark mode is not silently dropped. Use when generating Swift code from a data package whose summary.has_dark_mode is true.

SKILL.md

1.7 KB, as published. Nobody here has run it

Figma Variables 多 Mode 警告处理(消费数据包)

数据来源

  • {data_dir}/manifest.jsonsummary.has_dark_mode (bool) 与 warnings[]
  • {data_dir}/variables.json:原始 Variables 数据,含每个 Mode 的 token 值(按需查阅)

处置规则

1. has_dark_mode == true

在生成的 Swift 文件顶部追加 banner 注释:

// ============================================================
// ⚠️  WARNING: Dark Mode 未生成
// ============================================================
// 设计稿在 Figma Variables 中定义了多个 Mode(含暗色模式),
// 当前生成的代码只覆盖了 Light Mode 的颜色 token。
//
// 暗色处理建议:
//   1. 用 UIColor(dynamicProvider:) 包裹关键颜色
//   2. 或基于 traitCollection.userInterfaceStyle 在 traitCollectionDidChange 切换
//   3. 详细 Mode 列表与 token 值见 {data_dir}/variables.json
// ============================================================

2. has_dark_mode == false

不输出任何 dark mode 注释。

3. 其他 warning(如 Token referenced but not resolved

转为代码顶部 // WARNING: <msg> 单行注释。

自检清单

  • 已读 manifest.json
  • has_dark_mode==true 时已加 banner 注释
  • 其他 warnings 已逐条转为代码注释
  • 没有调用 detect_figma_variables.py 或 MCP get_variable_defs

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.