appkit-swiftui-bridge

appkit-swiftui-bridge is a skill for Claude Code from rshankras/claude-code-apple-skills. It costs 44 tokens per session (978 once invoked), scanned A, original, MIT.

A guide to using AppKit and SwiftUI together in macOS apps. AppKit is Apple's older macOS interface framework, while SwiftUI is its newer declarative framework.

In plain words
What is it for?
It is for embedding SwiftUI in AppKit, wrapping AppKit views for SwiftUI, and sharing state between the two frameworks.
Why use it?
It helps developers combine existing AppKit views with newer SwiftUI screens without rewriting an entire app at once.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the apple-skills plugin — 147 skills shipped together , and of apple-skills

Good fit It is for embedding SwiftUI in AppKit, wrapping AppKit views for SwiftUI, and sharing state between the two frameworks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rshankras/claude-code-apple-skills/appkit-swiftui-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 rshankras/claude-code-apple-skills --skill appkit-swiftui-bridge
Clone the repo
git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills

Made for: Claude Code.

Or install apple-skills, the plugin that ships this one along with the rest of its 147 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/appkit-swiftui-bridge/github.svg)](https://agentmods.dev/skills/rshankras/claude-code-apple-skills/appkit-swiftui-bridge)
Your own site
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/appkit-swiftui-bridge"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/appkit-swiftui-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 appkit-swiftui-bridge

Your own site · 80×15
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/appkit-swiftui-bridge"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/appkit-swiftui-bridge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 978 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00044 $0.00978
Opus 5 $0.00022 $0.00489
Sonnet 5 $0.00009 $0.00196
Haiku 4.5 $0.00004 $0.00098

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

Security

Grade A, and why

appkit-swiftui-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 7d 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/macos/appkit-swiftui-bridge/SKILL.md · 114 lines

How it starts

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

AppKit-SwiftUI Bridge Expert

You are a macOS development expert specializing in hybrid AppKit-SwiftUI applications. You help developers incrementally adopt SwiftUI within existing AppKit apps and leverage AppKit capabilities from SwiftUI.

When This Skill Activates

  • User wants to bridge AppKit and SwiftUI
  • User asks about NSViewRepresentable or NSHostingView/NSHostingController
  • User wants to wrap an AppKit view for use in SwiftUI
  • User wants to host SwiftUI inside an existing AppKit app
  • User is migrating an AppKit app to SwiftUI incrementally

Your Role

Guide developers through bridging AppKit and SwiftUI, choosing the right approach for each situation, and managing shared state between frameworks.

Core Focus Areas

  1. NSViewRepresentable - Wrapping AppKit views for use in SwiftUI
  2. Hosting Controllers - Embedding SwiftUI views in AppKit containers
  3. State Management - Bridging state between frameworks with @Observable and Combine

When to Bridge vs. Go Native

Use NSViewRepresentable when:

  • SwiftUI lacks a native equivalent (e.g., NSTextView rich text, NSOpenGLView)
  • You need fine-grained control over AppKit view lifecycle
  • Performance-critical views need AppKit optimization (e.g., NSTableView with 100k+ rows)

Use NSHostingView/Controller when:

  • Incrementally adopting SwiftUI in an existing AppKit app
  • A SwiftUI view is more concise for the job (e.g., complex layouts, animations)
  • Building new features in SwiftUI within an AppKit shell

Go pure SwiftUI when:

  • Starting a new project targeting macOS 14+
  • The feature has full SwiftUI API coverage
  • No AppKit-specific behavior is needed

How to Conduct Reviews

Step 1: Identify the Bridge Direction

  • Is AppKit hosting SwiftUI, or SwiftUI wrapping AppKit?
  • What's the minimum macOS deployment target?
  • Are there performance or lifecycle constraints?

Step 2: Review Against Module Guidelines

  • NSViewRepresentable usage (see nsviewrepresentable.md)
  • Hosting controllers (see hosting-controllers.md)
  • State management (see state-management.md)

Read the full file on GitHub · 114 lines

Files

What ships with it

3 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. 7d ago First seen · 114 lines · 44 tokens per session scan A ea8a86243c70

Subscribe to this mod's changes

appkit-swiftui-bridge is a skill published in the GitHub repository rshankras/claude-code-apple-skills (719 stars, last pushed 1mo ago), licensed MIT. It adds 44 tokens to every session and 978 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

accessibility-a11y

WCAG 2.2 compliance, ARIA patterns, keyboard navigation, screen readers, automated testing.

travisjneuman/.claude · 26 tokens

page-template

Scaffold a sitemap-organized HTML showcase site (provenance reports, contractor showcases, telemetry dashboards, weekly digests, audit results).

terrylica/cc-skills · 31 tokens

generic-design-system

Complete design system reference for any project - colors, typography, spacing, components, animations. Adapts to project theme and tech stack. Use when implementing UI, choosing colors, creating animations, or ensuring brand consistency. For new design systems, use ui-research skill first.

travisjneuman/.claude · 60 tokens

generic-static-design-system

Complete design system reference for static HTML/CSS/JS sites. Covers colors, typography, component patterns, animations, and accessibility. Use when implementing UI, choosing colors, or ensuring brand consistency.

travisjneuman/.claude · 44 tokens

generic-static-feature-developer

Guide feature development for static HTML/CSS/JS sites. Covers patterns, automation workflows, and content validation. Use when adding features, modifying automation, or planning changes.

travisjneuman/.claude · 40 tokens

generic-static-ux-designer

Professional UI/UX design expertise for static HTML/CSS/JS sites. Covers design thinking, user psychology, visual hierarchy, minimalist interaction patterns, accessibility, and performance-driven design. Use when designing features, improving UX, or conducting design reviews.

travisjneuman/.claude · 56 tokens