swift-mvvm

Installation
SKILL.md

Swift MVVM Skill

Help the agent produce better MVVM code for Swift projects.

Core stance

  • Keep the ViewModel UI-framework agnostic. ViewModels should not import SwiftUI, UIKit, or AppKit.
  • The ViewModel should be mostly (1) state, (2) intent methods, and (3) dependency coordination.
  • Push work into smaller, testable units (pure structs/functions, use cases, controllers, repositories, mappers, formatters).
  • Use dependency injection with protocols so everything is mockable.
  • Extensions are encouraged for organization (especially protocol conformances).

When to use

Use this skill when the user asks to:

  • Add or refactor features in SwiftUI/UIKit/AppKit and keep architecture clean.
  • Create or improve a ViewModel (state, intents, effects) and move logic out of Views/ViewControllers.
  • Fix state-management issues (wrong wrappers, threading warnings, unstable bindings).
  • Improve testability (protocol-based dependencies, mocks/fakes, deterministic state updates).
  • Reduce a “massive ViewModel” by splitting concerns.
Installs
47
GitHub Stars
8
First Seen
Jan 23, 2026