.agents/skills/create-macos-app/SKILL.md
Blueprint for setting up a new macOS Xcode project the right way. Use this skill whenever the user asks to create a macOS app, set up a new macOS Xcode project, or bootstrap a macOS application. Covers project creation, scheme configuration, code-level bootstrapping, menu bar setup, build configurations, and linting tooling.
npx skillsauth add roeybiran/dotfiles create-macos-appInstall 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.
Walk through each step in order. Some steps are optional — call those out explicitly so the user can decide. When the user already has a partially set up project, ask where they are and pick up from there.
In Xcode: File → New → Project → macOS → App.
Fill in product name, bundle ID, team, etc.
If the user wants code-only UI (no storyboard or NIB):
Main.storyboard or MainMenu.xib from the project (move to Trash).Info.plist and remove the corresponding key:
NSMainStoryboardFileNSMainNibFileOpen Product → Scheme → Edit Scheme (or ⌘<), select the Run action.
Arguments tab — Add launch argument:
-NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints YES
This makes Auto Layout conflicts visible immediately at runtime instead of silently breaking.
Environment Variables tab — Add:
| Name | Value |
|------|-------|
| OS_ACTIVITY_MODE | disabled |
This suppresses the flood of verbose OS/network log noise in the Xcode console.
main.swiftCreate a new Swift file named main.swift (the name matters — it marks the entry point).
Add this code:
import Cocoa
let app = NSApplication.shared
if NSClassFromString("XCTestCase") == nil {
let appDelegate = AppDelegate()
app.delegate = appDelegate
_ = NSApplicationMain(CommandLine.argc, CommandLine.unsafeArgv)
} else {
app.run()
}
Why: When running unit tests, Xcode injects XCTestCase into the process. By detecting
this and skipping AppDelegate initialization, tests start faster and avoid side effects from
app startup code.
@main from AppDelegateOpen AppDelegate.swift and remove the @main attribute from the class declaration.
// Before
@main
class AppDelegate: NSObject, NSApplicationDelegate { ... }
// After
class AppDelegate: NSObject, NSApplicationDelegate { ... }
@main was the old entry point; main.swift now owns that role.
In AppDelegate.applicationDidFinishLaunching, build an NSMenu and assign it:
func applicationDidFinishLaunching(_ notification: Notification) {
let mainMenu = NSMenu()
// Build your menu items here...
NSApplication.shared.mainMenu = mainMenu
}
At minimum you'll want an application menu (with Quit, Hide, etc.) and whatever top-level menus the app needs (File, Edit, Window, Help, etc.).
This gives you a named configuration for profiling (Instruments) that's separate from Debug and Release.
PROFILE.Then in Build Settings, filter by PROFILE and customize as needed (e.g., same
optimizations as Release, but with debug symbols for Instruments).
This lets you install Debug, Profile, and Release builds side-by-side on the same machine.
In Build Settings, set per-configuration overrides:
| Setting | DEBUG | PROFILE |
|---------|-------|---------|
| PRODUCT_BUNDLE_IDENTIFIER | com.example.MyApp.debug | com.example.MyApp.profile |
| PRODUCT_NAME | MyApp Debug | MyApp Profile |
(Leave Release as the canonical values.)
Add a Run Script Phase: In the target's Build Phases tab, click + → New Run Script Phase. Drag it to run after "Compile Sources". Add the script:
if which swiftlint > /dev/null; then
swiftlint
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi
Disable User Script Sandboxing: In Build Settings, search for
ENABLE_USER_SCRIPT_SANDBOXING and set it to No. This is required for SwiftLint to
read source files from the project directory.
Add a .swiftlint.yml at the project root to configure rules.
Similar to SwiftLint, add another Run Script Phase (after SwiftLint):
if which swiftformat > /dev/null; then
swiftformat .
else
echo "warning: SwiftFormat not installed, download from https://github.com/nicklockwood/SwiftFormat"
fi
Add a .swiftformat config file at the project root to set your formatting rules.
When done, confirm with the user:
main.swift created, @main removed from AppDelegatedevelopment
Integrate, migrate, secure, publish, and troubleshoot Sparkle in macOS apps. Use when working on Sparkle dependency setup (SPM/Carthage/manual), updater wiring (SPUStandardUpdaterController or programmatic setup), Info.plist update keys (SUFeedURL and SUPublicEDKey), appcast/signing workflows, sandboxed updater behavior, or update-check debugging.
testing
Update AGENTS.md instructions from user notes. Use when a user asks to add, revise, remove, or reorganize project operating instructions in AGENTS.md. Default to the current project's AGENTS.md, and only target global AGENTS.md when the user explicitly asks for global scope.
tools
GSAP animations for JARVIS HUD transitions and effects
development
Apple development guidelines for Swift packages (SPM), Xcode projects, Swift Testing framework, and The Composable Architecture (TCA). Load this skill whenever working in an Xcode project (xcodeproj/xcworkspace), a Swift package (Package.swift), writing or fixing Swift tests (Swift Testing, @Test, @Suite,