macos-patterns

Provide native macOS AppKit and SwiftUI implementation patterns for menu bar apps and window management.

641|16|Updated May 27, 2026
One-click install
npx skills add https://github.com/fayazara/macos-app-skills --skill macos-patterns-fayazara
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: macos-patterns
Source: https://github.com/fayazara/macos-app-skills/tree/main/macos-patterns
Command: npx skills add https://github.com/fayazara/macos-app-skills --skill macos-patterns-fayazara

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill prevents AI agents from applying incorrect web-based development patterns to native macOS applications, ensuring code adheres to Apple's specific architectural requirements.

Core Features & Use Cases

  • Native API Guidance: Provides correct implementations for menu bar apps, floating panels, window levels, and system-wide keyboard shortcuts.
  • Platform-Specific Logic: Offers authoritative patterns for activation policies, screen geometry, file pickers, and clipboard management.
  • Use Case: When building a menu bar utility, use this skill to correctly implement an NSStatusItem with a popover instead of attempting to use web-style windowing, ensuring the app behaves like a first-class macOS citizen.

Quick Start

Use the macos-patterns skill to generate the correct implementation for a global keyboard shortcut using the Carbon API.

Frequently Asked Questions about macos-patterns

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

FAQPage Schema
How do I create a menu bar app in SwiftUI without using web-style windowing?

To create a native macOS menu bar app, use an NSStatusItem with a popover instead of web-style windowing. This ensures the utility behaves like a first-class macOS citizen by adhering to AppKit's specific activation policies and window levels.

What is the correct way to implement system-wide keyboard shortcuts on macOS?

The correct way to implement system-wide keyboard shortcuts is by using the Carbon API. This ensures technical compliance with macOS-specific APIs for monitoring global events rather than attempting incompatible web-based input approaches.

How do I manage window levels and activation policies for floating panels in native macOS apps?

Manage floating panels by applying Apple's specific architectural requirements for window levels and activation policies. Native API guidance provides authoritative patterns to ensure AppKit components behave correctly within the macOS window management system.

Does this macOS development skill provide patterns for screen geometry and clipboard management?

Yes, it provides platform-specific logic and authoritative patterns for screen geometry, file pickers, and clipboard management. It ensures technical compliance with macOS-specific APIs for these OS-level integrations.

Why does my AI agent generate incorrect web-based patterns for native macOS development?

AI agents generate incorrect web-based patterns because they lack native macOS context. This skill replaces those incompatible approaches with authoritative reference patterns for AppKit and SwiftUI, ensuring code adheres to Apple's architectural requirements.