swiftui-patterns

Guide macOS SwiftUI desktop app architecture with native windowing and navigation patterns.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/oliverames/ames-claude --skill swiftui-patterns-oliverames
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-patterns
Source: https://github.com/oliverames/ames-claude/tree/main/plugins/build-macos-apps-codex/skills/swiftui-patterns
Command: npx skills add https://github.com/oliverames/ames-claude --skill swiftui-patterns-oliverames

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

macOS apps frequently require careful orchestration of windows, menus, toolbars, split views, and inspectors. This skill consolidates best-practice patterns to accelerate design and ensure native, accessible desktop experiences.

Core Features & Use Cases

  • Guides scene selection: WindowGroup, Window, Settings, MenuBarExtra, DocumentGroup.
  • Promotes desktop-first patterns: NavigationSplitView, sidebars, inspectors, keyboard shortcuts.
  • Outlines recommended project structure and state ownership.
  • Provides concrete use cases and quick-start guidance.

Quick Start

Create a new macOS SwiftUI project and implement a windowed desktop layout using a primary WindowGroup, a Sidebar with NavigationSplitView, and a separate Settings scene.

Frequently Asked Questions about swiftui-patterns

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

FAQPage Schema
What's the best way to structure a macOS SwiftUI desktop app with split views and inspectors?

The best way to structure a macOS SwiftUI desktop app is by using desktop-first patterns like NavigationSplitView for sidebars, separate scenes for Settings, and dedicated inspector layouts to ensure a native windowing experience.

How do I choose the right SwiftUI scene type for my macOS desktop app?

Choose the right SwiftUI scene type by matching your app's needs: WindowGroup for standard windows, Window for single instances, Settings for preferences, MenuBarExtra for menu bar apps, and DocumentGroup for document-based apps.

When should I use AppKit interop in a SwiftUI macOS app?

Use AppKit interop in a SwiftUI macOS app when you need desktop-specific components or behaviors that SwiftUI does not natively cover, ensuring you still maintain recommended state ownership and native accessibility patterns.

How do I add menus and keyboard shortcuts to a macOS SwiftUI app?

Add menus and keyboard shortcuts to a macOS SwiftUI app by applying desktop-first patterns within your scene definitions, utilizing native SwiftUI commands and toolbar components to orchestrate standard desktop interactions.

Does this SwiftUI macOS pattern guidance cover state ownership and navigation?

Yes, this SwiftUI macOS pattern guidance covers state ownership and navigation by enforcing native patterns for windowing and data flow, helping you correctly manage state across sidebars, split views, and inspector layouts.