cosmicstack-labs/ios-swift-patterns
SwiftUI, UIKit, MVVM, Combine, async/await, Core Data, and App Store submission patterns
npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill ios-swift-patterns
Production-grade iOS development with Swift, SwiftUI, and UIKit.
View (SwiftUI/UIViewController)
↕ binds to
ViewModel (ObservableObject)
↕ calls
Service Layer (Networking, DB)
↕
Core Data / API
@Published properties, @State only for local UILazyVStack/LazyHStack for large lists, not VStack@MainActor explicitlyequatable() on complex views to prevent unnecessary re-renders@State for local, @StateObject for owned, @ObservedObject for passed-in// 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
}
}
Take cosmicstack-labs/ios-swift-patterns from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.