appkit-interop

作成者: openai

macOSアプリをSwiftUIから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
コミットされたバージョンを更新して Symphony リリースを切り、それをコミットし、マージされたコミットにタグを付け、Burrito リリースワークフローを確認します。求められた際に使用します…
signing-entitlements
openai
macOSアプリの署名、権限、ハード化されたランタイム、Gatekeeperの問題を検査します。コード署名の失敗や権限の欠落などの診断を求められた際に使用します。
building-ai-agent-on-cloudflare
openai
Cloudflare上でAgents SDKを使用してAIエージェントを構築し、状態管理、リアルタイムWebSocket、スケジュールタスク、ツール統合、チャットなどを実現します。
epigraphdb-skill
openai
オントロジー、文献、MR、遺伝子-薬剤、サポートパスエビデンスに関するコンパクトなEpiGraphDB APIリクエストを送信します。ユーザーが簡潔なEpiGraphDBサマリーを希望する場合に使用します。
runtime-behavior-probe
openai
一時的なプローブスクリプト、検証マトリックス、状態制御、および発見事項優先のレポートを用いて、ランタイム動作調査を計画・実行します。以下の場合にのみ使用してください…
deep-security-scan
openai
ユーザーがリポジトリ全体またはスコープ指定パスに対する深く網羅的な、マルチパスまたはバリアンス低減型のCodexセキュリティスキャンを求めた場合に使用します。独立した反復実行を複数回行います…
define-security-policy
openai
リポジトリまたはコンポーネントのSECURITY.mdガイダンスを定義、レビュー、または更新します。ユーザーがCodex Securityがレビューすべき内容、対象外の内容を明確にしたい場合に使用します。
validation
openai
Codexがセキュリティスキャンの検証段階にすでにある場合、またはユーザーが1つ以上の候補となるセキュリティ findings が…かどうかを判断するよう明示的に求めた場合に使用します。