Help us improve
Share bugs, ideas, or general feedback.
From Build Swift Apps
Guides building macOS SwiftUI apps with proper scene architecture, state ownership, and desktop UI patterns.
npx claudepluginhub xopoko/build-swift-apps --plugin build-swift-appsHow this skill is triggered — by the user, by Claude, or both
Slash command
/build-swift-apps:macos-swiftui-architectThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use for macOS SwiftUI scene/component choices. Use `macos-runtime-debugger` for build/run, `macos-view-architect` for large-file extraction, and `macos-appkit-bridge` for AppKit-only behavior.
Refactors macOS SwiftUI views/scenes into small stable subviews, explicit scene roots, command/toolbar ownership, scene-aware state, and narrow AppKit bridges.
Provides Apple Human Interface Guidelines for Mac apps, covering menu bar, keyboard shortcuts, and window management with SwiftUI and AppKit examples.
Provides best practices and examples for SwiftUI views, components, navigation hierarchies, custom modifiers, responsive layouts with stacks/grids, and state management (@State/@Binding). Use for creating/refactoring iOS UI.
Share bugs, ideas, or general feedback.
Use for macOS SwiftUI scene/component choices. Use macos-runtime-debugger for build/run, macos-view-architect for large-file extraction, and macos-appkit-bridge for AppKit-only behavior.
references/components-index.md.WindowGroup, Window, Settings, MenuBarExtra, or DocumentGroup.@NSApplicationDelegateAdaptor, .regular activation policy, and activate on launch.WindowGroup(..., id:) for a primary launched window; Window(...) for auxiliary/on-demand singleton windows.ContentView.@SceneStorage for per-window ephemeral state and @AppStorage for preferences.NavigationSplitView over iOS-style push navigation when persistent structure helps.macos-appkit-bridge for responder chain, panels, low-level windows, or text system control.Native source-list rows: one leading icon, one title, and optional secondary detail line. Put dense metadata/cards in detail or inspector panes, not every sidebar row.
List(selection: $selection) {
ForEach(items) { item in
HStack(spacing: 10) {
Image(systemName: item.systemImage).frame(width: 16).foregroundStyle(.secondary)
VStack(alignment: .leading, spacing: 2) {
Text(item.title).lineLimit(1)
if let detail = item.detail {
Text(detail).font(.caption).foregroundStyle(.secondary).lineLimit(1)
}
}
}
.tag(item.id)
}
}
.listStyle(.sidebar)
Let NavigationSplitView sidebars use native materials. Apply custom surfaces only to detail cards or inspector sections.
| Scenario | Pattern |
|---|---|
| Local control state | @State |
| Child mutates parent value | @Binding |
Root-owned @Observable | @State |
| Injected observable/service | property or @Environment(Type.self) |
| Window selection/expansion | @SceneStorage when practical |
| Durable preference | @AppStorage |
| Legacy observable | @StateObject owner, @ObservedObject injected |
One app-sized ContentView; touch-first flows without desktop affordances; actions only behind gestures; menu bar labels over 30 characters; settings as a main-window destination; card sidebars inside .sidebar lists unless requested; opaque split-pane backgrounds by default; AppKit bridges before SwiftUI scenes/commands/windows have been tried.
Pick scene type/state ownership, place actions in content/toolbar/commands/inspector/settings, choose layout, split files by responsibility, add keyboard/menu/toolbar exposure, then build/run and check multiwindow behavior, settings entry points, and selection stability.
references/components-index.mdreferences/windowing.mdreferences/settings.mdreferences/commands-menus.mdreferences/split-inspectors.mdreferences/menu-bar-extra.md