uikit-bridging

uikit-bridging is a skill for Claude Code, Codex from troyjthomas/ios-agent-skills. It costs 70 tokens per session (2,594 once invoked), scanned A, original, MIT.

A guide for embedding UIKit, Apple's older interface framework, inside a SwiftUI app when SwiftUI lacks a needed feature.

In plain words
What is it for?
Use it for specific gaps such as precise text line height, an eyedropper colour picker, or vertical text-field keyboard dismissal.
Why use it?
It helps developers avoid custom bridges when SwiftUI already provides a suitable solution and use bridging correctly when it does not.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md.

Good fit Use it for specific gaps such as precise text line height, an eyedropper colour picker, or vertical text-field keyboard dismissal.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/troyjthomas/ios-agent-skills/uikit-bridging
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 troyjthomas/ios-agent-skills --skill uikit-bridging
Clone the repo
git clone --depth 1 https://github.com/troyjthomas/ios-agent-skills

Made for: Claude Code, Codex.

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 uikit-bridging

README.md
[![agentmods](https://agentmods.dev/badge/skills/troyjthomas/ios-agent-skills/uikit-bridging/github.svg)](https://agentmods.dev/skills/troyjthomas/ios-agent-skills/uikit-bridging)
Your own site
<a href="https://agentmods.dev/skills/troyjthomas/ios-agent-skills/uikit-bridging"><img src="https://agentmods.dev/badge/skills/troyjthomas/ios-agent-skills/uikit-bridging/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 uikit-bridging

Your own site · 80×15
<a href="https://agentmods.dev/skills/troyjthomas/ios-agent-skills/uikit-bridging"><img src="https://agentmods.dev/badge/skills/troyjthomas/ios-agent-skills/uikit-bridging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,594 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.00070 $0.02594
Opus 5 $0.00035 $0.01297
Sonnet 5 $0.00014 $0.00519
Haiku 4.5 $0.00007 $0.00259

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

Security

Grade A, and why

uikit-bridging 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 11d 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.

skills/uikit-bridging/SKILL.md · 250 lines

How it starts

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

UIKit Bridging

SwiftUI is the default. But there are a small number of API gaps where SwiftUI in iOS 26 is genuinely insufficient and a UIKit bridge via UIViewRepresentable is the correct path. This skill covers HOW to bridge correctly when the swiftui-native-first skill has already established that you should.

When to Use This Skill

You're here because:

  • The swiftui-native-first skill named one of the three documented escape hatches (absolute line-height, UIColorPickerViewController eyedropper, or vertical-axis TextField keyboard dismissal)
  • You hit a SwiftUI API gap not yet documented and want to bridge — read the "Before You Bridge" section below first

If you're reaching for UIViewRepresentable because it's familiar, stop. SwiftUI usually has a way. The bridge is for when SwiftUI provably doesn't.

Before You Bridge — A Three-Question Checklist

  1. Can you name the specific SwiftUI API gap that forces the bridge? "I want fine-grained control" is not a gap. "Text(AttributedString) silently drops paragraphStyle so absolute line height is impossible" is a gap.
  2. Have you searched for an iOS 26 native solution? Use the mcp-setup skill's Sosumi MCP to check Apple docs for the latest API. SwiftUI gains capabilities every year.
  3. Have you posted the gap as a ## Known Gotchas entry in CLAUDE.md? Future agents need to see why the bridge exists, or someone will "simplify" it back to a broken pure-SwiftUI version.

If you can't answer all three, don't bridge.

The UIViewRepresentable Lifecycle

The minimum viable bridge:

struct MyBridgedView: UIViewRepresentable {
    let text: String
    let color: Color

    func makeUIView(context: Context) -> UILabel {
        let label = UILabel()
        label.numberOfLines = 0
        label.lineBreakMode = .byWordWrapping
        return label
    }

    func updateUIView(_ label: UILabel, context: Context) {
        label.text = text
        label.textColor = UIColor(color)
    }
}

Read the full file on GitHub · 250 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. 11d ago First seen · 250 lines · 70 tokens per session scan A 3896cce61c5c

Subscribe to this mod's changes

uikit-bridging is a skill published in the GitHub repository troyjthomas/ios-agent-skills (2 stars, last pushed 3mo ago), licensed MIT. It adds 70 tokens to every session and 2,594 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

swift-language

Apply modern Swift language patterns and idioms for non-concurrency, non-SwiftUI code. Covers if/switch expressions (Swift 5.9+), typed throws (Swift 6+), result builders, property wrappers, opaque and existential types (some vs any), guard patterns, Never type, Regex builders (Swift 5.7+), basic Codable shaping…

dpearson2699/swift-ios-skills · 160 tokens

Swift Concurrency

Modern Swift concurrency with async/await, actors, TaskGroup, Sendable, and proper actor isolation for thread-safe iOS development.

JordanCoin/ios-skills-collection · 30 tokens

swift-concurrency

Diagnose data races, convert callback-based code to async/await, implement actor isolation patterns, resolve Sendable conformance issues, and guide Swift 6 migration. Use when developers mention: (1) Swift Concurrency, async/await, actors, or tasks, (2) "use Swift Concurrency" or "modern concurrency patterns", (3)…

JordanCoin/ios-skills-collection · 158 tokens

spm-build-analysis

Analyze Swift Package Manager dependencies, package plugins, module variants, and CI-oriented build overhead that slow Xcode builds. Use when a developer suspects packages, plugins, or dependency graph shape are hurting clean or incremental build performance, mentions SPM slowness, package resolution time, build…

JordanCoin/ios-skills-collection · 87 tokens

macos-menubar-tuist-app

Build, refactor, or review macOS menubar apps that use Tuist and SwiftUI. Use when creating or maintaining LSUIElement menubar utilities, defining Tuist targets/manifests, implementing model-client-store-view architecture, adding script-based launch flows, or validating reliable local build/run behavior without…

JordanCoin/ios-skills-collection · 74 tokens

macos-spm-app-packaging

Scaffold, build, and package SwiftPM-based macOS apps without an Xcode project. Use when you need a from-scratch macOS app layout, SwiftPM targets/resources, a custom .app bundle assembly script, or signing/notarization/appcast steps outside Xcode.

JordanCoin/ios-skills-collection · 65 tokens