Skip to content
Skills Library
Programming · Building & coding

new-mac-app

/new-mac-app

Create a native macOS SwiftUI app from a working template (Swift package, SwiftData, build script, icon script, snapshot mode, git), with no Xcode GUI. Use when the user wants to start a new Mac app or scaffold a macOS project.

Repository
dsh-rev-eng ↗
Licence
MIT
Last repository change
31.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
30
Scripts
23
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 31.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 23 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/new-app.sh, template/Package.swift, template/Sources/__APP_NAME__/App.swift, template/Sources/__APP_NAME__/ContentView.swift, template/Sources/__APP_NAME__/Models.swift, template/Sources/__APP_NAME__/SeedData.swift, template/Sources/__APP_NAME__/SelfTest.swift, template/Sources/__APP_NAME__/SettingsView.swift

What it does and when to use it

Create a native macOS SwiftUI app from a working template (Swift package, SwiftData, build script, icon script, snapshot mode, git), with no Xcode GUI. Use when the user wants to start a new Mac app or scaffold a macOS project.

Original author description

Create a native macOS SwiftUI app from a working template (Swift package, SwiftData, build script, icon script, snapshot mode, git), with no Xcode GUI. Use when the user wants to start a new Mac app or scaffold a macOS project.

How it works

  1. What the template is
  2. Steps
  3. When to switch to an Xcode project
  4. Signing
  5. A CLI for agents
  6. When the build fails
Original SKILL.md headings · 115 lines, 665 words
SKILL.md preview
---
name: new-mac-app
description: Create a native macOS SwiftUI app from a working template (Swift package, SwiftData, build script, icon script, snapshot mode, git), with no Xcode GUI. Use when the user wants to start a new Mac app or scaffold a macOS project.
---

# New Mac app

The template builds and runs as is. The first build proves the toolchain
works before you write feature code.

## What the template is

A Swift package with one executable target, plus a script that wraps the
binary in a real `.app` bundle. An agent can read and edit every file.

```text
<AppName>/
  Package.swift          macOS 26, Swift 6.2 tools, main-actor default isolation
  Info.plist.in          bundle id, name, icon, minimum macOS
  Icon/AppIcon.icon      the app icon: Icon Composer file, JSON plus SVG layers
  build.sh               swift build -> .app bundle -> codesign -> ~/Applications
  AGENTS.md              build, check, and design rules for agents
  Sources/<AppName>/
    App.swift            window, menus, Settings, database location
    Models.swift         SwiftData models, sidebar pages, AppModel
    ContentView.swift    NavigationSplitView: sidebar, list, detail
    Snapshot.swift       APP_SNAPSHOT mode: PNG and layout file per page and Settings tab, light and dark
    UI/Theme.swift       accent colors, saved choice, accent tokens
    SettingsView.swift   Settings window: one tab per topic, sized to content
    UI/AppearanceSettings.swift  Settings: accent picker (mode follows the Mac)
    UI/WindowBehavior.swift  no focus ring on open, fit to content
    UI/Grid.swift        the 4 pt spacing scale, layout probes, grid overlay
  tools/
    grid-lint.sh         flags spacing numbers off the 4 pt grid
    check-layout.swift   checks the layout files from snapshot mode
    make_icon.sh         Icon/AppIcon.icon -> Resources/Assets.car + AppIcon.icns (actool)
    icon_review.sh       renders every icon look into one PNG (ictool)
    icon_sheet.swift     joins the renders for icon_review.sh
```

## Steps

1. Check the toolchain:

   ```bash
   swift --version            # Swift 6.2 or later
   sw_vers -productVersion    # 26.0 or later
   ```

   On macOS 15, set `.macOS(.v15)` in `Package.swift` and
   `LSMinimumSystemVersion` to 15 in `Info.plist.in`, and skip Liquid Glass APIs.

2. Pick the name (one UpperCamelCase word) and bundle id (reverse DNS). If
   `docs/BRIEF.md` exists, use its name.

3. Run the script with the parent folder. It copies the template, fills in
   the name and bundle id, runs `git init`, and commits. It keeps a folder
   that holds only a brief.

   ```bash
   "scripts/new-app.sh" Tasks com.yourname.tasks ~/Developer
   ```

   In a Dropbox or iCloud Drive folder the script can take minutes: run it
   in the background.

4. Build the app and its icon, then open it:

   ```bash
   cd ~/Developer/Tasks && ./build.sh --open
   ```

5. Run the checks the template ships with, then look at the snapshots
   (`build-and-verify` skill):

   ```bash
   swift test --scratch-path ~/Library/Developer/Tasks/test-build   # Kit unit tests
   tools/selftest.sh                                                # PASS per check, exit 0
   tools/snap.sh                                                    # sample data, light and dark PNGs
   ```

6. If `docs/BRIEF.md` exists, rename `Item` to the brief's main type and the
   sidebar pages to the brief's pages. Nothing else: features go through
   `improve-loop`, one story at a time. Build, snapshot, commit.

## When to switch to an Xcode project

