No slash command · from apple-plugin
Covers macOS-specific SwiftUI patterns: scenes, windows, menus, keyboard shortcuts, document-based apps, App Sandbox, hardened runtime, and AppKit interop. Use when building native Mac apps.
Ships in apple-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
SDKROOT = macosx (native) vs SUPPORTS_MACCATALYST = YES (iPad app on Mac). Native macOS targets use SwiftUI for macOS and/or AppKit; Catalyst targets follow ios-ipados with Mac-specific guards.MACOSX_DEPLOYMENT_TARGET gates APIs (if #available(macOS …, *)).ENABLE_APP_SANDBOX, ENABLE_HARDENED_RUNTIME and the .entitlements file before touching file, network or process code.#if os(macOS) and keep shared views platform-neutral.@main
struct LedgerApp: App {
var body: some Scene {
WindowGroup("Ledger", id: "main") { ContentView() }
.commands { LedgerCommands() }
Window("Activity", id: "activity") { ActivityView() }
.keyboardShortcut("0", modifiers: [.command, .option])
Settings { SettingsView() }
MenuBarExtra("Ledger", systemImage: "chart.bar") { MenuBarView() }
.menuBarExtraStyle(.window)
}
}
WindowGroup for documents / multiple instances, Window for single auxiliary windows, Settings for the app's settings window (opened with ⌘,), MenuBarExtra for menu-bar items, DocumentGroup for document-based apps.@Environment(\.openWindow) (openWindow(id:) / openWindow(value:)), close with @Environment(\.dismissWindow)..defaultSize, .windowResizability(.contentSize), and .frame(minWidth:minHeight:) on the root view.CommandMenu("Orders") for new menus, CommandGroup(replacing: .newItem) / (after: .sidebar) to extend standard ones. Do not reuse system shortcuts (⌘Q, ⌘W, ⌘,).@FocusedValue / .focusedSceneValue(\.selectedOrder, order); disable them with .disabled(selection == nil) when they do not apply..contextMenu) mirror menu actions on items; support Delete, ⌘A, arrow-key navigation and Return in lists and tables.@FocusState, .focusable(), .onKeyPress for custom keyboard handling.NavigationSplitView with a List(selection:) sidebar; Table with sortable columns for tabular data (multi-selection via Set<ID>); .inspector for trailing detail panels; .toolbar items with .principal / .primaryAction placements and customization IDs..controlSize(.small) where the design calls for it, Form with .formStyle(.grouped) in settings, standard Toggle / Picker styles..onHover, .help("Tooltip")), right-click menus, drag and drop with Transferable (including to Finder)..fileImporter / .fileExporter / NSOpenPanel / NSSavePanel. The sandbox grants access only to what the user chose (plus the app container).url.bookmarkData(options: .withSecurityScope), resolve with URL(resolvingBookmarkData:options: .withSecurityScope, …), wrap every use in startAccessingSecurityScopedResource() / stopAccessingSecurityScopedResource() (with defer), and refresh stale bookmarks.com.apple.security.files.user-selected.read-write, com.apple.security.network.client for outbound network, …network.server only for servers. Add nothing broader.URL.applicationSupportDirectory); never write next to the app bundle or into the user's home directly.FileDocument / ReferenceFileDocument with declared UTTypes (exported in Info.plist); autosave and versions come from DocumentGroup.Process) is limited under the sandbox and needs embedded, signed executables — prefer frameworks and XPC services.SMAppService.mainApp.register(), reflected in a Settings toggle; never write LaunchAgents by hand.LSUIElement and still provide a way to quit and to open settings.NSViewRepresentable / NSViewControllerRepresentable for AppKit-only controls (NSTextView with rich editing, custom NSOutlineView); NSHostingView / NSHostingController to embed SwiftUI in an AppKit app.NSDocument) and add SwiftUI only where the project already does.NSApplication.shared and NSWorkspace calls are main-actor work.com.apple.security.cs.*) unless the feature cannot work without one — list any you add.What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/apple-testingTesting Apple apps: what to unit-test in a SwiftUI app (observable models, services, mappers, reducers), MainActor-isolated tests, SwiftData and Core Data in memory, protocol doubles for system services, TCA TestStore, XCUITest UI tests (launch arguments, accessibility identifiers, page objects), snapshot tests with swift-snapshot-testing, previews as smoke tests, running tests per platform with xcodebuild and test plans, coverage. Builds on swift-foundation:swift-testing for framework basics.
Use this skill to:
- Test app logic without launching the UI.
- Write UI tests that survive layout changes.
- Run the right scheme and destination for each platform target.
Do NOT use this skill for:
- Swift Testing / XCTest basics — see swift-foundation:swift-testing.
- Server-side Swift tests — see swift-plugin.
/ios-ipadosiPhone and iPad specifics for Apple apps: device families and size classes, adaptive layouts across iPhone, iPad and foldable iPhone screens, iPad multitasking and resizable windows, multiple scenes, pointer, hardware keyboard shortcuts, drag and drop, Apple Pencil, app lifecycle and background work (BGTaskScheduler, background URLSession), push and local notifications, permissions and Info.plist usage descriptions, privacy manifests, WidgetKit / Live Activities / App Intents extensions, Mac Catalyst and "Designed for iPad" on Mac.
Use this skill to:
- Make a screen correct on every iPhone and iPad size the target supports.
- Add a system capability (notifications, background refresh, location, camera) with the right plist keys and permission flow.
- Add or extend a widget, Live Activity or App Intent.
Do NOT use this skill for:
- Mac-native (AppKit / SwiftUI macOS) targets — see apple-plugin:macos-app.
- watchOS targets — see apple-plugin:watchos-app.
npx claudepluginhub aratkruglik/claude-sdlc --plugin apple-pluginOther plugins' skills for the same job