figma-ios-variables-detection

figma-ios-variables-detection is a skill for Cursor from mythkiven/figma-ios-codegen. It costs 57 tokens per session (417 once invoked), scanned A, original, MIT.

A rule for carrying Figma Variables warnings into generated Swift files. Figma Variables can store different design values for modes such as light and dark appearance.

In plain words
What is it for?
Use it when Swift code is generated from a Figma data package whose summary reports dark mode or other warnings.
Why use it?
It makes missing dark-mode support and other unresolved design warnings visible instead of silently producing code for only the light appearance.

Skill for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when Swift code is generated from a Figma data package whose summary reports dark mode or other warnings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mythkiven/figma-ios-codegen/figma-ios-variables-detection
Install

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.

Any agent
npx skills add mythkiven/figma-ios-codegen --skill figma-ios-variables-detection
Clone the repo
git clone --depth 1 https://github.com/mythkiven/figma-ios-codegen

Made for: Cursor.

Wrote 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.

agentmods badge for figma-ios-variables-detection

README.md
[![agentmods](https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-variables-detection/github.svg)](https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-variables-detection)
Your own site
<a href="https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-variables-detection"><img src="https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-variables-detection/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.

agentmods 80×15 button for figma-ios-variables-detection

Your own site · 80×15
<a href="https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-variables-detection"><img src="https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-variables-detection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 417 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.00417
Opus 5 $0.00028 $0.00209
Sonnet 5 $0.00011 $0.00083
Haiku 4.5 $0.00006 $0.00042

Measured 9d ago against content hash f4ec7ed54b88, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

figma-ios-variables-detection 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 9d 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.

.cursor/skills/figma-ios-variables-detection/SKILL.md · 50 lines

What it actually says

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
Changes

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.

  1. 9d ago First seen · 50 lines · 57 tokens per session scan A f4ec7ed54b88

Subscribe to this mod's changes

figma-ios-variables-detection is a skill published in the GitHub repository mythkiven/figma-ios-codegen (9 stars, last pushed 1mo ago), licensed MIT. It adds 57 tokens to every session and 417 once invoked, about $0.0003 per session on Opus 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.

Related

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…

awdr74100/figwright · 145 tokens

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.…

awdr74100/figwright · 180 tokens

app-icon-studio

Apple app icons: create, generate, evaluate, export, install, or debug iOS AppIcon.appiconset and macOS .icns assets for small-size clarity.

Xopoko/build-swift-apps · 40 tokens

macos-window-architect

Use SwiftUI scene/window modifiers first; switch to macos-appkit-bridge only when SwiftUI cannot express the behavior.

Xopoko/build-swift-apps · 46 tokens

ios-liquid-glass-designer

Implement, refactor, or review iOS 26+ SwiftUI Liquid Glass with native glassEffect, GlassEffectContainer, button styles, availability gates, and non-glass fallbacks.

Xopoko/build-swift-apps · 47 tokens

unship

Compare agent-made alternatives in a local browser preview with Unship. Use for comparison setup, iteration, Canvas, selection, cleanup, and Unship installation or update troubleshooting.

mbenhard/unship · 37 tokens