macos-app-structure

Generate native macOS app templates with SwiftUI scenes and AppKit integration.

1|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/makgunay/claude-swift-skills --skill macos-app-structure
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: macos-app-structure
Source: https://github.com/makgunay/claude-swift-skills/tree/main/macos-app-structure
Command: npx skills add https://github.com/makgunay/claude-swift-skills --skill macos-app-structure

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexities of structuring native macOS applications, preventing common LLM errors related to iOS-centric patterns and ensuring correct implementation of macOS-specific features like menu bar apps and multi-window management.

Core Features & Use Cases

  • App Scaffolding: Provides the correct @main App struct and scene configurations (WindowGroup, MenuBarExtra, Settings).
  • Lifecycle Management: Integrates NSApplicationDelegateAdaptor for AppKit hooks.
  • Window Management: Demonstrates multi-window patterns and NavigationSplitView.
  • Configuration: Guides on Info.plist entries (e.g., LSUIElement) and entitlements.
  • Use Case: When starting a new macOS project, use this Skill to ensure the foundational structure is correct, avoiding costly refactoring later.

Quick Start

Use the macos-app-structure skill to generate a basic macOS application template with a main window and a settings window.

Frequently Asked Questions about macos-app-structure

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

FAQPage Schema
How do I structure a native macOS app using SwiftUI without defaulting to iOS patterns?

Structure native macOS apps by adopting the `@main` App protocol and macOS-specific scenes like `WindowGroup` and `MenuBarExtra`, which enforces correct architectural conventions and prevents common iOS-centric LLM errors.

How do I create a menu bar app in SwiftUI?

Create a menu bar app in SwiftUI by configuring the `MenuBarExtra` scene type within your `@main` App struct and setting the `LSUIElement` key in your Info.plist to manage window visibility.

Does SwiftUI for macOS support AppKit integration for lifecycle management?

Yes, SwiftUI supports AppKit integration for lifecycle management by using `NSApplicationDelegateAdaptor` within your App struct to inject AppKit hooks and handle native macOS application events.

What is the best way to manage multiple windows in a SwiftUI macOS application?

Manage multiple windows in a SwiftUI macOS application by configuring `WindowGroup` and `Settings` scenes alongside `NavigationSplitView` to ensure proper multi-window management and native navigation structures.

Why does my SwiftUI macOS app structure fail LLM code generation checks?

Your SwiftUI macOS app structure fails because LLMs often default to iOS-centric patterns. Enforcing macOS-specific conventions like `MenuBarExtra` and proper `Info.plist` configurations corrects these structural generation errors.