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.
git clone --depth 1 https://github.com/mythkiven/figma-ios-codegennpx agentmods add skills/mythkiven/figma-ios-codegen/figma-ios-navigationWrote 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-navigation)<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>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.00049 | $0.01754 |
| Opus 5 | $0.00024 | $0.00877 |
| Sonnet 5 | $0.00010 | $0.00351 |
| Haiku 4.5 | $0.00005 | $0.00175 |
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.
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 时:
- 基类 =
host.bases.view_controller(Collection/Table 页用对应字段) - 类名前缀按 PROJECT_BINDING §0 /
host.class_prefix - 若
host.vc_required_overrides非空 → 每个 VC 都必须输出其中的方法;{has_custom_nav}替换为true(本页用了自定义导航)或false - 若
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 分左/中/右。
三、导航栏代码写法
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 · 181 lines · 49 tokens per session scan A 21786fc97bd3
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.
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 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.