ios-swift-patterns
SwiftUI, UIKit, MVVM, Combine, async/await, Core Data, and App Store submission patterns
npx skills add cosmicstack-labs/mercury-agent-skills --skill ios-swift-patterns --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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
- Architecture
- MVVM + Coordinator Pattern
- Key Principles
- SwiftUI Best Practices
- Performance
- State Management
- App Store Submission Checklist
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 it?
Run `npx skills add cosmicstack-labs/mercury-agent-skills --skill ios-swift-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From cosmicstack-labs/mercury-agent-skills, a repository with 364 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.