The Swift package covers most personal apps. Switch to an XcodeGen project
(`project.yml` -> generated `.xcodeproj`, built with `xcodebuild`) when the
app needs App Intents for Shortcuts and Spotlight, an asset catalog, app
extensions, or widgets. Keep `project.yml` in git and the `.xcodeproj` out
of it. Put build output outside Dropbox with `-derivedDataPath`.

## Signing

`build.sh` signs with the first "Apple Development" certificate in the
keychain, or ad hoc without one. Permissions (Accessibility, Screen
Recording, camera) are stored per signature and path. Ad hoc builds ask
again after every rebuild. A free Apple ID makes a certificate in Xcode >
Settings > Accounts > Manage Certificates. Install to the same path every
time.

## A CLI for agents

To let agents or scripts read and change the app's data, call the `skill`
tool with name `agent-cli`. The app binary becomes its own CLI and sends
each command to the running app, so the database keeps one writer and the
window updates live.

## When the build fails

- `cannot find 'X' in scope` after adding a file: SwiftPM cached the file
  list. Run `swift package clean --scratch-path ~/Library/Developer/<AppName>/build`.
- `binary is older than ...`: a file did not compile. Read the first errors.
- Concurrency errors: call the `skill` tool with name `swift-swiftui`.

Done when the app opens from `~/Applications`, the snapshots show every
page in light and dark, and the first commit exists.
Files in this package (30)
  • SKILL.md 5 KB
  • scripts/new-app.sh 2 KB
  • template/.gitignore 1 KB
  • template/AGENTS.md 4 KB
  • template/Info.plist.in 1 KB
  • template/Package.swift 1 KB
  • template/build.sh 2 KB
  • template/Icon/AppIcon.icon/icon.json 1 KB
  • template/Icon/AppIcon.icon/Assets/back.svg 1 KB
  • template/Icon/AppIcon.icon/Assets/front.svg 1 KB
  • template/Sources/__APP_NAME__/App.swift 3 KB
  • template/Sources/__APP_NAME__/ContentView.swift 3 KB
  • template/Sources/__APP_NAME__/Models.swift 2 KB
  • template/Sources/__APP_NAME__/SeedData.swift 2 KB
  • template/Sources/__APP_NAME__/SelfTest.swift 3 KB
  • template/Sources/__APP_NAME__/SettingsView.swift 2 KB
  • template/Sources/__APP_NAME__/Snapshot.swift 6 KB
  • template/Sources/__APP_NAME__/UI/AppearanceSettings.swift 6 KB
  • template/Sources/__APP_NAME__/UI/Grid.swift 6 KB
  • template/Sources/__APP_NAME__/UI/Theme.swift 6 KB
  • template/Sources/__APP_NAME__/UI/WindowBehavior.swift 3 KB
  • template/Sources/__APP_NAME__Kit/ItemTitle.swift 1 KB
  • template/Tests/__APP_NAME__KitTests/ItemTitleTests.swift 1 KB
  • template/tools/check-layout.swift 5 KB
  • template/tools/grid-lint.sh 1 KB
  • template/tools/icon_review.sh 1 KB
  • template/tools/icon_sheet.swift 2 KB
  • template/tools/make_icon.sh 1 KB
  • template/tools/selftest.sh 1 KB
  • template/tools/snap.sh 1 KB

Versions

RepositoryScoreLicence
This page · Stijnus/dsh-rev-eng100MIT
daveebbelaar/bama100MIT

Database snapshot: 13.11.2026 · package version 61926d009a09 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 3 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100mac-app
    Build or change a small native macOS app in SwiftUI, with or without Xcode, from a working template with snapshot checks and a self-test. Use when the user wants a Mac app, a menu bar utility, or a change to an app made from this template.
  • 98new-win-app
    Create a native Windows WinUI 3 app from a working template (.NET, WinUI 3 unpackaged, EF Core SQLite, build script, icon script, snapshot mode, git), with no Visual Studio GUI. Use when the user wants to start a new Windows app or scaffold a Windows project.
  • 100swift-app-scaffold
    Use when starting a new iOS or macOS app, bootstrapping Package.swift, or scaffolding a modern SwiftUI architecture with Observation, SwiftData, NavigationStack, and Swift Testing.
  • 100macos-apps
    Build professional native macOS apps in Swift with SwiftUI and AppKit. Full lifecycle - build, debug, test, optimize, ship. CLI-only, no Xcode. Use when asked to: create macOS apps, build Swift apps, develop SwiftUI interfaces, fix macOS app issues, add macOS app features, or…
  • 100swift-swiftui
    Swift 6 and SwiftUI code rules for macOS apps, including concurrency, state, SwiftData, AppKit bridges, and fixes for common compiler errors. Use when writing, reviewing, or debugging Swift code in a Mac app, or on concurrency, Sendable, or "not in scope" errors.
  • 100swift-swiftui
    Swift 6 and SwiftUI code rules for macOS apps, including concurrency, state, SwiftData, AppKit bridges, and fixes for common compiler errors. Use when writing, reviewing, or debugging Swift code in a Mac app, or on concurrency, Sendable, or "not in scope" errors.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.