figma-ios-rxswift-interaction-pattern

figma-ios-rxswift-interaction-pattern is a skill for Cursor from mythkiven/figma-ios-codegen. It costs 61 tokens per session (1,044 once invoked), scanned A, original, MIT.

A guide for wiring iOS user interactions with either standard UIKit target-action code or RxSwift and RxCocoa. RxSwift is a library for handling events and changing values as streams over time.

In plain words
What is it for?
Use it to generate interaction code for buttons, gestures, text fields, and text views, choosing RxSwift only when the project configuration requires it.
Why use it?
It provides a consistent pattern for connecting button taps, gestures, and text changes to application code.

Skill for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to generate interaction code for buttons, gestures, text fields, and text views, choosing RxSwift only when the project configuration requires it.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mythkiven/figma-ios-codegen/figma-ios-rxswift-interaction-pattern
Install

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.

Any agent
npx skills add mythkiven/figma-ios-codegen --skill figma-ios-rxswift-interaction-pattern
Clone the repo
git clone --depth 1 https://github.com/mythkiven/figma-ios-codegen

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-rxswift-interaction-pattern

README.md
[![agentmods](https://agentmods.dev/badge/skills/mythkiven/figma-ios-codegen/figma-ios-rxswift-interaction-pattern/github.svg)](https://agentmods.dev/skills/mythkiven/figma-ios-codegen/figma-ios-rxswift-interaction-pattern)
Your own site
<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.

agentmods 80×15 button for figma-ios-rxswift-interaction-pattern

Your own site · 80×15
<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>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,044 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.00061 $0.01044
Opus 5 $0.00030 $0.00522
Sonnet 5 $0.00012 $0.00209
Haiku 4.5 $0.00006 $0.00104

Measured 9d ago against content hash caecb8ae16e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

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.

.cursor/skills/figma-ios-rxswift-interaction-pattern/SKILL.md · 150 lines

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.jsoninteraction 为准。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)

Read the full file on GitHub · 150 lines

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. 9d ago First seen · 150 lines · 61 tokens per session scan A caecb8ae16e8

Subscribe to this mod's changes

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.

Related

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.

Xopoko/build-swift-apps · 36 tokens

flutter-codestyle

Custom Instructions: Senior Flutter & Dart Engineer.

GulajavaMinistudio/awesome-copilot-id · 13 tokens

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…

Nagarjuna2997/ios-agent-skill · 167 tokens

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.

RayFernando1337/rayfernando-skills · 84 tokens

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.

Xopoko/build-swift-apps · 61 tokens

swiftui-skills

Apple-authored SwiftUI and platform guidance extracted from Xcode. Helps AI agents write idiomatic, Apple-native SwiftUI with reduced hallucinations.

ameyalambat128/swiftui-skills · 34 tokens