agentleFS
daveebbelaardaveebbelaar/bama/skills/start/new-mac-app/SKILL.md

new-mac-app

Skill1.7k starsChanged 11 days agoMITView on GitHub

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.

1 other project uses a version of this, 1 of them edited.

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Most recently taken up by

Who's talking about daveebbelaar/bama

The biggest 5 of 42 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 42

Talked about on GitHub, YouTube and the web (42 times).

On GitHub · 20

15 more on GitHub

On YouTube · 13

8 more on YouTube

On the web · 9

4 more on the web

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the script with the parent folder.

    line 58
  2. Very specific:

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

    line 75
  3. Very specific:

    If docs/BRIEF.md exists, rename Item to the brief's main type and the sidebar pages to the brief's pages.

    line 84

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.

<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
  CLAUDE.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:

    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.

    "${CLAUDE_SKILL_DIR}/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:

    cd ~/Developer/Tasks && ./build.sh --open
  5. Run the checks the template ships with, then look at the snapshots (build-and-verify skill):

    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 Claude Code, Codex, or scripts read and change the app's data, call the Skill tool with 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 swift-swiftui.

Done when the app opens from ~/Applications, the snapshots show every page in light and dark, and the first commit exists.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.