
Swift modern architecture
Guides an agent to write modern Swift and SwiftUI with Observation, SwiftData and async
Swift modern architecture is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 20
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Swift modern architecture
This skill steers an AI coding agent toward current Apple-platform conventions when writing Swift or SwiftUI code for iOS and macOS. It sets a baseline of Swift 6.3, Observation, SwiftData and Swift Testing, and asks the agent to confirm deployment targets against project requirements before changing anything.
The skill works mostly as a rulebook. It lists patterns to always use and legacy APIs to avoid, such as ObservableObject and XCTest for new code, then offers a short decision guide for choosing between state, actors, persistence, networking and navigation. Code samples show an observable view model backed by an actor service, plus a Swift Testing example. A checklist at the end lets the agent verify its output before finishing.
It points to a separate anti-pattern reference and two companion skills for app bootstrapping and test scaffolding. The skill itself ships no scripts, and the content does not specify required tools or external services beyond Swift and Apple's frameworks.
When your agent uses it
Use when writing Swift or SwiftUI code, designing iOS/macOS architecture, modernizing legacy patterns, or choosing ViewModels, SwiftData, navigation, or concurrency APIs.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (3 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
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):
/plugin marketplace add pstuart/pstuart
/plugin install swift-modern-dev@pstuartOr copy only this skill to ~/.claude/skills/swift-modern-architecture:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pstuart/pstuart.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/swift-modern-architecture &&
cp -R "$tmp/plugins/swift-modern-dev/skills/swift-modern-architecture" ~/.claude/skills/swift-modern-architecture &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/swift-modern-architecture inside it instead.
Copy the skill folder to ~/.agents/skills/swift-modern-architecture to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pstuart/pstuart.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/swift-modern-architecture &&
cp -R "$tmp/plugins/swift-modern-dev/skills/swift-modern-architecture" ~/.agents/skills/swift-modern-architecture &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/swift-modern-architecture inside it instead.
Copy the skill folder to ~/.cursor/skills/swift-modern-architecture to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pstuart/pstuart.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/swift-modern-architecture &&
cp -R "$tmp/plugins/swift-modern-dev/skills/swift-modern-architecture" ~/.cursor/skills/swift-modern-architecture &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/swift-modern-architecture inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/pstuart/pstuart.git --path plugins/swift-modern-dev/skills/swift-modern-architectureOr copy the folder to ~/.gemini/skills/swift-modern-architecture yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/swift-modern-architecture:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pstuart/pstuart.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/swift-modern-architecture &&
cp -R "$tmp/plugins/swift-modern-dev/skills/swift-modern-architecture" ~/.copilot/skills/swift-modern-architecture &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/swift-modern-architecture inside it instead.
Get the folder:
git clone --depth 1 https://github.com/pstuart/pstuart.gitThen copy pstuart/plugins/swift-modern-dev/skills/swift-modern-architecture into your agent's skills folder as swift-modern-architecture. Agents that support SKILL.md read one folder per skill.
What it does
- Observation-based view models
- Guidance for building state with @Observable classes and @State or @Environment in SwiftUI views.
- Modern concurrency rules
- Patterns for async/await, actors and main-actor isolation in place of GCD and completion handlers.
- SwiftData persistence choices
- Direction to use SwiftData models and queries for new code instead of Core Data.
- Typed navigation guidance
- Advice on NavigationStack and NavigationSplitView with typed destinations.
- Swift Testing examples
- Sample test code using the Swift Testing framework for new test suites.
- Architecture decision guide
- A quick decision tree for state, services, persistence, networking and shared packages.
- Pre-finish checklist
- A review list that checks observation, concurrency, navigation and testing choices before completion.
Good for
- Refactor an ObservableObject view model to use @Observable
- Design a networking layer using an actor and async calls
- Add SwiftData persistence to a new iOS app
- Replace NavigationView with NavigationStack and typed destinations
- Write Swift Testing unit tests for a view model
Swift modern architecture FAQ
Which Swift and SwiftUI versions does Swift modern architecture target?
It sets a baseline of Swift 6.3, SwiftUI, Observation, SwiftData and Swift Testing, and tells the agent to confirm deployment targets against project requirements.
Does Swift modern architecture run any scripts or require extra tools?
The skill has no scripts, and its allowed tools are not set. It is instructions and reference material only.
What should I do if I need the full list of anti-patterns?
The skill points to a references/anti-patterns.md file, or to the separate swift-anti-pattern-guard skill, for the complete catalog.
How do I install Swift modern architecture in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/swift-modern-architecture to use it in all your projects, or to .claude/skills/swift-modern-architecture 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.
Does Swift modern architecture run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Swift modern architecture?
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 modern architecture?
The closest alternatives to Swift modern architecture are Swift swiftui, Axiom swift, Axiom modernize, Axiom swiftui and Swift anti pattern guard.
Where this comes from
- Description: from the skill's own SKILL.md.
More from pstuart/pstuart

Reports git state, activity and build evidence across every project in a folder
- Open source
- 20 GitHub stars
- Developer tools

Checks web pages against WCAG 2.1 AA contrast, labels, keyboard and ARIA rules
- Open source
- 20 GitHub stars
- Developer tools

Guides an AI agent through building and reviewing Nuxt 4 apps with the app/ layout
- Open source
- 20 GitHub stars
- Developer tools

Walks an agent through a web application security audit checklist and report
- Open source
- 20 GitHub stars
- Security

Guides an agent to style Nuxt and Vue UIs with Tailwind CSS 4 utilities and @theme tokens
- Open source
- 20 GitHub stars
- Developer tools

Guides an agent to write and review strict TypeScript in Vue, Nuxt and Node code
- Open source
- 20 GitHub stars
- Developer tools



