macos-patterns

Implement native macOS app patterns with SwiftUI menus and window management.

32|10|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/moasq/nanowave --skill macos-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: macos-patterns
Source: https://github.com/moasq/nanowave/tree/main/internal/orchestration/skills/always-macos/macos-patterns
Command: npx skills add https://github.com/moasq/nanowave --skill macos-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides essential patterns and best practices for building native macOS applications, addressing complexities in window management, menu bar integration, keyboard shortcuts, and platform-specific features.

Core Features & Use Cases

  • Window Management: Implement WindowGroup, Window, and DocumentGroup for flexible app structures.
  • Menu Bar Customization: Utilize CommandMenu and FocusedValue for dynamic menu items and actions.
  • Input Handling: Define keyboard shortcuts and manage drag-and-drop operations.
  • Platform Features: Integrate Settings panes, MenuBarExtra apps, and understand App Sandbox requirements.
  • Use Case: Develop a macOS application that requires custom menu bar items, handles file drag-and-drop, and presents a user-friendly settings interface.

Quick Start

Use the macos-patterns skill to implement a custom menu bar item that saves the currently focused document.

Frequently Asked Questions about macos-patterns

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

FAQPage Schema
How do I add a custom menu bar item in a SwiftUI macOS app?

Add a custom menu bar item in SwiftUI macOS apps by utilizing `CommandMenu` for static actions or `MenuBarExtra` for utility interfaces, binding dynamic state through `FocusedValue` to interact with the currently focused window.

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

Manage multiple windows in macOS applications using `WindowGroup` for standard instances, `Window` for unique single instances, and `DocumentGroup` for file-based architectures to handle flexible app structures.

How do I implement a Settings interface in SwiftUI for macOS?

Implement a Settings interface in SwiftUI for macOS using the `Settings` scene to present a user-friendly preferences pane, allowing users to configure app behaviors natively.

How does drag-and-drop functionality work in macOS app development?

Drag-and-drop functionality in macOS app development works by adopting transfer protocols to manage drop operations, allowing your application to handle file inputs and data interactions seamlessly.

Do I need App Sandbox entitlements for native macOS app development?

App Sandbox entitlements are required for native macOS app development to restrict access to system resources, ensuring secure distribution and protecting user data.

How do I assign keyboard shortcuts to menu actions in a SwiftUI macOS app?

Assign keyboard shortcuts to menu actions in a SwiftUI macOS app by defining gestures on commands, enabling quick access to functionalities within your `CommandMenu` structures.