swiftship/internal/skills/data/always-macos/components/SKILL.md
macOS UI components: button styles, context menus, tables, drag-and-drop, keyboard shortcuts. Use when working on macOS component patterns, desktop UI, or Mac app interactions. Triggers: Button, Table, Menu, contextMenu, keyboardShortcut, component.
npx skillsauth add abdullah4ai/apple-developer-toolkit componentsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
macOS apps should feel like professional desktop tools, not enlarged phone apps.
Sidebar: Use translucent sidebar by default (NavigationSplitView handles this). The sidebar background is slightly transparent when the window is active, becoming opaque when inactive — this signals which window has focus.
Color density: Similar to iOS — accent colors, branded surfaces, and colored icons are appropriate. However, in macOS Tahoe (26), sidebar icons default to monochrome (not tinted) since tinted icons clash with the translucent sidebar.
Content areas: Use opaque AppTheme backgrounds for content areas. Sidebars are the main translucent element.
// Primary action
Button("Save") { save() }
.buttonStyle(.borderedProminent)
.keyboardShortcut("s", modifiers: .command)
// Secondary action
Button("Cancel") { cancel() }
.buttonStyle(.bordered)
.keyboardShortcut(.escape)
// Tertiary / inline
Button("Details") { showDetails() }
.buttonStyle(.borderless)
// Link-style
Button("Learn More") { openURL() }
.buttonStyle(.link)
BUTTON HIERARCHY:
| Level | Style | Use Case |
|-------|-------|----------|
| Primary action | .borderedProminent | Save, Confirm, Send |
| Secondary | .bordered | Cancel, Settings |
| Tertiary | .borderless | Inline actions |
| Link | .link | Navigation, external links |
// Translucent glass background
VStack { content }
.glassEffect()
// Glass button styles
Button("Action") { }
.buttonStyle(.glass)
Button("Primary") { }
.buttonStyle(.glassProminent)
Text(item.name)
.contextMenu {
Button("Copy", systemImage: "doc.on.doc") { copy(item) }
.keyboardShortcut("c", modifiers: .command)
Button("Delete", systemImage: "trash", role: .destructive) { delete(item) }
Divider()
Menu("Move to") {
ForEach(folders) { folder in
Button(folder.name) { move(item, to: folder) }
}
}
}
Every primary action and menu item MUST have a keyboard shortcut:
Button("New Item") { createItem() }
.keyboardShortcut("n", modifiers: .command)
Button("Delete") { deleteItem() }
.keyboardShortcut(.delete, modifiers: .command)
Button("Find") { showSearch() }
.keyboardShortcut("f", modifiers: .command)
// Draggable source
Text(item.name)
.draggable(item)
// Drop destination
List { ... }
.dropDestination(for: Item.self) { items, location in
handleDrop(items, at: location)
return true
}
Table(items) {
TableColumn("Name", value: \.name)
TableColumn("Date") { item in
Text(item.date, style: .date)
}
TableColumn("Size") { item in
Text(item.formattedSize)
}
}
.tableStyle(.inset(alternatesRowBackgrounds: true))
Menu("Options", systemImage: "ellipsis.circle") {
Button("Import...", systemImage: "square.and.arrow.down") { importData() }
Button("Export...", systemImage: "square.and.arrow.up") { exportData() }
Divider()
Toggle("Show Hidden", isOn: $showHidden)
}
Toggle("Enable Notifications", isOn: $notificationsEnabled)
.toggleStyle(.switch)
Form {
Section("General") {
TextField("Name", text: $name)
Picker("Theme", selection: $theme) {
Text("System").tag(Theme.system)
Text("Light").tag(Theme.light)
Text("Dark").tag(Theme.dark)
}
}
Section("Advanced") {
Toggle("Debug Mode", isOn: $debugMode)
.toggleStyle(.switch)
}
}
.formStyle(.grouped)
ContentUnavailableView(
"No Documents",
systemImage: "doc",
description: Text("Create a new document to get started")
)
.keyboardShortcut().contextMenu {} for right-click interactions on data itemsTable for tabular data display (macOS-specific view)Menu for dropdown actions in toolbars.formStyle(.grouped) for preference forms.draggable() / .dropDestination() for drag-and-drop.borderedProminent per visible area.foregroundStyle() not .foregroundColor().clipShape(.rect(cornerRadius:)) not .cornerRadius()tools
Apple platform skill for docs, WWDC lookup, App Store Connect work, and SwiftUI app generation. Use repo-local `node cli.js` for Apple docs and WWDC search, `appledev store` for App Store Connect workflows, and `appledev build` for app scaffolding or fix loops on macOS. USE WHEN: Apple APIs, WWDC sessions, TestFlight/App Store tasks, or building/fixing Apple-platform apps. DON'T USE WHEN: non-Apple platforms, generic backend work, or general web research. EDGE CASES: docs-only queries use `node cli.js` in this repo, not `appledev`; release workflows use `appledev store`; app scaffolding uses `appledev build`; rules-only requests can read `references/ios-rules/` or `references/swiftui-guides/` progressively without invoking binaries.
tools
All-in-one Apple developer skill with three integrated tools shipped as a single unified binary. (1) Documentation search across Apple frameworks, symbols, and 1,267 WWDC sessions from 2014-2025. No credentials needed. (2) App Store Connect CLI with 120+ commands covering builds (find/wait/upload), TestFlight, pre-submission validate, submissions, signing, subscriptions (family-sharable), IAP, analytics, Xcode Cloud, metadata workflows, release pipeline dashboard, insights, win-back offers, promoted purchases, product pages, nominations, accessibility declarations, pre-orders, pricing filters, localizations update, diff, webhooks with local receiver, workflow automation, and more. Requires App Store Connect API key. (3) Multi-platform app builder (iOS/watchOS/tvOS/iPad/macOS/visionOS) that generates complete Swift/SwiftUI apps from natural language with auto-fix, simulator launch, interactive chat mode, and open-in-Xcode. Requires an LLM API key and Xcode. Includes 38 iOS development rules and 12 SwiftUI best practice guides for Liquid Glass, navigation, state management, and modern APIs. All three tools ship as one binary (appledev). USE WHEN: Apple API docs, App Store Connect management, WWDC lookup, or building iOS/watchOS/tvOS/macOS/visionOS apps from scratch. DON'T USE WHEN: non-Apple platforms or general coding.
testing
watchOS complications: WidgetKit complication families, accessory sizes, timeline providers for watch face. Use when implementing watchOS-specific patterns related to widgets.
development
watchOS haptic feedback: WKInterfaceDevice preset haptic types for wrist-based feedback. Use when implementing watchOS-specific patterns related to haptics.