/swift-macos
Comprehensive macOS app development with Swift 6.3, SwiftUI, SwiftData, Swift Concurrency, Foundation Models, Swift Testing, ScreenCaptureKit, and app distribution. Use when building native Mac apps, implementing windows/scenes/navigation/menus/toolbars, SwiftData models and
$ npx -y skills add tenequm/skills --skill swift-macos --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/swift-macos
Context preview
The summary Claude sees to decide when to auto-load this skill.
Comprehensive macOS app development with Swift 6.3, SwiftUI, SwiftData, Swift Concurrency, Foundation Models, Swift Testing, ScreenCaptureKit, and app distribution. Use when building native Mac apps, implementing windows/scenes/navigation/menus/toolbars, SwiftData models and
SKILL.md
swift-macos.SKILL.mdname: swift-macos
description: Comprehensive macOS app development with Swift 6.3, SwiftUI, SwiftData, Swift Concurrency, Foundation Models, Swift Testing, ScreenCaptureKit, and app distribution. Use when building native Mac apps, implementing windows/scenes/navigation/menus/toolbars, SwiftData models and queries, modern concurrency, on-device AI, testing, screen/audio capture, menu bar apps, AppKit bridges, login items, process monitoring, or App Store and Developer ID distribution. Triggers on macOS app, SwiftUI macOS, SwiftData, Swift concurrency, Foundation Models, Swift Testing, ScreenCaptureKit, screen capture, screen recording, AVFoundation, MenuBarExtra, NSViewRepresentable, notarize, login item, and process monitoring.
metadata:
version: "0.7.0"
upstream: "swift@6.3.3, xcode@26.6, macos@26.6"
openclaw:
homepage: https://github.com/tenequm/skills/tree/main/skills/swift-macos
emoji: "๐"
os:
- macosmacOS App Development - Swift 6.3
Build native macOS apps with Swift 6.3 (latest: 6.3.3, bundled in Xcode 26.6, Jun 2026), SwiftUI, SwiftData, and macOS 26 Tahoe (26.6 current). Target macOS 14+ for SwiftData/@Observable, macOS 15+ for latest SwiftUI, macOS 26 for Liquid Glass and Foundation Models. Note Xcode 26.6 still bundles the macOS **26.5** SDK, so 26.6-only API is not yet buildable. For the WWDC 2026 beta stack (macOS 27, Xcode 27, Swift 6.4, shipping fall 2026), see `references/fall-2026-releases.md`.
Quick Start
import SwiftUI
import SwiftData
@Model
final class Project {
var name: String
var createdAt: Date
// Named ProjectTask, not Task - `Task` would shadow `Swift.Task`
@Relationship(deleteRule: .cascade) var tasks: [ProjectTask] = []
init(name: String) {
self.name = name
self.createdAt = .now
}
}
@Model
final class ProjectTask {
var title: String
var isComplete: Bool
var project: Project?
init(title: String) {
self.title = title
self.isComplete = false
}
}
@main
struct MyApp: App {
var body: some Scene {
WindowGroup("Projects") {
ContentView()
}
.modelContainer(for: [Project.self, ProjectTask.self])
.defaultSize(width: 900, height: 600)
#if os(macOS)
Settings { SettingsView() }
MenuBarExtra("Status", systemImage: "circle.fill") {
MenuBarView()
}
.menuBarExtraStyle(.window)
#endif
}
}
struct ContentView: View {
@Query(sort: \Project.createdAt, order: .reverse)
private var projects: [Project]
@Environment(\.modelContext) private var context
@State private var selected: Project?
var body: some View {
NavigationSplitView {
List(projects, selection: $selected) { project in
NavigationLink(value: project) {
Text(project.name)
}
}
.navigationSplitViewColumnWidth(min: 200, ideal: 250)
} detail: {
if let selected {
DetailView(project: selected)
} else {
ContentUnavailableView("Select a Project",
systemImage: "sidebar.left")
}
}
}
}Scenes & Windows
| Scene | Purpose | |-------|---------| | `WindowGroup` | Resizable windows (multiple instances) | | `Window` | Single-instance utility window | | `Settings` | Preferences (Cmd+,) | | `MenuBarExtra` | Menu bar with `.menu` or `.window` style | | `DocumentGroup` | Document-based apps |
Open windows: `@Environment(\.openWindow) var openWindow; openWindow(id: "about")`
For complete scene lifecycle, see `references/app-lifecycle.md`.
Menus & Commands
.commands {
CommandGroup(replacing: .newItem) {
Button("New Project") { /* ... */ }
.keyboardShortcut("n", modifiers: .command)
}
CommandMenu("Tools") {
Button("Run Analysis") { /* ... */ }
.keyboardShortcut("r", modifiers: [.command, .shift])
}
}Table (macOS-native)
Table(items, selection: $selectedIDs, sortOrder: $sortOrder) {
TableColumn("Name", value: \.name)
TableColumn("Date") { Text($0.date, format: .dateTime) }
.width(min: 100, ideal: 150)
}
.contextMenu(forSelectionType: Item.ID.self) { ids in
Button("Delete", role: .destructive) { delete(ids) }
}For forms, popovers, sheets, inspector, and macOS modifiers, see `references/swiftui-macos.md`.
@Observable
@Observable
final class AppState {
var projects: [Project] = []
var isLoading = false
func load() async throws {
isLoading = true
defer { isLoading = false }
projects = try await ProjectService.fetchAll()
}
}
// Use: @State var state = AppState() (owner)
// Pass: .environment(state) (inject)
// Read: @Environment(AppState.self) var state (child)SwiftData
@Query & #Predicate
@Query(filter: #Predicate<Project> { !$0.isArchived }, sort: \Project.name)
private var active: [Project]
// Dynamic predicate
func search(_ term: String) -> Predicate<Project> {
#Predicate { $0.name.localizedStandardContains(term) }
}
// FetchDescriptor (outside views)
var desc = FetchDescriptor<Project>(predicate: #Predicate { $0.isArchived })
desc.fetchLimit = 50
let results = try context.fetch(desc)
let count = try context.fetchCount(desc)Relationships
@Model final class Author {
var name: String
@Relationship(deleteRule: .cascade, inverse: \Book.author)
var books: [Book] = []
}
@Model final class Book {
var title: String
var author: Author?
@Relationship var tags: [Tag] = [] // many-to-many
}Delete rules: `.cascade`, `.nullify` (default), `.deny`, `.noAction`.
Schema Migration
enum SchemaV1: VersionedSchema { /* ... */ }
enum SchemaV2: VersionedSchema { /* ... */ }
enum MigrationPlan: SchemaMigratiRead more
name: swift-macos
description: Comprehensive macOS app development with Swift 6.3, SwiftUI, SwiftData, Swift Concurrency, Foundation Models, Swift Testing, ScreenCaptureKit, and app distribution. Use when building native Mac apps, implementing windows/scenes/navigation/menus/toolbars, SwiftData models and queries, modern concurrency, on-device AI, testing, screen/audio capture, menu bar apps, AppKit bridges, login items, process monitoring, or App Store and Developer ID distribution. Triggers on macOS app, SwiftUI macOS, SwiftData, Swift concurrency, Foundation Models, Swift Testing, ScreenCaptureKit, screen capture, screen recording, AVFoundation, MenuBarExtra, NSViewRepresentable, notarize, login item, and process monitoring.
metadata:
version: "0.7.0"
upstream: "swift@6.3.3, xcode@26.6, macos@26.6"
openclaw:
homepage: https://github.com/tenequm/skills/tree/main/skills/swift-macos
emoji: "๐"
os:
- macosmacOS App Development - Swift 6.3
Build native macOS apps with Swift 6.3 (latest: 6.3.3, bundled in Xcode 26.6, Jun 2026), SwiftUI, SwiftData, and macOS 26 Tahoe (26.6 current). Target macOS 14+ for SwiftData/@Observable, macOS 15+ for latest SwiftUI, macOS 26 for Liquid Glass and Foundation Models. Note Xcode 26.6 still bundles the macOS **26.5** SDK, so 26.6-only API is not yet buildable. For the WWDC 2026 beta stack (macOS 27, Xcode 27, Swift 6.4, shipping fall 2026), see `references/fall-2026-releases.md`.
Quick Start
import SwiftUI
import SwiftData
@Model
final class Project {
var name: String
var createdAt: Date
// Named ProjectTask, not Task - `Task` would shadow `Swift.Task`
@Relationship(deleteRule: .cascade) var tasks: [ProjectTask] = []
init(name: String) {
self.name = name
self.createdAt = .now
}
}
@Model
final class ProjectTask {
var title: String
var isComplete: Bool
var project: Project?
init(title: String) {
self.title = title
self.isComplete = false
}
}
@main
struct MyApp: App {
var body: some Scene {
WindowGroup("Projects") {
ContentView()
}
.modelContainer(for: [Project.self, ProjectTask.self])
.defaultSize(width: 900, height: 600)
#if os(macOS)
Settings { SettingsView() }
MenuBarExtra("Status", systemImage: "circle.fill") {
MenuBarView()
}
.menuBarExtraStyle(.window)
#endif
}
}
struct ContentView: View {
@Query(sort: \Project.createdAt, order: .reverse)
private var projects: [Project]
@Environment(\.modelContext) private var context
@State private var selected: Project?
var body: some View {
NavigationSplitView {
List(projects, selection: $selected) { project in
NavigationLink(value: project) {
Text(project.name)
}
}
.navigationSplitViewColumnWidth(min: 200, ideal: 250)
} detail: {
if let selected {
DetailView(project: selected)
} else {
ContentUnavailableView("Select a Project",
systemImage: "sidebar.left")
}
}
}
}Scenes & Windows
| Scene | Purpose | |-------|---------| | `WindowGroup` | Resizable windows (multiple instances) | | `Window` | Single-instance utility window | | `Settings` | Preferences (Cmd+,) | | `MenuBarExtra` | Menu bar with `.menu` or `.window` style | | `DocumentGroup` | Document-based apps |
Open windows: `@Environment(\.openWindow) var openWindow; openWindow(id: "about")`
For complete scene lifecycle, see `references/app-lifecycle.md`.
Menus & Commands
.commands {
CommandGroup(replacing: .newItem) {
Button("New Project") { /* ... */ }
.keyboardShortcut("n", modifiers: .command)
}
CommandMenu("Tools") {
Button("Run Analysis") { /* ... */ }
.keyboardShortcut("r", modifiers: [.command, .shift])
}
}Table (macOS-native)
Table(items, selection: $selectedIDs, sortOrder: $sortOrder) {
TableColumn("Name", value: \.name)
TableColumn("Date") { Text($0.date, format: .dateTime) }
.width(min: 100, ideal: 150)
}
.contextMenu(forSelectionType: Item.ID.self) { ids in
Button("Delete", role: .destructive) { delete(ids) }
}For forms, popovers, sheets, inspector, and macOS modifiers, see `references/swiftui-macos.md`.
@Observable
@Observable
final class AppState {
var projects: [Project] = []
var isLoading = false
func load() async throws {
isLoading = true
defer { isLoading = false }
projects = try await ProjectService.fetchAll()
}
}
// Use: @State var state = AppState() (owner)
// Pass: .environment(state) (inject)
// Read: @Environment(AppState.self) var state (child)SwiftData
@Query & #Predicate
@Query(filter: #Predicate<Project> { !$0.isArchived }, sort: \Project.name)
private var active: [Project]
// Dynamic predicate
func search(_ term: String) -> Predicate<Project> {
#Predicate { $0.name.localizedStandardContains(term) }
}
// FetchDescriptor (outside views)
var desc = FetchDescriptor<Project>(predicate: #Predicate { $0.isArchived })
desc.fetchLimit = 50
let results = try context.fetch(desc)
let count = try context.fetchCount(desc)Relationships
@Model final class Author {
var name: String
@Relationship(deleteRule: .cascade, inverse: \Book.author)
var books: [Book] = []
}
@Model final class Book {
var title: String
var author: Author?
@Relationship var tags: [Tag] = [] // many-to-many
}Delete rules: `.cascade`, `.nullify` (default), `.deny`, `.noAction`.
Schema Migration
enum SchemaV1: VersionedSchema { /* ... */ }
enum SchemaV2: VersionedSchema { /* ... */ }
enum MigrationPlan: SchemaMigratiShowing the first part of this file.
Claude Code skills for founders, developers, and web3 builders. This repository publishes reusable skill folders under skills//, ships stable bundle downloads through GitHub Releases, and publishes changed skills to ClawHub.
Repo: tenequm/skills
Other skills on tenequm-skills.
- /audio-quality-check
Analyze audio recording quality - echo detection, loudness, speech intelligibility, SNR, spectral analysis. Use when the user wants to check a recording's quality, detect echo or duplication in audio files, measure speech clarity, compare original vs processed audio, diagnose
Open skill - /chrome-extension-wxt
Build Chrome extensions using WXT framework with TypeScript, React, Vue, or Svelte. Use when creating browser extensions, developing cross-browser add-ons, or working with Chrome Web Store projects. Triggers on phrases like "chrome extension", "browser extension", "WXT
Open skill - /cloudflare-workers
Cloudflare account ID, set as a CI secret for wrangler deploys.
Open skill - /command-skill-creator
Create automation command skills (slash commands) for Claude Code projects. Use when building `/slash-commands` that automate multi-step workflows - deploys, commits, releases, migrations, cross-repo operations, or any repeatable process. Triggers on "create a command", "make a
Open skill - /deep-research-glim
Conducts deep, multi-angle research using glim MCP tools and parallel subagents. Use for deep research, competitive landscape analysis, strategic intelligence, or /deep-research-glim [topic]. Triggers - deep research, deep dive on, competitive landscape, strategic intelligence,
Open skill - /download-webpage-as-pdf
Set to "false" (the recipe default) to force headless capture regardless of the host agent-browser config
Open skill

