
Swift swiftui
Swift 6 and SwiftUI rules for macOS apps: concurrency, state, SwiftData and fixes
Swift swiftui is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 2K
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Swift swiftui
This skill gives an agent a set of coding rules for building macOS apps in Swift 6 language mode with SwiftUI. It covers how to split work between the main actor, actors and background functions, how to keep data Sendable, and how to manage observable state, menus and SwiftData models with stable identifiers and undo handling.
The guidance also covers AppKit bridges for cases SwiftUI does not handle well, such as non-activating floating panels, custom text views, status items and event monitors. A table maps common compiler errors such as unresolved names after adding a file, actor isolation mismatches and type-checking timeouts to their usual fixes, and a second table lists Swift 6 migration errors.
The skill points to other skills for visual design and system integrations, and to reference files in the same repository for copyable view code. It expects a Swift project targeting macOS and uses the Swift package manager for clean builds.
When your agent uses it
Swift 6 and SwiftUI code rules for macOS apps, including concurrency, state, SwiftData, AppKit bridges, and fixes for common compiler errors. Use when writing, reviewing, or debugging Swift code in a Mac app, or on concurrency, Sendable, or "not in scope" errors.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (7 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the bama plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add daveebbelaar/bama
/plugin install bama@bamaOr copy only this skill to ~/.claude/skills/swift-swiftui:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/swift-swiftui &&
cp -R "$tmp/skills/code/swift-swiftui" ~/.claude/skills/swift-swiftui &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/swift-swiftui inside it instead.
Copy the skill folder to ~/.agents/skills/swift-swiftui to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/swift-swiftui &&
cp -R "$tmp/skills/code/swift-swiftui" ~/.agents/skills/swift-swiftui &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/swift-swiftui inside it instead.
Copy the skill folder to ~/.cursor/skills/swift-swiftui to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/swift-swiftui &&
cp -R "$tmp/skills/code/swift-swiftui" ~/.cursor/skills/swift-swiftui &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/swift-swiftui inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/daveebbelaar/bama.git --path skills/code/swift-swiftuiOr copy the folder to ~/.gemini/skills/swift-swiftui yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/swift-swiftui:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/swift-swiftui &&
cp -R "$tmp/skills/code/swift-swiftui" ~/.copilot/skills/swift-swiftui &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/swift-swiftui inside it instead.
Get the folder:
git clone --depth 1 https://github.com/daveebbelaar/bama.gitThen copy bama/skills/code/swift-swiftui into your agent's skills folder as swift-swiftui. Agents that support SKILL.md read one folder per skill.
What it does
- Swift 6 concurrency rules
- Guidance on main-actor defaults, actors, Sendable types and when to use detached tasks.
- SwiftUI state management
- Patterns for observable models, bindings, environment sharing and safe ForEach usage.
- SwiftData model conventions
- Defaults for new properties, stable UUIDs, store location and undo registration.
- Menu command handling
- A workaround for SwiftUI commands that do not refresh from observable models, plus keyboard shortcut pitfalls.
- AppKit bridge patterns
- Use cases for NSPanel, NSTextView, NSStatusItem and event monitors inside SwiftUI apps.
- Compiler error fixes
- A lookup table of common Swift and SwiftUI compiler errors with suggested fixes.
Good for
- Review my SwiftUI macOS app for Swift 6 concurrency issues
- Fix a Sendable or main actor isolation error in my Swift code
- Add a SwiftData model with safe defaults and undo support
- Build a non-activating floating panel with SwiftUI content on macOS
- Debug a 'cannot find in scope' error after adding a new Swift file
Swift swiftui FAQ
Which tools does Swift swiftui need?
The skill does not set an allowed tools list. It refers to other skills named mac-design, os-integrations and test-mac-app, and to reference files in its repository.
When does the skill trigger?
It is meant for writing, reviewing or debugging Swift code in a Mac app, and for concurrency, Sendable or 'not in scope' errors.
Does Swift swiftui run any scripts?
No scripts are included. It gives rules and fixes that the agent applies to the code.
How do I install Swift swiftui in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/swift-swiftui to use it in all your projects, or to .claude/skills/swift-swiftui in one project. Or install the bama plugin, which includes it: /plugin marketplace add daveebbelaar/bama, then /plugin install bama@bama.
Does Swift swiftui run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Swift swiftui?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Swift swiftui?
The closest alternatives to Swift swiftui are Mac design, Build swiftui interface, Design kit, Test mac app and New mac app.
Where this comes from
- Description: from the skill's own SKILL.md.
More from daveebbelaar/bama

Gives a macOS app a CLI and optional MCP server so agents can drive it
- Open source
- 2K GitHub stars
- Developer tools

Runs a架构 check-in on a growing Swift app and refactors it in proven steps
- Open source
- 2K GitHub stars
- Developer tools

Guides a native macOS app through system entry points and their required permissions
- Open source
- 2K GitHub stars
- Developer tools

Measure and speed up a macOS app's hangs, stutter, memory and energy use
- Open source
- 2K GitHub stars
- Developer tools

Guides an agent to build a Liquid Glass macOS app icon as an Icon Composer file
- Open source
- 2K GitHub stars
- Design and media

Rebuilds a reference app's look as a native SwiftUI design kit, measured from screenshots
- Open source
- 2K GitHub stars
- Design and media


