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-selection-interactiongit 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-selection-interaction)<a href="https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-selection-interaction"><img src="https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-selection-interaction.svg" alt="Measured on agentmods" 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.00085 | $0.06163 |
| Opus 5 | $0.00043 | $0.03082 |
| Sonnet 5 | $0.00017 | $0.01233 |
| Haiku 4.5 | $0.00009 | $0.00616 |
Grade A, and why
figma-ios-selection-interaction 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 8d 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 — 797 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Figma 选择交互逻辑生成
职责范围
- ✅ 从
figma-ios-preload-data数据包(design.json)自动识别选择交互模式(单选/多选/Toggle) - ✅ 生成选中态变化逻辑(更新数据模型、刷新 UI)
- ✅ 生成
didSelectItemAt(列表统一 UICollectionView;不用UITableView/didSelectRowAt) - ✅ 生成单个按钮 Toggle 逻辑
- ✅ 集成 RxSwift 交互模式(按
host.interaction;默认也可 target-action,见 rxswift skill) - ✅ 保持数据模型与 UI 同步
- ❌ 不处理业务逻辑(网络请求、页面跳转等,留 TODO 注释)
- ❌ 不处理动画效果(由其他 Skill 负责)
- ❌ 不从 Figma MCP / REST 再拉数据;视觉差异读
design.json(或已由figma-ios-component-state-recognition提取的状态) - ❌ 不替代
figma-ios-component-state-recognition(外观 /updateAppearance)与figma-ios-uicollectionview-codegen(CV 骨架)
适用场景
| 场景 | Figma 特征 | 生成代码 |
|---|---|---|
| ListView 单选 | 多个同类节点,只有 1 个选中 | didSelectItemAt + 单选互斥逻辑 |
| ListView 多选 | 多个同类节点,多个选中 | didSelectItemAt + Toggle 逻辑 |
| 单个按钮 Toggle | 单个节点有选中态 | RxSwift tap + Toggle 逻辑 |
| SegmentedControl | 多个并列按钮,1 个选中 | 按钮组 + 单选互斥逻辑 |
识别规则
规则 1:ListView 单选模式
触发条件(必须全部满足):
def is_single_selection_listview(figma_nodes):
"""
判断是否为单选 ListView
"""
# 1. 节点数量 ≥ 2
if len(figma_nodes) < 2:
return False
# 2. 有选中态视觉差异(读 design.json 的 fills/strokes/font,见 component-state-recognition)
if not has_selection_state(figma_nodes):
return False
# 3. 只有 1 个节点处于选中态
selected_count = count_selected_nodes(figma_nodes)
if selected_count != 1:
return False
# 4. 是 ListView(本仓统一 UICollectionView;见 listview-recognition)
if not is_listview(figma_nodes):
return False
return True
识别结果:
{
'interaction_mode': 'single_selection',
'default_index': 0, # 默认选中第一个("绝地求生")
'ui_component': 'UICollectionView',
'refresh_mode': 'reload_all' # 刷新所有 Cell
}
规则 2:ListView 多选模式
触发条件(必须全部满足):
def is_multiple_selection_listview(figma_nodes):
"""
判断是否为多选 ListView
"""
# 1. 节点数量 ≥ 2
if len(figma_nodes) < 2:
return False
# 2. 有选中态视觉差异
if not has_selection_state(figma_nodes):
return False
# 3. 多个节点处于选中态(≥ 2)
selected_count = count_selected_nodes(figma_nodes)
if selected_count < 2:
return False
# 4. 是 ListView
if not is_listview(figma_nodes):
return False
return True
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.
- 8d ago First seen · 797 lines · 85 tokens per session scan A b27ab8e9ba64
figma-ios-selection-interaction is a skill published in the GitHub repository mythkiven/figma-ios-codegen (9 stars, last pushed 1mo ago), licensed MIT. It adds 85 tokens to every session and 6,163 once invoked, about $0.0004 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.
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.…
app-icon-studio
Apple app icons: create, generate, evaluate, export, install, or debug iOS AppIcon.appiconset and macOS .icns assets for small-size clarity.
macos-window-architect
Use SwiftUI scene/window modifiers first; switch to macos-appkit-bridge only when SwiftUI cannot express the behavior.
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.
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.