create-macos-app

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.

6 stars

Best use case

create-macos-app is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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.

Teams using create-macos-app should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/create-macos-app/SKILL.md --create-dirs "https://raw.githubusercontent.com/roeybiran/dotfiles/main/.agents/skills/create-macos-app/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/create-macos-app/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How create-macos-app Compares

Feature / Agentcreate-macos-appStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# macOS App Setup Blueprint

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.

---

## Step 1 — Create the Xcode Project

In Xcode: **File → New → Project → macOS → App**.

Fill in product name, bundle ID, team, etc.

---

## Step 2 — Remove the Storyboard / NIB (Optional)

If the user wants code-only UI (no storyboard or NIB):

1. Delete `Main.storyboard` or `MainMenu.xib` from the project (move to Trash).
2. Open `Info.plist` and remove the corresponding key:
   - For storyboard: `NSMainStoryboardFile`
   - For NIB: `NSMainNibFile`

---

## Step 3 — Configure the Scheme

Open **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.

---

## Step 4 — Bootstrap with `main.swift`

Create a new Swift file named **`main.swift`** (the name matters — it marks the entry point).

Add this code:

```swift
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.

---

## Step 5 — Remove `@main` from `AppDelegate`

Open `AppDelegate.swift` and remove the `@main` attribute from the class declaration.

```swift
// Before
@main
class AppDelegate: NSObject, NSApplicationDelegate { ... }

// After
class AppDelegate: NSObject, NSApplicationDelegate { ... }
```

`@main` was the old entry point; `main.swift` now owns that role.

---

## Step 6 — Set Up the Menu Bar

In `AppDelegate.applicationDidFinishLaunching`, build an `NSMenu` and assign it:

```swift
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.).

---

## Step 7 — Add a PROFILE Build Configuration

This gives you a named configuration for profiling (Instruments) that's separate from Debug
and Release.

1. Go to the project settings → **Info** tab → **Configurations**.
2. Click **+** → **Duplicate "Release" Configuration** → name it `PROFILE`.

Then in **Build Settings**, filter by `PROFILE` and customize as needed (e.g., same
optimizations as Release, but with debug symbols for Instruments).

---

## Step 8 — Separate Bundle ID and Name for Debug and Profile

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.)

---

## Step 9 — Add SwiftLint

1. **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:

   ```sh
   if which swiftlint > /dev/null; then
     swiftlint
   else
     echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
   fi
   ```

2. **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.

3. Add a `.swiftlint.yml` at the project root to configure rules.

---

## Step 10 — Add SwiftFormat

Similar to SwiftLint, add another Run Script Phase (after SwiftLint):

```sh
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.

---

## Checklist

When done, confirm with the user:

- [ ] Project created
- [ ] Storyboard/NIB removed (if wanted)
- [ ] Scheme configured (launch args + env vars)
- [ ] `main.swift` created, `@main` removed from `AppDelegate`
- [ ] Menu bar wired up
- [ ] PROFILE build configuration added
- [ ] Debug + Profile bundle IDs / names set
- [ ] SwiftLint run script + sandboxing disabled
- [ ] SwiftFormat run script added

Related Skills

sparkle

6
from roeybiran/dotfiles

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.

note

6
from roeybiran/dotfiles

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.

gsap

6
from roeybiran/dotfiles

GSAP animations for JARVIS HUD transitions and effects

apple-dev

6
from roeybiran/dotfiles

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,

macos-spm-app-packaging

31392
from sickn33/antigravity-awesome-skills

Scaffold, build, sign, and package SwiftPM macOS apps without Xcode projects.

Software DevelopmentClaude

macos-menubar-tuist-app

31392
from sickn33/antigravity-awesome-skills

Build, refactor, or review SwiftUI macOS menubar apps that use Tuist.

Developer ToolsClaude

create-pr

31392
from sickn33/antigravity-awesome-skills

Alias for sentry-skills:pr-writer. Use when users explicitly ask for "create-pr" or reference the legacy skill name. Redirects to the canonical PR writing workflow.

Developer ToolsClaude

create-issue-gate

31392
from sickn33/antigravity-awesome-skills

Use when starting a new implementation task and an issue must be created with strict acceptance criteria gating before execution.

Software DevelopmentClaude

create-branch

31392
from sickn33/antigravity-awesome-skills

Create a git branch following Sentry naming conventions. Use when asked to "create a branch", "new branch", "start a branch", "make a branch", "switch to a new branch", or when starting new work on the default branch.

Developer ToolsClaude

create-tldr-page

28865
from github/awesome-copilot

Create a tldr page from documentation URLs and command examples, requiring both URL and command name.

create-spring-boot-kotlin-project

28865
from github/awesome-copilot

Create Spring Boot Kotlin Project Skeleton

create-specification

28865
from github/awesome-copilot

Create a new specification file for the solution, optimized for Generative AI consumption.