figma-ios-playbook

figma-ios-playbook is a skill for Cursor from mythkiven/figma-ios-codegen. It costs 158 tokens per session (8,025 once invoked), scanned A, original, MIT.

An entry guide for generating the visual and layout foundation of an iOS UIKit screen from Figma. UIKit is Apple’s framework for building iPhone and iPad interfaces.

In plain words
What is it for?
It helps create runnable UI code with mock data, map Figma nodes to views, preserve styles and layout, and mark future API, navigation, analytics, or error-handling work.
Why use it?
It gives the coding agent a fixed order of work so every relevant design node is accounted for before Swift code is written, while leaving business logic for a later phase.

Skill for Cursor

Written for Cursor: installed under .cursor/.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is 详见 [figma-ios-horizontal-layout](../figma-ios-horizontal-layout/SKILL.md).

Good fit It helps create runnable UI code with mock data, map Figma nodes to views, preserve styles and layout, and mark future API, navigation, analytics, or error-handling work.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/mythkiven/figma-ios-codegen
agentmods
npx agentmods add skills/mythkiven/figma-ios-codegen/figma-ios-playbook

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-playbook

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-playbook"><img src="https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-playbook.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 158 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,025 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.00158 $0.08025
Opus 5 $0.00079 $0.04012
Sonnet 5 $0.00032 $0.01605
Haiku 4.5 $0.00016 $0.00802

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

Security

Grade A, and why

figma-ios-playbook 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 10d 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-playbook/SKILL.md · 514 lines

How it starts

The opening of the file, as written. The whole thing — 514 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Figma → iOS 代码生成(入口)

📌 本 playbook 的产物定位(重要)

本 playbook 产出的是 阶段 2 基础 UI 代码(不是最终商用代码):

  • ✅ UI 视觉 / 布局 / 样式 / 交互骨架 100% 还原
  • ✅ 数据走 mock(URL 用 manifest.json.mock.default_image_url,模型用临时 struct + 从 Figma 文字提取的数据)
  • ✅ 业务逻辑留 // TODO(阶段3): ... 锚点
  • 负责:接口对接、ViewModel / Service、路由、埋点、错误处理、权限、持久化

这些由 阶段 3(结合 PRD + 接口文档二次加工,人工或另一个 AI 会话完成)接手。阶段 2 的目标是「UI 能跑能看,阶段 3 接手时只动数据层不动视图层」。

🏷 类名前缀(强制)

所有新建顶层类型(class / struct / enum / protocol / actor)必须以业务类前缀 <P> 开头,见 host.json / PROJECT_BINDING §0

可选外部 driver 若注入 CLASS_PREFIX = <P> 则优先于 host.json(本开源仓不附带 driver)。本文档示例中的 XxxVC / XxxView / XxxCell 占位应理解为 <P>XxxVC(真实生成时展开,如 AppFillOrderVC)。


⛔ 强制流程:先输出「节点 → view 映射表」再写一行代码

阶段 2 开始第一件事就是产出一份对账表(直接放生成代码文件顶部的注释里),覆盖 design.json 中所有非跳过节点。在没有这份表前,禁止直接写 class <P>XxxVC: ... / private lazy var ... = ...

表格模板(必须按此格式输出)

// ============== 节点 → View 映射表(共 N 个节点,跳过 K 个)==============
// node_id              type           name                       impl
// 341:265              GROUP          填写派单要求_增加外露品类       根 view(self.view)
// 341:266              GROUP          bg                         backgroundImageView(整组导出,无语义子节点 → 切图)
// 341:273              GROUP          编组 3                     stepStripContainer(含 6 个语义子节点 → 拆解)
//   ↳ 341:274          RECTANGLE      矩形                       stepStripBgView(蓝色圆角底)
//   ↳ 341:275          FRAME          编组 4                     step1Container
//     ↳ 341:276        TEXT           填写要求                   step1TitleLabel
//     ↳ 341:277        TEXT           STEP.1                    step1IndexLabel
//   ↳ 341:284          RECTANGLE      位图                       stepArrow1ImageView (img_af078_asset)
//   ...
// 341:311              INSTANCE       系统控件/home indicator   <skip> (figma-ios-to-code-conventions)
// ...
// === 跳过节点统计 ===
// - Home Indicator: 341:311 (系统控件)
// - Status Bar: <none>(设计稿无该节点)
//
// === 切图节点统计(assets/ios/manifest.json)===
// 341:266 → img_51be1_bg            (背景图,纯位图)
// 341:284 → img_af078_asset         (步骤箭头 1)
// ...
//
// === 列表节点 ===
// 341:332 (Property 1=水平): scroll=horizontal, cell=341:333, count=5
// ...

Read the full file on GitHub · 514 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. 10d ago First seen · 514 lines · 158 tokens per session scan A a96298292a5b

Subscribe to this mod's changes

figma-ios-playbook is a skill published in the GitHub repository mythkiven/figma-ios-codegen (9 stars, last pushed 2mo ago), licensed MIT. It adds 158 tokens to every session and 8,025 once invoked, about $0.0008 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