appkit-interop

작성자: openai

SwiftUI에서 macOS 앱을 AppKit으로 브리징할 시기와 방법을 결정합니다. NSViewRepresentable 또는 NSViewControllerRepresentable을 구현하거나 접근할 때 사용합니다.

npx skills add https://github.com/openai/plugins --skill appkit-interop

AppKit Interop

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.

Guardrails

  • Do not duplicate the source of truth between SwiftUI and AppKit.
  • Do not let Coordinator become an unstructured dumping ground.
  • Do not store long-lived NSView or NSWindow instances globally without a strong ownership reason.
  • Prefer a tiny tested bridge over rewriting the feature in raw AppKit.
  • If a pattern can remain entirely in swiftui-patterns, keep it there.

Output Expectations

Provide:

  • the exact SwiftUI limitation being crossed
  • the smallest recommended bridge type
  • the data-flow boundary between SwiftUI and AppKit
  • the lifecycle or validation risks to watch

openai의 다른 스킬

release
openai
커밋된 버전을 올리고, 이를 반영하고, 병합된 커밋에 태그를 단 후, Burrito 릴리스 워크플로우를 검증하여 Symphony 릴리스를 진행합니다. 다음과 같이 요청받았을 때 사용합니다…
signing-entitlements
openai
macOS 앱의 서명, 자격, 강화된 런타임 및 Gatekeeper 문제를 검사합니다. 코드 서명 실패, 누락된 자격 등을 진단하라는 요청을 받을 때 사용하세요.
building-ai-agent-on-cloudflare
openai
Cloudflare에서 Agents SDK를 사용하여 상태 관리, 실시간 WebSockets, 예약 작업, 도구 통합, 채팅을 통해 AI 에이전트를 구축합니다…
epigraphdb-skill
openai
온톨로지, 문헌, MR, 유전자-약물 및 지원 경로 증거에 대한 간결한 EpiGraphDB API 요청을 제출합니다. 사용자가 간결한 EpiGraphDB 요약을 원할 때 사용하세요.
runtime-behavior-probe
openai
런타임 동작 조사를 계획하고 실행하며, 임시 프로브 스크립트, 검증 매트릭스, 상태 제어, 결과 우선 보고서를 사용합니다. 다음 경우에만 사용하세요…
deep-security-scan
openai
사용자가 심층적이고, 철저하며, 다중 패스 또는 변동성을 줄이는 저장소 전체 또는 범위가 지정된 경로의 Codex Security 스캔을 요청할 때 사용합니다. 반복적으로 독립적인…
define-security-policy
openai
저장소 또는 구성 요소에 대한 SECURITY.md 지침을 정의, 검토 또는 업데이트합니다. 사용자가 Codex Security가 검토해야 할 대상과 범위를 벗어나는 항목을 명확히 하려 할 때 사용합니다…
validation
openai
Codex가 보안 스캔의 검증 단계에 이미 있거나 사용자가 하나 이상의 후보 보안 결과를 판별하도록 명시적으로 요청할 때 사용합니다…