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-rxswift-interaction-patterngit 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-rxswift-interaction-pattern)<a href="https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-rxswift-interaction-pattern"><img src="https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-rxswift-interaction-pattern/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-rxswift-interaction-pattern"><img src="https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-rxswift-interaction-pattern.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.00061 | $0.01044 |
| Opus 5 | $0.00030 | $0.00522 |
| Sonnet 5 | $0.00012 | $0.00209 |
| Haiku 4.5 | $0.00006 | $0.00104 |
Grade A, and why
figma-ios-rxswift-interaction-pattern 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 9d 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 — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.
交互模式(默认示例:target-action;Rx 仅当 host.interaction=rxswift)
以
host.json→interaction为准。target_action用下方「传统写法」;仅配置为rxswift时用 Rx 示例。
不要强制写import;需要 Rx 时由生成代码按工程依赖自行引入。
传统写法(host.interaction = target_action,默认)
button.addTarget(self, action: #selector(onTap), for: .touchUpInside)
@objc private func onTap() {
// ...
}
Rx 写法(仅 host.interaction = rxswift)
依赖与 import 由宿主工程已具备时再使用,skill 不强制写死:
标准写法
1. 在 ViewController 或 View 中声明 DisposeBag
import UIKit
import RxSwift
import RxCocoa
class AppDemoViewController: UIViewController {
private let disposeBag = DisposeBag()
// ...
}
2. 按钮点击事件
private func setupBindings() {
submitButton.rx.tap
.subscribe(onNext: { [weak self] in
self?.handleSubmitTapped()
})
.disposed(by: disposeBag)
}
3. 手势事件
let tapGesture = UITapGestureRecognizer()
view.addGestureRecognizer(tapGesture)
tapGesture.rx.event
.subscribe(onNext: { [weak self] _ in
self?.handleTapped()
})
.disposed(by: disposeBag)
4. UITextField / UITextView 文本变化
textField.rx.text.orEmpty
.subscribe(onNext: { [weak self] text in
self?.handleTextChanged(text)
})
.disposed(by: disposeBag)
5. UIControl 通用事件
stepper.rx.controlEvent(.valueChanged)
.subscribe(onNext: { [weak self] in
self?.handleValueChanged()
})
.disposed(by: disposeBag)
与传统 target-action 的对比
传统写法(仍可用,但不推荐)
button.addTarget(self, action: #selector(handleTapped), for: .touchUpInside)
@objc private func handleTapped() {
// ...
}
RxSwift 写法(推荐)
button.rx.tap
.subscribe(onNext: { [weak self] in
self?.handleTapped()
})
.disposed(by: disposeBag)
private func handleTapped() {
// ...
}
优势:
- 不需要
@objc标记 - 事件绑定统一在
setupBindings()中,清晰 - 支持链式操作(如防抖、合并多个事件等)
防抖与节流
防抖(debounce)- 避免频繁点击
button.rx.tap
.debounce(.milliseconds(300), scheduler: MainScheduler.instance)
.subscribe(onNext: { [weak self] in
self?.handleSubmitTapped()
})
.disposed(by: disposeBag)
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.
- 9d ago First seen · 150 lines · 61 tokens per session scan A caecb8ae16e8
figma-ios-rxswift-interaction-pattern is a skill published in the GitHub repository mythkiven/figma-ios-codegen (9 stars, last pushed 1mo ago), licensed MIT. It adds 61 tokens to every session and 1,044 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.
Other skills, from other repositories
swiftui-view-architect
Refactor oversized SwiftUI view files into stable, dedicated subviews with MV-first data flow, explicit dependencies, extracted actions, and correct Observation usage.
flutter-codestyle
Custom Instructions: Senior Flutter & Dart Engineer.
ios-agent-skill
Expert iOS/Swift developer behavior for AI coding agents. Use when writing, reviewing, or refactoring Swift, SwiftUI, UIKit, or SwiftData code; when designing iOS app architecture (MVVM, Clean Architecture, coordinators, routing); when building UI that must meet Apple's Human Interface Guidelines, contrast, dark-mode…
bootstrap-ios
Bootstrap agents for iOS, iPadOS, macOS, Swift, SwiftUI, SwiftData/Core Data, Swift Testing, Xcode build/test/debug, Simulator, App Intents, or XcodeBuildMCP work. Use before building, fixing, refactoring, QAing, or setting up Apple-platform repos, and when asked to load/install Ray's iOS skills or bootstrap iOS.
build-swift-apps
Route broad or ambiguous Swift and Apple-platform work to a focused skill; this router does not implement domain work. Covers iOS, macOS, SwiftUI, Xcode, Simulator, App Store Connect, Tuist, SwiftPM, signing, profiling, and Apple research.
swiftui-skills
Apple-authored SwiftUI and platform guidance extracted from Xcode. Helps AI agents write idiomatic, Apple-native SwiftUI with reduced hallucinations.