build-macos-swiftui

Write and review production macOS SwiftUI code against a catalog of 52 ranked failure modes.

2|1|Updated Jun 7, 2026
One-click install
npx skills add https://github.com/yigitkonur/plugin-swiftui --skill build-macos-swiftui-yigitkonur
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-macos-swiftui
Source: https://github.com/yigitkonur/plugin-swiftui/tree/main/plugins/swiftui/skills/build-macos-swiftui
Command: npx skills add https://github.com/yigitkonur/plugin-swiftui --skill build-macos-swiftui-yigitkonur

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? AI coding agents generate SwiftUI code that compiles but is stale, deprecated, or hallucinated — wrong navigation containers, invented Liquid Glass modifiers, missing macOS availability gates, and iOS-only idioms on a Mac target. This Skill grounds macOS SwiftUI authoring in a verified catalog of current APIs and the 52 most common AI mistakes. ## Core Features & Use Cases - 52-rule failure catalog: Ranked table of critical/high/medium mistakes (NavigationView, @Observable ownership, SwiftData relationships, concurrency, sandboxing) each mapped to a deep reference doc. - API currency ground truth: references/api-currency.md records confirmed vs deprecated vs hallucinated APIs with macOS availability floors, including a Liquid Glass hallucination blacklist. - Write-time verification loop: A 67-rule grep lint script, a compile-on-edit hook, and a reviewer agent let the model claim only the verification rung it actually reached. - Use Case: Ask the agent to add a settings window and menu-bar extra to a macOS app; it emits Settings {} and MenuBarExtra scenes with correct #available(macOS 26, *) gating instead of AppKit hacks. ## Quick Start Ask the agent to build or revise a macOS SwiftUI feature, such as adding a NavigationSplitView sidebar with a settings scene, and have it lint the result before finishing.

Frequently Asked Questions about build-macos-swiftui

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

FAQPage Schema
How do I write correct macOS SwiftUI code with an AI agent?

Use this Skill's catalog of 52 ranked failure modes and its api-currency reference so the agent emits current idioms like NavigationSplitView, @Observable, and two-parameter onChange. Run the bundled lint script before accepting generated code.

What is the correct Liquid Glass API in SwiftUI on macOS 26?

The real APIs are glassEffect(_:in:), GlassEffectContainer, and .buttonStyle(.glass/.glassProminent), all gated behind #available(macOS 26, *). Invented names like .glassBackground() or .liquidGlass() do not exist and are hard-failed by the lint.

Does this Skill work for iOS or iPadOS SwiftUI code?

No. The Skill is strictly macOS-scoped and instructs the agent to stop and say so for iOS, iPadOS, visionOS, or watchOS requests. iOS idioms appear only as explicit wrong-answer contrasts.

Why does my SwiftUI code compile but behave wrong on macOS?

Common causes include @ObservedObject creating state it does not own, SwiftData let relationships that crash at runtime, and missing updateNSView in representables. The catalog maps each symptom to its correct macOS rule and severity.

When should I use the audit skills instead of this build skill?

Use this Skill for write-time authoring and quick review of new or revised code. For a deep whole-codebase audit of a finished project, use the audit-macos-swiftui-full orchestrator with the 334-rule audit engine.