← ClaudeAtlas

uikit-mvvmlisted

Use for hands-on UIKit MVVM questions: setting up Combine bindings between UIViewController and ViewModel (@Published + sink), extracting business logic from massive ViewControllers step by step, testing ViewModels with XCTestExpectation + Combine publishers, fixing [weak self] retain cycles in sink closures, migrating DispatchQueue/GCD completion handlers to Combine, or replacing reloadData() with DiffableDataSource. Also covers Coordinator navigation patterns, constructor injection, ViewState enum, and incremental MVC-to-MVVM refactoring. Trigger on any UIKit architecture decision — even when the user doesn't mention 'MVVM' explicitly.
christim427-rgb/ios-agent-skills · ★ 1 · AI & Automation · score 77
Install: claude install-skill christim427-rgb/ios-agent-skills
> **Approach: Production-First Iterative Refactoring** — This skill is built for production enterprise codebases where stability and reviewability matter more than speed. Architecture changes are delivered through iterative refactoring — small, focused PRs (≤200 lines, single concern) tracked in a `refactoring/` directory. Critical safety issues ship first; cosmetic improvements come last. # UIKit MVVM Architecture (iOS 13+) Enterprise-grade UIKit MVVM architecture skill. Opinionated: prescribes Combine-bound ViewModels, Coordinator navigation, constructor injection via factories, ViewState enum, DiffableDataSource, and programmatic Auto Layout. Adopts a **production-first iterative refactoring** approach — every pattern is chosen for testability, reviewability, and safe incremental adoption in large teams. UIKit MVVM remains the dominant production architecture for large-scale iOS apps. ## Architecture Layers ```text View/ViewController → UIViewController + UIView. Binds to ViewModel via Combine/closures/GCD. Renders state. ViewModel Layer → Zero UIKit imports. Exposes ViewState<T>. Uses @Published (Combine) or closures (GCD). Coordinator Layer → Manages navigation flow. Creates ViewModels + VCs. Owns UINavigationController. Repository Layer → Protocol-based data access. Hides data source details. Service Layer → URLSession, persistence. Injected via protocol. May use GCD or async/await. ``` ## Quick Decision Trees ### "Should this ViewController ha