swiftui-macos
/swiftui-macos
Expert SwiftUI guidance for macOS apps — covers writing and reviewing code with runtime-level understanding of observation, concurrency, performance, and platform integration. Use when user asks to "build a SwiftUI view", "review my SwiftUI code", "fix observation issues", "bridge AppKit", "architect state management", "debug view updates", or works on any macOS SwiftUI project — building features, reviewing existing code, debugging view updates or performance, fixing concurrency issues, architecting state management, bridging AppKit, or making design decisions. Do NOT use for iOS/iPadOS-only
- Author
- kageroumado ↗
- Repository
- swiftui-macos-skill ↗
- Licence
- MIT
- Last repository change
- 17.10.2026
Assessment and security
- Files in this package
- 10
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 17.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Expert SwiftUI guidance for macOS apps — covers writing and reviewing code with runtime-level understanding of observation, concurrency, performance, and platform integration. Use when user asks to "build a SwiftUI view", "review my SwiftUI code", "fix observation issues", "bridge AppKit", "architect state management", "debug view updates", or works on any macOS SwiftUI project — building features, reviewing existing code, debugging view updates or performance, fixing concurrency issues, architecting state management, bridging AppKit, or making design decisions. Do NOT use for iOS/iPadOS-only
Triggers from the description
Original author description
Expert SwiftUI guidance for macOS apps — covers writing and reviewing code with runtime-level understanding of observation, concurrency, performance, and platform integration. Use when user asks to "build a SwiftUI view", "review my SwiftUI code", "fix observation issues", "bridge AppKit", "architect state management", "debug view updates", or works on any macOS SwiftUI project — building features, reviewing existing code, debugging view updates or performance, fixing concurrency issues, architecting state management, bridging AppKit, or making design decisions. Do NOT use for iOS/iPadOS-only
How it works
- How to Use
- References
- Principles
- Examples
- Review Output
SKILL.md preview
---
name: swiftui-macos
description: Expert SwiftUI guidance for macOS apps — covers writing and reviewing code with runtime-level understanding of observation, concurrency, performance, and platform integration. Use when user asks to "build a SwiftUI view", "review my SwiftUI code", "fix observation issues", "bridge AppKit", "architect state management", "debug view updates", or works on any macOS SwiftUI project — building features, reviewing existing code, debugging view updates or performance, fixing concurrency issues, architecting state management, bridging AppKit, or making design decisions. Do NOT use for iOS/iPadOS-only SwiftUI, UIKit bridging, or basic Swift language questions. Focuses on non-obvious traps and deep patterns, not basics.
license: MIT
compatibility: Requires macOS 26+ targeting and Swift 6.2 with strict concurrency. Best suited for Claude Code and environments with filesystem access to load references on demand.
metadata:
author: kageroumado
version: 1.0.0
---
Guide SwiftUI development for macOS apps. Whether writing new code or reviewing existing code, apply deep understanding of SwiftUI's runtime behavior — how the observation registrar dispatches, how the attribute graph diffs view trees, how actor isolation interacts with view lifecycles.
## How to Use
**Writing code**: Load relevant references before implementation. The patterns here prevent bugs that are expensive to find later — observation cascades, identity thrashing, concurrency overhead. When making architecture decisions (state ownership, view decomposition, AppKit bridging), consult the relevant reference for tradeoffs.
**Reviewing code**: Check each reference area systematically. Focus on genuine problems — observation inefficiencies, deprecated API, accessibility gaps, concurrency anti-patterns. Don't flag obvious issues or invent problems.
**Partial scope**: Load only what the task needs. Not every change requires all eight references.
## References
| Reference | Load when |
|---|---|
| `references/observation.md` | `@Observable`, `@State`, `ForEach`, data-driven views, `Observations {}` streams |
| `references/concurrency.md` | `Task`, `async`/`await`, actors, `DispatchQueue`, `AsyncStream`, scheduling decisions |
| `references/performance.md` | View composition, animations, gestures, large collections, `Canvas`, `TimelineView` |
| `references/views.md` | View decomposition, navigation, `.task(id:)`, preference keys, custom `Layout` |
| `references/data.md` | State architecture, SwiftData, environment injection, bindings, persistence |
| `references/platform.md` | `NSViewRepresentable`, `NSHostingView`, multi-window state, AppKit bridging |
| `references/scenes.md` | Scene and window API catalog — `UtilityWindow`, `MenuBarExtra` styles, `Settings`, window sizing/chrome, `Commands`, file dialogs, `Table`/`PasteButton`. Load to check what exists and its availability. |
| `references/api.md` | API choice, deprecated patterns, modern Swift/SwiftUI idioms |
| `references/accessibility.md` | VoiceOver, keyboard navigation, Dynamic Type, Reduce Motion |
## Principles
- Target **macOS 26+**, Swift 6.2 with strict concurrency and `@MainActor` default isolation.
- Check whether the project enables **`NonisolatedNonsendingByDefault`** (SE-0461) — this changes where `nonisolated` async functions execute. See `references/concurrency.md`.
- Prefer SwiftUI-native solutions. Use AppKit (`NSViewRepresentable`, `NSHostingView`, `NSWindow`) only when SwiftUI has no equivalent.
- **Understand the mechanism.** When suggesting a pattern, know *why* it works — what the observation registrar does, what the attribute graph diffing costs, what `_modify` vs `set` means for notification. Rules without understanding produce cargo-culted code.
- Do not introduce third-party frameworks without asking. Apple's open-source Swift packages (`swift-collections`, `swift-algorithms`, `swift-async-algorithms`) are exceptions — prefer them over reimplementing non-trivial data structures or algorithms. See `references/api.md`.
## Examples
**User**: "Review observation patterns in these sidebar views"
→ Load `references/observation.md`. Check each file for: state capture in ForEach, non-Equatable types on observed properties, missing `@ObservationIgnored` on caches, `_modify` vs `set` notification waste.
**User**: "I need to embed an NSCollectionView in SwiftUI"
→ Load `references/platform.md`. Apply `NSViewRepresentable` lifecycle, `Equatable` conformance for update gating, `Coordinator` for delegates.
**User**: "This view is re-rendering too much, help me debug it"
→ Load `references/performance.md` and `references/observation.md`. Check view identity (structural vs explicit), observation scope (are unrelated properties tracked in the same body?), `@State` vs `@Observable` for gesture-driven values.
## Review Output
Organize findings by file. For each issue:
1. File and relevant line(s).
2. The pattern being violated and *why it matters* at the runtime level.
3. Brief before/after code fix.
Skip clean files. End with a prioritized summary of the most impactful changes.
Files in this package (10)
- SKILL.md 5 KB
- references/accessibility.md 6 KB
- references/api.md 8 KB
- references/concurrency.md 14 KB
- references/data.md 5 KB
- references/observation.md 12 KB
- references/performance.md 9 KB
- references/platform.md 7 KB
- references/scenes.md 6 KB
- references/views.md 7 KB
Versions
The database has no other skills named swiftui-macos.
Database snapshot: 13.11.2026 · package version 93982c6c397d (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90desktop-swiftui
Use when the user asks about SwiftUI for macOS, SwiftUI desktop patterns, AppKit bridging, SwiftUI app lifecycle, or SwiftUI multiplatform apps. Do NOT use for: AppKit-only (desktop-appkit), or iOS SwiftUI (mobile skill). - 100appkit-swiftui-bridge
Expert guidance for hybrid AppKit-SwiftUI development. Covers NSViewRepresentable, hosting controllers, and state management between frameworks. Use when bridging AppKit and SwiftUI. - 100swiftui-expert-skill
Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, macOS-specific APIs, and iOS 26+ Liquid Glass adoption. Use when building new SwiftUI features, refactoring existing views, reviewing code quality, or adopting… - 100macos-apps
Build professional native macOS apps in Swift with SwiftUI and AppKit. Full lifecycle - build, debug, test, optimize, ship. CLI-only, no Xcode. Use when asked to: create macOS apps, build Swift apps, develop SwiftUI interfaces, fix macOS app issues, add macOS app features, or… - 85swiftui-expert-skill
Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, macOS-specific APIs, and iOS 26+ Liquid Glass adoption. Use when building new SwiftUI features, refactoring existing views, reviewing code quality, or adopting… - 100swiftui-patterns
SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices. Use when building or reviewing SwiftUI views, @Observable state, navigation, or render performance.