figma-ios-iconfont-mapping

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

A mapping guide that turns icon-font symbols identified in Figma data into Swift font and text code using a project JSON map. An icon font stores icons as characters in a font rather than as separate image files.

In plain words
What is it for?
Use it when generating Swift buttons or other controls that contain Figma icon-font nodes, including their size, color, or rotation.
Why use it?
It keeps icons consistent with the host project and marks unmapped symbols for follow-up instead of guessing project-specific APIs.

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-design-token-mapping](../figma-ios-design-token-mapping/SKILL.md)(查 `color_map.json`)。.

Good fit Use it when generating Swift buttons or other controls that contain Figma icon-font nodes, including their size, color, or rotation.

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-iconfont-mapping

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-iconfont-mapping

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-iconfont-mapping"><img src="https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-iconfont-mapping.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,300 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.00057 $0.01300
Opus 5 $0.00028 $0.00650
Sonnet 5 $0.00011 $0.00260
Haiku 4.5 $0.00006 $0.00130

Measured 10d ago against content hash fcef5187f425, 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-iconfont-mapping 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-iconfont-mapping/SKILL.md · 144 lines

How it starts

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

Iconfont:映射表优先,未命中走 fallback

权威配置.cursor/bindings/iconfont_map.json
示例包(MK):.cursor/bindings/examples/mk/iconfont_map.json
颜色仍走 figma-ios-design-token-mapping(查 color_map.json)。
本 skill 写死宿主 iconfont 类名;调用约定只活在 iconfont_map.json 里。

核心规则(强制)

design.json[node].iconfont.symbol
  → 查 bindings/iconfont_map.json 的 map
  → 命中:用 map 里的 font / text(可替换 {size})
  → 未命中:用 fallback + TODO 注释(禁止臆造 OC 属性名)

数据来源

figma-ios-preload-data 已识别 iconfont 并写入 design.json[node_id].iconfont

{
  "symbol": "icon_query_24",
  "size_hint": 24,
  "color": "rgba(255,255,255,1)",
  "rotation": 90.0,
  "source": "comment"
}
字段 用法
symbol 查表 key(已含评论修正)
size_hint 替换 map/fallback 里的 {size};缺失则用 min(frame.w, frame.h)
color 走 color_map(见颜色 skill)
rotation 有且 |deg|≥1 时加 transform;评论要求不旋转则忽略

若数据包仍带旧字段 lib_hint / objc_property / font_call忽略。阶段 1 已不再写入;生成以 iconfont_map.json 为准

sourceexplicit / implicit / comment(阶段 1 已处理评论覆盖,阶段 2 直接用 symbol)。

集合容器

_role.is_iconfont_library == true(如 iconfont_24自身不渲染,跳过。


查表步骤

  1. .cursor/bindings/iconfont_map.json
  2. iconfont.symbolmap
  3. 命中
label.font = <map.font>    // 替换 {size}
label.text = <map.text>
label.textColor = <color_map 查 iconfont.color 的结果>
  1. 未命中 → 输出 fallback.comment(替换 {symbol}),再用 fallback.font / fallback.text禁止编造 MKIconFont.shared().mk_xxx

映射文件形状

{
  "schema_version": "1.0.0",
  "fallback": {
    "font": "UIFont.systemFont(ofSize: {size})",
    "text": "\"?\"",
    "comment": "// TODO(阶段2): iconfont `{symbol}` 未在 iconfont_map.json 命中"
  },
  "map": {
    "icon_query_24": {
      "font": "MKIconFont.iconFont(withSize: 24)",
      "text": "MKIconFont.shared().mk_icon_query_24"
    },
    "icon_next_12": {
      "font": "MKIconFont.iconFont(withSize: {size})",
      "text": "MKIconFont.shared().mk_icon_next_12"
    }
  }
}

Read the full file on GitHub · 144 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 144 lines · 57 tokens per session scan A fcef5187f425

Subscribe to this mod's changes

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