⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

v1.0.0

swiftui-macos

@kageroumado⭐ 12 stars

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.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐ 12 on GitHubGitHub ↗

Growing

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

SwiftUI macOS Skill

An agent skill for writing and reviewing SwiftUI code on macOS — with runtime-level understanding of observation, concurrency, view identity, and platform integration.

Built from building a production macOS browser with SwiftUI and from reading the Swift runtime source. Every pattern here was validated against actual framework behavior, not inferred from documentation. Designed for frontier models: skips basics, focuses on the non-obvious traps and deep mechanisms that even experienced developers get wrong.

What makes this different

Most SwiftUI guidance rewrites Apple's documentation or targets iOS beginners. This skill targets macOS, assumes the model already knows Swift and SwiftUI, and explains why things work the way they do — the kind of understanding you'd get from a Swift language contributor, not a tutorial author.

Runtime-level depth:

  • Observation internals — how shouldNotifyObservers overloads resolve via the type system (Equatable vs non-Equatable vs AnyObject), why _modify always notifies but set checks equality, Observations {} for reactive async streams
  • Scheduling cost hierarchy — actual allocation costs from reading the Swift runtime: assumeIsolated (~0B) vs MainActor.run (~0B) vs DispatchQueue.main.async (~64B) vs Task (~300-500B), and when each is correct
  • View identity graph — how structural identity creates _ConditionalContent, why .id() with unstable values destroys state, how Equatable conformance short-circuits body evaluation

Patterns from production:

  • Version counters to decouple observation from collection mutations
  • @ObservationIgnored discipline for internal caches and callbacks
  • Observations {} streams for reactive AppKit ↔ SwiftUI bridging
  • Custom Layout protocol over GeometryReader for arrangement logic
  • NSHostingView subclassing for embedding SwiftUI in AppKit hierarchies
  • Debounced SwiftData persistence and background @ModelActor operations

macOS-specific:

  • Multi-window state architecture with per-window vs global state separation
  • NSViewRepresentable + Equatable to prevent unnecessary updateNSView calls
  • AppKit bridging patterns: window chrome, drag and drop, system blur, menu bar extras
  • NSBackgroundActivityScheduler over polling Task loops for periodic work

Installing

Claude Code (plugin)

Add the repo as a plugin marketplace, then install:

/plugin marketplace add kageroumado/swiftui-macos-skill
/plugin install swiftui-macos

Claude Code (manual)

Clone the repo, then copy the skill folder to the appropriate scope:

User-wide (recommended — available across all projects):

git clone https://github.com/kageroumado/swiftui-macos-skill.git
mkdir -p ~/.claude/skills
cp -r swiftui-macos-skill/skills/swiftui-macos ~/.claude/skills/

Per-project (shared with collaborators via version control):

git clone https://github.com/kageroumado/swiftui-macos-skill.git
mkdir -p your-project/.claude/skills
cp -r swiftui-macos-skill/skills/swiftui-macos your-project/.claude/skills/

Claude.ai

  1. Download or clone this repo
  2. Zip the skills/swiftui-macos folder
  3. Upload via Settings > Capabilities > Skills

Usage

In Claude Code:

/swiftui-macos

In Codex:

$swiftui-macos

The skill works for both writing and reviewing. Examples:

/swiftui-macos Review observation discipline in the sidebar views
/swiftui-macos I'm building a multi-window document editor — help me architect the state
/swiftui-macos Focus on concurrency patterns in the networking layer
/swiftui-macos Help me bridge this NSCollectionView into SwiftUI

References

FileCoverage
references/observation.mdObservation tracking: state capture, _modify vs set, version counters, scope narrowing, Observations {} streams, computed property propagation
references/concurrency.mdScheduling cost hierarchy, actor isolation, SE-0461/0469/0420/0471/0472, AsyncStream bridging, @concurrent, sending
references/views.mdView decomposition, .task(id:), preference keys, custom Layout, animation, navigation
references/data.mdManager pattern, @Bindable, SwiftData, debounced saving, @ModelActor, environment injection
references/platform.mdNSViewRepresentable, NSHostingView, multi-window state, openWindow, AppKit bridging, macOS scenes
references/performance.mdView identity graph, .id() dangers, Equatable views, @State for gestures, Canvas, TimelineView, drawingGroup()
references/api.mdDeprecated API replacements, Swift modernisms, @Previewable, @Entry, Apple open-source Swift packages
references/accessibility.mdVoiceOver, Dynamic Type, keyboard navigation, accessibility rotors, @AccessibilityFocusState, drag-and-drop a11y, testing

Contributing

Contributions welcome. Every rule should earn its token cost — if a capable model already knows it, it doesn't belong here. Focus on things that are non-obvious, frequently wrong, or require runtime-level understanding to get right.

License

MIT License. See LICENSE.

// HOW IT'S BUILT

KEY FILES

skills/swiftui-macos/SKILL.mdREADME.md

// REPO STATS

12 stars