swift-architecture — Claude Code skill for 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.
npx skills add dpearson2699/swift-ios-skills --skill swift-architecture -a claude-codeWhat swift-architecture 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.
What it helps with
- 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 for the agent
- 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.
How to install swift-architecture
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swift-architecture -a claude-code2Manually: put the files in place
~/.claude/skills/swift-architecture/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/swift-architecture/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swift-architecture -a codex2Manually: put the files in place
.agents/skills/swift-architecture/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swift-architecture -a cursor2Manually: put the files in place
.cursor/skills/swift-architecture/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills swift-architecture2Manually: put the files in place
.github/skills/swift-architecture/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swift-architecture -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/swift-architectureManually: put the files in place
.devin/skills/swift-architecture/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swift-architecture -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about swift-architecture
How do I install swift-architecture in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill swift-architecture -a claude-code. The skill file is at ~/.claude/skills/swift-architecture/SKILL.md.
What does swift-architecture do?
It helps assess architecture choices for Swift app features and break migrations into smaller steps. Its patterns include MV, MVVM, MVI, TCA, and Clean Architecture.
Which platforms support swift-architecture?
The skill supports Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode.