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-to-code-conventionsgit 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-to-code-conventions)<a href="https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-to-code-conventions"><img src="https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-to-code-conventions/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-to-code-conventions"><img src="https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-to-code-conventions.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.00081 | $0.04195 |
| Opus 5 | $0.00041 | $0.02098 |
| Sonnet 5 | $0.00016 | $0.00839 |
| Haiku 4.5 | $0.00008 | $0.00419 |
Grade A, and why
figma-ios-to-code-conventions 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.
How it starts
The opening of the file, as written. The whole thing — 292 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Figma → 代码:约定与跳过规则
从 figma-ios-preload-data 数据包(design.json / index.json)还原业务界面 时,除用户另有说明外,遵守下列规则。后续可在本文 「规则列表」 中追加条目(保持编号递增)。
规则列表
1. 忽略 Home Indicator(系统底部横条)
必须跳过的节点(不要生成任何代码):
- 节点类型:
INSTANCE、COMPONENT、FRAME或任何其他类型 - 节点名称匹配(任一即跳过):
- 完全匹配:
Home Indicator、home indicator - 包含关键词:
Home Indicator/(如系统控件/home indicator/dark) - 包含关键词:
iPhone X/Home Indicator - Component ID:
1:31或类似系统组件 ID
- 完全匹配:
识别特征:
- 通常位于页面底部(y ≈ 页面高度 - 34)
- 尺寸:width ≈ 页面宽度, height ≈ 34pt
- 外观:白色或黑色的圆角横条(宽约 134pt,高约 5pt)
匹配规则(强制):
// 跳过 Home Indicator 的判断逻辑
function shouldSkipNode(node) {
const name = node.name.toLowerCase();
// 规则 1: 名称包含 "home indicator"
if (name.includes('home indicator')) {
return true;
}
// 规则 2: 名称包含 "home-indicator"(短横线)
if (name.includes('home-indicator')) {
return true;
}
// 规则 3: 特定 component ID(视具体文件而定)
if (node.id === '1:31' || node.id === '1:326') {
return true;
}
return false;
}
Swift 代码生成时:
- ❌ 禁止:创建
homeIndicatorView、homeIndicatorLayer等属性 - ❌ 禁止:为 Home Indicator 添加
addSubview、约束、样式 - ❌ 禁止:下载 Home Indicator 相关的图片资源
- ✅ 正确:完全跳过该节点及其子树,就像它不存在一样
原因:
- iOS 系统会自动在设备上绘制 Home Indicator(iPhone X 及以上)
- Figma 中的 Home Indicator 只是设计稿示意,不是真实 UI
- 在代码中实现会导致:
- 重复渲染(系统已经有了)
- 与系统手势区域冲突
- 在 iPhone 8 及以下设备显示错误的横条
做法:
- 遍历
design.json节点树(或index.json的扁平列表)时,检查节点名称 - 如果匹配 Home Indicator,完全跳过该节点及其子树
- 不要将其坐标用于计算其他元素的布局(除了判断安全区域)
- 注释中可说明"已跳过 Figma 中的 Home Indicator(系统控件)"
2. 忽略状态栏(Status Bar)
必须跳过的节点(不要生成任何代码):
- 节点名称匹配(任一即跳过):
- 完全匹配:
Status Bar、status bar、状态栏 - 包含关键词:
系统控件/status bar、iPhone Status Bar - 包含关键词:
状态栏/
- 完全匹配:
识别特征:
- 位于页面顶部(y = 0 或接近 0)
- 高度:20pt(iPhone 8 及以下)或 44pt(iPhone X 及以上)
- 包含时间、信号、电池等元素
原因:
- iOS 系统自动绘制状态栏
- 应用只能通过
statusBarStyle控制状态栏样式(浅色/深色) - 在
Info.plist中配置UIStatusBarStyle
做法:
- 完全跳过该节点及其子树
- 布局顶部元素时使用
safeAreaLayoutGuide.snp.top
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.
- 9d ago First seen · 292 lines · 81 tokens per session scan A ceb1925e234e
figma-ios-to-code-conventions is a skill published in the GitHub repository mythkiven/figma-ios-codegen (9 stars, last pushed 1mo ago), licensed MIT. It adds 81 tokens to every session and 4,195 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.
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.