# swift-architecture

Compare Swift app architecture patterns, inspect state and dependency boundaries, and plan gradual migrations. Use it when designing a feature or reviewing an existing one.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3100 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/swift-architecture/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/swift-architecture

## What it does

The skill weighs MV, MVVM, MVI, TCA, Clean Architecture, Coordinator, and VIPER against a feature’s actual needs. It helps map state ownership, dependencies, side effects, and tests before choosing an approach. For a new SwiftUI feature, it starts with MV; a lengthy view alone does not justify a heavier pattern.

For migrations, it recommends pinning down current behavior with tests, then moving one feature boundary or state transition at a time. It also helps decide when responsibilities should move into models, services, or a Coordinator. VIPER is treated as a fit for maintaining established UIKit modules, not as the routine starting point for new SwiftUI work. In Claude Code, the skill is installed at `~/.claude/skills/swift-architecture/SKILL.md`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill swift-architecture -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/swift-architecture/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/swift-architecture/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill swift-architecture -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/swift-architecture/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill swift-architecture -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/swift-architecture/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills swift-architecture
```

2. **Manually: put the files in place**
- File: `.github/skills/swift-architecture/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill swift-architecture -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/swift-architecture
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/swift-architecture/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill swift-architecture -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/swift-architecture/SKILL.md

## When to use it
- choose an architecture for a new SwiftUI feature
- make module state ownership and dependencies explicit
- decide whether MV needs to become MVVM or MVI
- migrate a feature without changing several boundaries at once
- spot forwarding layers and objects with too many responsibilities

## Example prompts
- Review this SwiftUI feature and recommend an architecture based on its state and dependencies.
- Check who owns state and side effects in this module.
- Plan a gradual migration of this feature to MV, with a test after each step.

## Similar
- [vercel-react-native-skills](https://affpapa.org/en/nevibecode/skills/vercel-react-native-skills.md) — skill · 255200 installs
- [animate-expo](https://affpapa.org/en/nevibecode/skills/animate-expo.md) — skill · 137900 installs
- [mobile-native](https://affpapa.org/en/nevibecode/skills/mobile-native.md) — skill · 86600 installs
- [aso](https://affpapa.org/en/nevibecode/skills/aso.md) — skill · 75400 installs
- [swiftui-pro](https://affpapa.org/en/nevibecode/skills/swiftui-pro.md) — skill · 35200 installs
- [orca-emulator](https://affpapa.org/en/nevibecode/skills/orca-emulator.md) — skill · 5800 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 86 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
