swift-architecture-macos
CommunityMaster production-ready macOS app architecture patterns.
System Documentation
What problem does it solve?
macOS developers building apps with SwiftUI and AppKit often struggle with selecting appropriate architecture patterns, managing app lifecycle hooks, handling multi-window state, implementing dependency injection, and bridging between SwiftUI and AppKit components without introducing bugs or technical debt.
Core Features & Use Cases
- @Observable Architecture Patterns: Production-ready MV and MVVM implementations using the modern @Observable macro, with guidance on state ownership and AppKit automatic recomposition.
- NSDocument-Based Workflows: Complete patterns for document-based apps, including NSDocument subclassing, window controller management, autosave, and menu validation.
- Multi-Window State Management: Strategies for per-window state, window restoration, and avoiding shared state pitfalls across multiple windows.
- SwiftUI-AppKit Bridging: Recipes for integrating AppKit views in SwiftUI via NSViewRepresentable and embedding SwiftUI in AppKit via NSHostingController.
- Use Case: Build a professional document editing app with multiple inspector windows, proper undo/redo support, and testable dependency injection for analytics and printing services.
Quick Start
Use the swift-architecture-macos skill to implement a multi-window document-based macOS app with @Observable view models, NSDocument persistence, and environment-based dependency injection.
Dependency Matrix
Required Modules
None requiredComponents
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: swift-architecture-macos Download link: https://github.com/LaughingJackalope/macos-skills/archive/main.zip#swift-architecture-macos Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 537,000+ vetted skills library on demand.