macos-appkit-bridge

macos-appkit-bridge is a skill for Claude Code, Codex from Xopoko/build-swift-apps. It costs 47 tokens per session (619 once invoked), scanned A, a copy of appkit-interop, MIT.

A guide for connecting SwiftUI with AppKit, Apple's older framework for native macOS interface behavior. The connection is kept small so SwiftUI remains responsible for normal app state.

In plain words
What is it for?
Use it for specific window behavior, text-system features, menu validation, drag and drop, file panels, first-responder control, or other AppKit-only needs.
Why use it?
It helps when SwiftUI does not provide a needed macOS behavior, without rewriting an entire screen in AppKit.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the build-swift-apps plugin — 61 skills, 3 commands, 3 MCP servers shipped together

Good fit Use it for specific window behavior, text-system features, menu validation, drag and drop, file panels, first-responder control, or other AppKit-only needs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xopoko/build-swift-apps/macos-appkit-bridge
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 Xopoko/build-swift-apps --skill macos-appkit-bridge
Clone the repo
git clone --depth 1 https://github.com/Xopoko/build-swift-apps

Made for: Claude Code, Codex.

Or install build-swift-apps, the plugin that ships this one along with the rest of its 61 skills, 3 commands, 3 MCP servers.

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 macos-appkit-bridge

README.md
[![agentmods](https://agentmods.dev/badge/skills/xopoko/build-swift-apps/macos-appkit-bridge/github.svg)](https://agentmods.dev/skills/xopoko/build-swift-apps/macos-appkit-bridge)
Your own site
<a href="https://agentmods.dev/skills/xopoko/build-swift-apps/macos-appkit-bridge"><img src="https://agentmods.dev/badge/skills/xopoko/build-swift-apps/macos-appkit-bridge/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 macos-appkit-bridge

Your own site · 80×15
<a href="https://agentmods.dev/skills/xopoko/build-swift-apps/macos-appkit-bridge"><img src="https://agentmods.dev/badge/skills/xopoko/build-swift-apps/macos-appkit-bridge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 619 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 86% copy Near-identical to another mod 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.00047 $0.00619
Opus 5 $0.00023 $0.00309
Sonnet 5 $0.00009 $0.00124
Haiku 4.5 $0.00005 $0.00062

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

Security

Grade A, and why

macos-appkit-bridge 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 10d 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.

Origin

This is a copy

86% identical to appkit-interop — 8 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/macos-appkit-bridge/SKILL.md · 69 lines

How it starts

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

macOS AppKit Bridge

Quick Start

Use this skill when SwiftUI is close but not quite enough for native macOS behavior. Keep the bridge as small and explicit as possible. SwiftUI should usually remain the source of truth, while AppKit handles the imperative edge.

Choose The Smallest Bridge

  • Use pure SwiftUI when the required behavior already exists in scenes, toolbars, commands, inspectors, or standard controls.
  • Use NSViewRepresentable when you need a specific AppKit view with lightweight lifecycle needs.
  • Use NSViewControllerRepresentable when you need controller lifecycle, delegation, or presentation coordination.
  • Use direct AppKit window or app hooks when you need NSWindow, responder-chain, menu validation, panels, or app-level behavior.

Workflow

  1. Name the capability gap precisely.

    • Window behavior
    • Text system behavior
    • Menu validation
    • Drag and drop
    • File open/save panels
    • First responder control
  2. Pick the smallest boundary that solves it.

    • Avoid porting a whole screen to AppKit when one wrapped control or coordinator would do.
  3. Keep ownership explicit.

    • SwiftUI owns value state, selection, and observable models.
    • AppKit objects stay inside the representable, coordinator, or bridge object.
  4. Expose a narrow interface back to SwiftUI.

    • Bindings for editable state
    • Small callbacks for events
    • Focused bridge services only when necessary
  5. Validate lifecycle assumptions.

    • SwiftUI may recreate representables.
    • Coordinators exist to hold delegate and target-action glue, not as a second app architecture.

References

  • references/representables.md: choosing between view and view-controller wrappers, plus coordinator patterns.
  • references/window-panels.md: window access, utility windows, and open/save panels.
  • references/responder-menus.md: first responder, command routing, and menu validation.
  • references/drag-drop-pasteboard.md: pasteboard, file URLs, and desktop drag/drop edges.

Read the full file on GitHub · 69 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 69 lines · 47 tokens per session scan A 7f0153e20e09

Subscribe to this mod's changes

macos-appkit-bridge is a skill published in the GitHub repository Xopoko/build-swift-apps (45 stars, last pushed 13d ago), licensed MIT. It adds 47 tokens to every session and 619 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to appkit-interop, differing in 8 lines, and is treated as a copy.

Related

Other skills, from other repositories

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

macos-menubar-swiftui

Use when building, refactoring, or debugging a macOS menu bar app with SwiftUI, or when a MenuBarExtra misbehaves — the icon renders wrong or vanishes, the Settings window opens behind other apps, the popover cannot be closed, controls inside a .menu style do not render, the Dock icon comes back, or the app quits when…

aka-kika/akakika-skills · 120 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

swift6-concurrency

Handle Swift 6 concurrency patterns. Use when encountering Sendable warnings, data race errors, MainActor isolation issues, or framework interop problems (EventKit, Speech, AVFoundation, etc.). Trigger on "Swift 6 error", "Sendable", "data race", "MainActor", "concurrency warning", or "strict concurrency".

markdavidgan/apple-dev-skills · 74 tokens