figma-ios-to-code-conventions

figma-ios-to-code-conventions is a skill for Cursor from mythkiven/figma-ios-codegen. It costs 81 tokens per session (4,195 once invoked), scanned A, original, MIT.

A set of rules for deciding which Figma nodes should become UIKit code and which are design-only system elements. UIKit is Apple’s framework for building iOS app interfaces.

In plain words
What is it for?
Use it when converting a Figma data package into an iOS interface to skip system chrome and other explicitly excluded design nodes.
Why use it?
It prevents generated screens from including items such as the iPhone Home Indicator or status-bar decorations that the operating system supplies itself.

Skill for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when converting a Figma data package into an iOS interface to skip system chrome and other explicitly excluded design nodes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mythkiven/figma-ios-codegen/figma-ios-to-code-conventions
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-to-code-conventions
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-to-code-conventions

README.md
[![agentmods](https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-to-code-conventions/github.svg)](https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-to-code-conventions)
Your own site
<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.

agentmods 80×15 button for figma-ios-to-code-conventions

Your own site · 80×15
<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>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,195 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.00081 $0.04195
Opus 5 $0.00041 $0.02098
Sonnet 5 $0.00016 $0.00839
Haiku 4.5 $0.00008 $0.00419

Measured 9d ago against content hash ceb1925e234e, 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-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.

.cursor/skills/figma-ios-to-code-conventions/SKILL.md · 292 lines

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(系统底部横条)

必须跳过的节点(不要生成任何代码):

  • 节点类型INSTANCECOMPONENTFRAME 或任何其他类型
  • 节点名称匹配(任一即跳过):
    • 完全匹配:Home Indicatorhome 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 代码生成时

  • 禁止:创建 homeIndicatorViewhomeIndicatorLayer 等属性
  • 禁止:为 Home Indicator 添加 addSubview、约束、样式
  • 禁止:下载 Home Indicator 相关的图片资源
  • 正确:完全跳过该节点及其子树,就像它不存在一样

原因

  • iOS 系统会自动在设备上绘制 Home Indicator(iPhone X 及以上)
  • Figma 中的 Home Indicator 只是设计稿示意,不是真实 UI
  • 在代码中实现会导致:
    • 重复渲染(系统已经有了)
    • 与系统手势区域冲突
    • 在 iPhone 8 及以下设备显示错误的横条

做法

  1. 遍历 design.json 节点树(或 index.json 的扁平列表)时,检查节点名称
  2. 如果匹配 Home Indicator,完全跳过该节点及其子树
  3. 不要将其坐标用于计算其他元素的布局(除了判断安全区域)
  4. 注释中可说明"已跳过 Figma 中的 Home Indicator(系统控件)"

2. 忽略状态栏(Status Bar)

必须跳过的节点(不要生成任何代码):

  • 节点名称匹配(任一即跳过):
    • 完全匹配:Status Barstatus bar状态栏
    • 包含关键词:系统控件/status bariPhone Status Bar
    • 包含关键词:状态栏/

识别特征

  • 位于页面顶部(y = 0 或接近 0)
  • 高度:20pt(iPhone 8 及以下)或 44pt(iPhone X 及以上)
  • 包含时间、信号、电池等元素

原因

  • iOS 系统自动绘制状态栏
  • 应用只能通过 statusBarStyle 控制状态栏样式(浅色/深色)
  • Info.plist 中配置 UIStatusBarStyle

做法

  • 完全跳过该节点及其子树
  • 布局顶部元素时使用 safeAreaLayoutGuide.snp.top

Read the full file on GitHub · 292 lines

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 · 292 lines · 81 tokens per session scan A ceb1925e234e

Subscribe to this mod's changes

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.

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