IOS Swift Patterns

SwiftUI, UIKit, MVVM, Combine, async/await, Core Data, and App Store submission patterns

492 stars 68 forksMobile Development

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add cosmicstack-labs/mercury-agent-skills --skill ios-swift-patterns
Manual install
git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git /tmp/mercury-agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/mercury-agent-skills/categories/mobile/ios-swift-patterns ~/.claude/skills/ios-swift-patterns

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# iOS Swift Patterns

Production-grade iOS development with Swift, SwiftUI, and UIKit.

## Architecture

### MVVM + Coordinator Pattern
```
View (SwiftUI/UIViewController)
  ↕ binds to
ViewModel (ObservableObject)
  ↕ calls
Service Layer (Networking, DB)
  ↕
Core Data / API
```

### Key Principles
- **Views are dumb**: They render state and forward actions — no business logic
- **ViewModels own state**: `@Published` properties, `@State` only for local UI
- **Services are stateless**: Network calls, DB operations, analytics
- **Coordinators handle navigation**: Removing navigation from views makes them reusable

## SwiftUI Best Practices

### Performance
- Use `LazyVStack`/`LazyHStack` for large lists, not `VStack`
- Mark views with `@MainActor` explicitly
- Use `equatable()` on complex views to prevent unnecessary re-renders
- Prefer `@State` for local, `@StateObject` for owned, `@ObservedObject` for passed-in

### State Management
```swift
// Good: Clear separation
@MainActor
class UserViewModel: ObservableObject {
    @Published var users: [User] = []
    @Published var isLoading = false

    func loadUsers() async {
        isLoading = true
        users = await userService.fetchUsers()
        isLoading = false
    }
}
```

## App Store Submission Checklist
- [ ] No Hardcoded API keys
- [ ] TestFlight beta tested with real users
- [ ] Privacy manifest updated
- [ ] Screenshots for all required sizes
- [ ] App Store description and keywords ready
Read the full skill on GitHub

Details

Skill name
ios-swift-patterns
Path
categories/mobile/ios-swift-patterns/SKILL.md
License
MIT
Repo updated
25 August 2026

FAQ

What does the IOS Swift Patterns skill do?

SwiftUI, UIKit, MVVM, Combine, async/await, Core Data, and App Store submission patterns

How do I install the IOS Swift Patterns skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add cosmicstack-labs/mercury-agent-skills --skill ios-swift-patterns. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is IOS Swift Patterns popular?

It lives in cosmicstack-labs/mercury-agent-skills, which has 492 GitHub stars and 68 forks.

Related skills

Browse the most popular Claude skills, all mobile development skills, or write your own with the skills generator.