# Swift app scaffold

> Swift app scaffold is an open-source agent skill for developer tools. Scaffolds a modern SwiftUI iOS or macOS app with Observation and NavigationStack. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/pstuart/pstuart/tree/main/plugins/swift-modern-dev/skills/swift-app-scaffold
- **Repository:** https://github.com/pstuart/pstuart
- **GitHub stars:** 20
- **License:** MIT
- **Skill name:** swift-app-scaffold
- **Collection:** https://github.com/pstuart/pstuart
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill guides an agent through bootstrapping a new Apple-platform app. It provides a Swift Package Manifest template with current tools and platform targets, a minimal SwiftUI app entry point, and an optional SwiftData model container that is added only when the app has persistent models. It also suggests a folder layout organized by feature rather than catch-all utility folders.

The guidance favors @Observable state, NavigationStack over older navigation APIs, and dependencies that are reviewed and pinned according to repository policy. It includes rules that keep new test files and test targets off unless the user explicitly authorizes them, and it closes with a checklist covering build verification, accessibility identifiers and architecture documentation.

The skill is plain Markdown with no bundled scripts. It expects an Xcode or Swift toolchain on the machine and works with existing repositories by respecting their established architecture.

## When your agent uses it

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

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/pstuart/pstuart/tree/HEAD/plugins/swift-modern-dev/skills/swift-app-scaffold)
- [License: MIT](https://github.com/pstuart/pstuart/tree/HEAD/plugins/swift-modern-dev/skills/swift-app-scaffold)

## Features

- **Package.swift template:** Provides a starting Swift package manifest with platform targets and a feature library target.
- **SwiftUI app entry:** Shows a minimal App and WindowGroup setup with a root content view.
- **Optional SwiftData setup:** Explains when to attach a model container for persistent data.
- **Observation and navigation defaults:** Recommends @Observable state and NavigationStack over older alternatives.
- **Feature-based folder layout:** Suggests an app, features, models, services and resources structure.
- **Test authorization rules:** Prevents creating new test files or targets without explicit user approval.
- **Bootstrap checklist:** Lists targets, dependency review, build checks and accessibility items to confirm.

## Good for

- Start a new iOS app with SwiftUI and NavigationStack
- Create a Package.swift for a macOS feature library
- Add SwiftData persistence to an existing SwiftUI project
- Set up a modular folder structure for a growing Swift app

## Install

### Claude Code

This skill ships in the `swift-modern-dev` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add pstuart/pstuart
/plugin install swift-modern-dev@pstuart
```

Or copy only this skill to `~/.claude/skills/swift-app-scaffold`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pstuart/pstuart.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/swift-app-scaffold &&
cp -R "$tmp/plugins/swift-modern-dev/skills/swift-app-scaffold" ~/.claude/skills/swift-app-scaffold &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/swift-app-scaffold` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/swift-app-scaffold` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pstuart/pstuart.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/swift-app-scaffold &&
cp -R "$tmp/plugins/swift-modern-dev/skills/swift-app-scaffold" ~/.agents/skills/swift-app-scaffold &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/swift-app-scaffold` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/swift-app-scaffold` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pstuart/pstuart.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/swift-app-scaffold &&
cp -R "$tmp/plugins/swift-modern-dev/skills/swift-app-scaffold" ~/.cursor/skills/swift-app-scaffold &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/swift-app-scaffold` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/pstuart/pstuart.git --path plugins/swift-modern-dev/skills/swift-app-scaffold
```

Or copy the folder to `~/.gemini/skills/swift-app-scaffold` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/swift-app-scaffold`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pstuart/pstuart.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/swift-app-scaffold &&
cp -R "$tmp/plugins/swift-modern-dev/skills/swift-app-scaffold" ~/.copilot/skills/swift-app-scaffold &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/swift-app-scaffold` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/pstuart/pstuart.git
```

Then copy `pstuart/plugins/swift-modern-dev/skills/swift-app-scaffold` into your agent's skills folder as `swift-app-scaffold`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Swift app scaffold trigger?

When starting a new iOS or macOS app, bootstrapping Package.swift, or scaffolding a SwiftUI architecture using Observation, SwiftData, NavigationStack and Swift Testing.

### Does Swift app scaffold create test files automatically?

No. New test files and test targets require explicit user authorization, and the skill prefers existing checks otherwise.

### Does Swift app scaffold add SwiftData to every app?

No. The skill adds a SwiftData model container only when the app has persistent models.

### Does Swift app scaffold run scripts?

No scripts are included; the skill consists of instructions and code templates.

### How do I install Swift app scaffold in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/swift-app-scaffold to use it in all your projects, or to .claude/skills/swift-app-scaffold in one project. Or install the swift-modern-dev plugin, which includes it: /plugin marketplace add pstuart/pstuart, then /plugin install swift-modern-dev@pstuart.

### Which AI agents can use Swift app scaffold?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Swift app scaffold?

The closest alternatives to Swift app scaffold are New mac app, Swift modern architecture, Swift test scaffold, Build swiftui interface and Build and verify.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [New mac app](https://ai-powered.com/skills/new-mac-app): New mac app is an open-source agent skill for developer tools.
- [Swift modern architecture](https://ai-powered.com/skills/swift-modern-architecture): Swift modern architecture is an open-source agent skill for developer tools.
- [Swift test scaffold](https://ai-powered.com/skills/swift-test-scaffold): Swift test scaffold is an open-source agent skill for developer tools.
- [Build swiftui interface](https://ai-powered.com/skills/build-swiftui-interface): Build swiftui interface is an open-source agent skill for developer tools.
- [Build and verify](https://ai-powered.com/skills/build-and-verify): Build and verify is an open-source agent skill for developer tools.
- [Design kit](https://ai-powered.com/skills/design-kit): Design kit is an open-source agent skill for design and media.
- [Swift swiftui](https://ai-powered.com/skills/swift-swiftui): Swift swiftui is an open-source agent skill for developer tools.
- [Mac design](https://ai-powered.com/skills/mac-design): Mac design is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/swift-app-scaffold
