figma-ios-navigation

figma-ios-navigation is a skill for Cursor from mythkiven/figma-ios-codegen. It costs 49 tokens per session (1,754 once invoked), scanned A, original, MIT.

A guide for turning Figma navigation-bar designs into UIKit code, including the screen’s navigation setup and view-controller base class. UIKit is Apple’s framework for building iOS app interfaces.

In plain words
What is it for?
Use it when generating an iOS screen from Figma that has a navigation bar or needs a configured `UIViewController` base class.
Why use it?
It prevents generated code from guessing project-specific classes, navigation styles, colors, icons, or required methods when those details are defined in host configuration files.

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 **宿主配置**:`.cursor/bindings/host.json`(说明见 [PROJECT_BINDING](../figma-ios-PROJECT_BINDING.md)).

Good fit Use it when generating an iOS screen from Figma that has a navigation bar or needs a configured UIViewController base class.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-navigation.svg)](https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-navigation)
Your own site
<a href="https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-navigation"><img src="https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-navigation.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,754 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.00049 $0.01754
Opus 5 $0.00024 $0.00877
Sonnet 5 $0.00010 $0.00351
Haiku 4.5 $0.00005 $0.00175

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

Security

Grade A, and why

figma-ios-navigation 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.

.cursor/skills/figma-ios-navigation/SKILL.md · 181 lines

How it starts

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

Figma → 导航栏 + ViewController 基类

宿主配置.cursor/bindings/host.json(说明见 PROJECT_BINDING
颜色 / iconfont:分别查 color_map.json / iconfont_map.json,不要在 skill 里写死宿主类名。

⚡ QUICK_REF

识别导航栏      → 节点名含 nav/导航 OR 顶部 y≤60 且 width≥90%屏宽(规则不变)
数据来源        → design.json[node]
VC 基类         → host.json bases.view_controller
导航实现        → host.json navigation.strategy = system | custom
工具表达式      → host.json utils.*
iconfont        → iconfont_map.json
颜色/字体       → color_map.json / font_map.json

一、ViewController 基类(读 host.json)

生成 VC 时:

  1. 基类 = host.bases.view_controller(Collection/Table 页用对应字段)
  2. 类名前缀按 PROJECT_BINDING §0 / host.class_prefix
  3. host.vc_required_overrides 非空 → 每个 VC 都必须输出其中的方法;{has_custom_nav} 替换为 true(本页用了自定义导航)或 false
  4. host.base_is_objc == true → 重写基类方法必须加 @objc

vc_required_overrides 为空(vanilla)→ 强制 isHideNavigationWhenPush 之类宿主钩子。


二、导航栏识别规则(优先级从高到低)

规则 1:节点命名(最高优先级)

节点 name 包含以下关键词之一(大小写不敏感)→ 判定为导航栏:

关键词(中文) 关键词(英文) 示例
导航 / 导航栏 / 导航条 navigation / navbar / nav bar / nav_bar 通用组件/导航栏/左右icon导航栏
顶栏 / 标题栏 titlebar / title bar 顶栏/深色
nav 且非业务词 nav-header / top-nav / navBar nav-container

排除:节点名含 导航抽屉 / 侧边导航 / bottom navigation → 不是顶部导航栏。

规则 2:层级与位置特征(中优先级)

满足以下全部条件 → 判定为导航栏:

  • 节点类型为 FRAME 或 INSTANCE
  • 位于画布顶部:y ≤ 60(含状态栏高度)且 y + height ≤ 100
  • 宽度接近全屏:width ≥ 屏幕宽度 × 0.9
  • 高度合理:40 ≤ height ≤ 100

规则 3:子节点特征(辅助判断)

  • 返回按钮:子节点名含 back / 返回 / < / arrow_left
  • 标题文本:TEXT,水平居中,字号 ≥ 14pt
  • 右侧按钮:子节点名含 more / share / help / ?

规则 4:INSTANCE 类型

名称含 通用组件/导航栏/* / NavBar/* / 或 host.navigation.custom_nav_class 类名 → 判定为导航栏。
系统控件/Bars_Status/* → 状态栏占位,跳过(见 to-code-conventions)。

INSTANCE 已由阶段 1 展开:读 design.json[id].children,iconfont / TEXT 按 frame.relative.x 分左/中/右。


三、导航栏代码写法

Read the full file on GitHub · 181 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. 8d ago First seen · 181 lines · 49 tokens per session scan A 21786fc97bd3

Subscribe to this mod's changes

figma-ios-navigation is a skill published in the GitHub repository mythkiven/figma-ios-codegen (9 stars, last pushed 1mo ago), licensed MIT. It adds 49 tokens to every session and 1,754 once invoked, about $0.0002 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 local alternatives in the real app: UI, copy, states, small flows, design-system treatments, rendered docs or DX previews. Use for Unship setup, Canvas comparisons, selection, and cleanup.

mbenhard/unship · 46 tokens