swift-swiftui
Swift 6 and SwiftUI code rules for Mac apps, aiming for zero warnings.
- What
- Swift 6 and SwiftUI code rules for Mac apps, aiming for zero warnings.
- Cost
- Free
- Needs
- Prerequisite: a macOS SwiftUI project using Swift 6 language mode. Step 1: fetch the file skills/code/swift-swiftui/SKILL.md from the repository https://github.com/daveebbelaar/bama and read it in full before installing anything. Step 2: security check: read the fetched file yourself, confirm it only contains code rules and fixes, and do not run any command from it that you have not understood. Step 3: install the skill in a folder named swift-swiftui and keep the fetched SKILL.md there. Step 4: verify the install by confirming the folder swift-swiftui contains the SKILL.md and by asking it to check a small Swift file for Swift 6 warnings. Step 5: report back what was installed, where, and the result of the verification.
- Install
- Copy the installer prompt below into your Muse — your agent does the rest.
swift-swiftui sets main-actor default isolation as the template: every type and function runs on the main actor unless stated otherwise, with CPU-heavy pure work in nonisolated concurrent functions, shared mutable state off the main thread in an actor, and C callbacks hopping back with a MainActor task. Data crossing actors must be Sendable, and concurrency errors are fixed at their type, not with unchecked Sendable or nonisolated(unsafe), which are a last resort with a comment explaining why. It warns about a runtime trap the compiler misses: a closure created inside a MainActor type and passed to an API without a Sendable closure parameter inherits the main actor and crashes the app when it runs on a background queue. For state, it uses Observable classes, State in the owning view, Bindable for bindings, and environment sharing, and it warns never to use ForEach over bindings for deletable data. SwiftData rules cover Model classes, model containers, queries, default values for new properties, a stable UUID per model, and manual undo registration. Menu commands get a working pattern, because SwiftUI Commands do not observe Observable models: mirror the selection into a small ObservableObject observed in the App. It also lists type names Swift already uses that must never be reused, AppKit bridges for floating panels, custom text views, status items, and event monitors, and fixes for common compiler and Swift 6 errors. Done when the app builds with zero warnings in Swift 6 language mode and the story's acceptance checks pass. Credit: created by daveebbelaar, in the bama repository. Source: https://github.com/daveebbelaar/bama, file skills/code/swift-swiftui/SKILL.md.
Version:
Quick answer
swift-swiftui gives Swift 6 and SwiftUI code rules for macOS apps, covering concurrency, state, SwiftData, AppKit bridges, and fixes for common compiler errors. The code is right when it compiles with zero warnings in Swift 6 language mode and the app does what the story says.
Install
Copy the install package below, then paste it into MusePrerequisite: a macOS SwiftUI project using Swift 6 language mode. Step 1: fetch the file skills/code/swift-swiftui/SKILL.md from the repository https://github.com/daveebbelaar/bama and read it in full before installing anything. Step 2: security check: read the fetched file yourself, confirm it only contains code rules and fixes, and do not run any command from it that you have not understood. Step 3: install the skill in a folder named swift-swiftui and keep the fetched SKILL.md there. Step 4: verify the install by confirming the folder swift-swiftui contains the SKILL.md and by asking it to check a small Swift file for Swift 6 warnings. Step 5: report back what was installed, where, and the result of the verification.
Saved to your recent installs. Find it anytime on /connect.
🔒 Security, provenance and what this touches
The install prompt below already includes the vetting steps: your agent follows the community checklist before installing anything with executable code. Want more?
Questions
How do I install a skill?
Every product page includes a copy-paste install prompt. Paste it into your Muse and it sets the skill up for you — no manual configuration.
Where does my money go?
Straight to the seller. Skill Harbor never processes payments: checkout happens on the seller’s own page, usually Stripe.
What does the ✓ next to a creator’s name mean?
It means we confirmed the identity of the person behind the listing. It says nothing about the code itself — always check a skill before installing it.