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.5 | $0.00024 | $0.00418 |
| Sonnet 5.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 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 — 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.
- 2mo 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 3mo ago), licensed MIT. It adds 61 tokens to every session and 1,044 once invoked, about $0.0002 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
compose-platform
Owns platform splits for Compose Multiplatform apps: places declarations in commonMain, chooses expect/actual vs interface plus DI, wires host adapters and ports, and validates iOS/Swift interop, desktop and web targets, and platform lifecycle. Use when touching commonMain, expect, actual, iosMain, Swift, SKIE, Flow…
cometchat-android-v6-kotlin-placement
Where the CometChat Android v6 chat UI goes in a Kotlin XML Views app — the default conversations→message Activity flow, growing to the tab-based app (chats/users/groups/calls + detail, thread and search screens + incoming calls), a single one-to-one screen, or chat embedded in an existing Activity/Fragment, with a…
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…
ios-builder
Turn an Apple app idea into a concrete implementation using Swift, Apple technology references, release notes, and separately editable Icon Composer layers. Use for creating or extending native Apple apps; requires a coding environment for file edits and Xcode for iOS builds.
visionos-swift-spatial
Architecting native spatial computing applications for visionOS using Swift, SwiftUI, RealityKit, and ARKit. Use when developing 3D Windows, Volumes, Immersive Spaces, RealityView components, Spatial Audio, ShaderGraph Materials, and Hand/Eye tracking interaction models.