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.
npx skills add mythkiven/figma-ios-codegen --skill figma-ios-uicollectionview-codegengit clone --depth 1 https://github.com/mythkiven/figma-ios-codegenWrote 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-uicollectionview-codegen)<a href="https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-uicollectionview-codegen"><img src="https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-uicollectionview-codegen/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.
<a href="https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-uicollectionview-codegen"><img src="https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-uicollectionview-codegen.svg" alt="Reviewed on agentmods" width="80" 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.00078 | $0.07443 |
| Opus 5.5 | $0.00031 | $0.02977 |
| Sonnet 5.5 | $0.00016 | $0.01489 |
| Haiku 4.5 | $0.00008 | $0.00744 |
Grade A, and why
figma-ios-uicollectionview-codegen 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 2mo 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 — 670 lines — stays where its author put it; the contents beside it link to each section on GitHub.
UICollectionView 代码生成
⚡ QUICK_REF(Agent 优先读此处)
核心定位:本 SKILL 提供"流程框架 + 指导原则 + 强制约束",具体如何分析和生成代码由大模型根据实际场景判断。
本 skill 的定位:阶段 2 基础 UI 代码生成(UI + 临时模型 + Mock 数据 + 交互骨架),阶段 3 会用 PRD + 接口文档把 mock 换成真实接口、临时模型换成 API 模型,本 skill 不管阶段 3。
核心流程(6 步):
- 分析 Cell 结构 → 遍历所有子节点,识别布局和元素
- 推断临时模型字段 → 根据语义推断阶段 2 临时 struct(阶段 3 会用真实 API 模型替换)
- 生成 Mock 数据 → 阶段 2 强制(图片走
manifest.json.mock.default_image_url,其他字段语义生成) - 生成 CollectionView → lazy var + layout + DataSource
- 生成 Cell 代码 → 子视图 + 布局(SnapKit)+ configure 方法
- 生成交互逻辑 → didSelectItemAt(有选中态 → toggle;无 → print +
// TODO(阶段3): 补业务跳转/网络请求)
生成内容清单
| 组件 | 说明 | 必须 |
|---|---|---|
| Model 定义 | 根据子元素推断字段 | ✅ |
| Mock 数据 | 从 Figma 提取或生成占位 | ✅ |
| CollectionView | lazy var + layout 配置 | ✅ |
| Cell 定义 | configure(item:) 方法 | ✅ |
| DataSource | numberOfItemsInSection + cellForItemAt | ✅ |
| Delegate | didSelectItemAt 交互逻辑 | ✅ |
| LeftAlignedFlowLayout | 标签集合专用(可选) | ⚠️ |
强制约束(质量保证)
✅ 必须遵守:
- 模型必须包含
id字段 - 必须使用 Model,禁止字符串数组
- 颜色/字体走 bindings map(未命中用 UIKit fallback)
- 布局按 host.layout_engine(默认相对约束;可用 SnapKit 或原生 Auto Layout)
- 交互逻辑:有
isSelected→ toggle + reload;无 → print - 访问级别匹配:DataSource / Delegate 的 extension 访问级别必须等于宿主类。详见下方「访问级别匹配规则」。
❌ 严格禁止:
- 禁止跳过流程步骤
- 禁止硬编码数据(必须从 Figma 提取或根据语义生成)
- 禁止同时使用
estimatedItemSize和sizeForItemAt - 禁止生成不完整的代码
- 禁止
public class配extension(默认 internal)的搭配 —— 必报「Method must be declared public」编译错误。
访问级别匹配规则(强制,避免协议一致性报错)
报错形态(这是本规则要根除的):
Method 'collectionView(_:numberOfItemsInSection:)' must be declared public
because it matches a requirement in public protocol 'UICollectionViewDataSource'
原因:public 类实现 public 协议,方法访问级别必须 ≥ public,但 extension 默认是 internal。
另一常见报错(同文件内独立 UICollectionViewCell 子类 + configure(item:)):
Method must be declared fileprivate because its parameter uses a private type
原因:数据模型写成 private struct FooItem,而 Cell 的 func configure(item: FooItem) 默认为 internal。方法的可见性不能高于签名中出现的类型——private 类型只能出现在 private / fileprivate 成员签名里。
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.
- 2mo ago First seen · 670 lines · 78 tokens per session scan A 8bd965018d18
figma-ios-uicollectionview-codegen is a skill published in the GitHub repository mythkiven/figma-ios-codegen (9 stars, last pushed 3mo ago), licensed MIT. It adds 78 tokens to every session and 7,443 once invoked, about $0.0003 per session on Opus 5.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.…
sleek-design-mobile-apps
Design mobile app screens with Sleek, edit Sleek projects, and implement their designs in React Native or HTML.
compose-ui
Writes and reviews composables for Compose and CMP: the Route/Screen/leaf split, state-read placement and stability, loading/empty/error UX states, LazyColumn lists and grids, animation choice, accessibility and semantics, design-system tokens, CMP Res resources, Coil images, and keyboard/focus. Use when touching…
cometchat-flutter-v6-customization
Theme and brand the Flutter v6 UI Kit — light/dark mode, the CometChatColorPalette / CometChatTypography / CometChatSpacing theme extensions, per-widget style objects, and view slots. Triggers: 'change chat colors flutter', 'dark mode chat flutter', 'match my brand flutter', 'customize cometchat theme flutter'…
Audit Apple-platform UI work against Human Interface Guidelines with HIG Doctor
Run a repeatable HIG compliance audit over app code before shipping UI changes, then use the findings to guide remediation.