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 की और Skills

release
openai
Symphony रिलीज़ को बंप करके, उसे लैंड करके, मर्ज किए गए कमिट को टैग करके, और Burrito रिलीज़ वर्कफ़्लो को सत्यापित करके काटें। जब ऐसा करने के लिए कहा जाए…
signing-entitlements
openai
macOS ऐप्स के लिए हस्ताक्षर, अधिकार, कठोर रनटाइम और गेटकीपर समस्याओं का निरीक्षण करें। जब कोड हस्ताक्षर विफलताओं, लापता अधिकारों,… के निदान के लिए कहा जाए तो उपयोग करें।
building-ai-agent-on-cloudflare
openai
Cloudflare पर Agents SDK का उपयोग करके AI एजेंट बनाता है, जिसमें state प्रबंधन, real-time WebSockets, अनुसूचित कार्य, tool एकीकरण और चैट शामिल हैं…
epigraphdb-skill
openai
ऑन्टोलॉजी, साहित्य, एमआर, जीन-दवा और समर्थन-पथ साक्ष्य के लिए कॉम्पैक्ट EpiGraphDB API अनुरोध सबमिट करें। जब उपयोगकर्ता संक्षिप्त EpiGraphDB सारांश चाहता है तब उपयोग करें।
runtime-behavior-probe
openai
अस्थायी जांच स्क्रिप्ट, सत्यापन मैट्रिक्स, स्थिति नियंत्रण और निष्कर्ष-प्रथम रिपोर्ट के साथ runtime-behavior जांच की योजना बनाएं और निष्पादित करें। केवल तब उपयोग करें जब...
deep-security-scan
openai
उपयोग तब करें जब उपयोगकर्ता गहन, व्यापक, बहु-पास, या विचरण-न्यूनीकरण वाले रिपॉजिटरी-व्यापी या स्कोप्ड-पथ Codex Security स्कैन का अनुरोध करता है। कई स्वतंत्र बार-बार चलाएँ…
define-security-policy
openai
किसी रिपॉज़िटरी या कंपोनेंट के लिए SECURITY.md मार्गदर्शन को परिभाषित, समीक्षा, या अपडेट करें। उपयोग करें जब उपयोगकर्ता यह स्पष्ट करना चाहता है कि Codex Security को क्या समीक्षा करनी चाहिए, क्या बाहर…
validation
openai
इसका उपयोग तब करें जब Codex पहले से ही सुरक्षा स्कैन के सत्यापन चरण में हो या उपयोगकर्ता स्पष्ट रूप से यह निर्धारित करने के लिए कहे कि एक या अधिक उम्मीदवार सुरक्षा निष्कर्ष…