macos-app-patterns

Scaffolds complete macOS SwiftUI features from canonical recipes and real shipping app examples.

2|1|Updated Jun 7, 2026
One-click install
npx skills add https://github.com/yigitkonur/plugin-swiftui --skill macos-app-patterns-yigitkonur
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: macos-app-patterns
Source: https://github.com/yigitkonur/plugin-swiftui/tree/main/plugins/swiftui/skills/macos-app-patterns
Command: npx skills add https://github.com/yigitkonur/plugin-swiftui --skill macos-app-patterns-yigitkonur

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building a whole macOS feature — a menu-bar app, a Settings window, an AppKit bridge — from memory leads to stale APIs and broken wiring. This Skill pulls canonical recipe templates plus real, compilable code examples from 1,857 shipping open-source macOS apps so features are grounded in how production apps actually implement them. ## Core Features & Use Cases - Recipe-Based Scaffolding: Twelve whole-feature recipes (menubar-app, settings-screen, master-detail, nsview-bridge, command-palette, and more) each providing a template skeleton, the APIs it composes, and ranked real examples. - Real Code Lookup: The swiftui-ctx CLI serves recipe templates, then opens the actual example source via swiftui-ctx file <id> --smart, with GitHub permalinks pinned to commit SHAs. - API Verification: After scaffolding, any individual API's current argument shape can be confirmed with swiftui-ctx lookup <api>. - Use Case: You need to build a menu-bar app with a Settings window. Run the menubar-app recipe to get the MenuBarExtra + Settings template, then read a real shipping app's implementation before adapting it. ## Quick Start Ask the agent to scaffold a macOS menu-bar app with a settings window using the macos-app-patterns recipes.

Frequently Asked Questions about macos-app-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a macOS menu-bar app in SwiftUI?

Use the menubar-app recipe, which composes MenuBarExtra, menuBarExtraStyle, and Settings into a status-bar app shell with a Settings window. Run swiftui-ctx recipe menubar-app for the template, then open a real example with swiftui-ctx file <id> --smart.

How do I wrap an AppKit NSView in SwiftUI?

Use the nsview-bridge recipe, which provides the NSViewRepresentable pattern with Coordinator, makeNSView, and updateNSView. Read the example with --full since bridges are best understood as a whole rather than as fragments.

What macOS SwiftUI patterns does this skill cover?

Twelve recipes: menubar-app, settings-screen, settings-form, master-detail, window-scene, observable-model, nsview-bridge, charts-bar, searchable-list, command-palette, draggable-reorder, and cached-async-image. Each lists the APIs it composes in references/recipes.md.

When should I use recipes instead of single-API lookup?

Use recipes when building a whole feature spanning multiple APIs, such as a Settings window or AppKit bridge. For a single API question use swiftui-examples, and for deprecated code cleanup use swiftui-modernize.

What happens if the swiftui-ctx catalog is missing?

The CLI exits with code 5 when no catalog is found. The skill instructs the agent to stop and tell the user rather than fabricate patterns, and exit code 3 (bad recipe name) is resolved by listing recipes.