What problem does it solve?
Writing ViewModels in the Alkaa project requires strict adherence to architectural conventions: sealed state classes, cold Flow exposure, use case injection, correct coroutine scope selection, and dedicated mappers. This Skill encodes those rules so generated or modified ViewModels match the project's established patterns without manual review of existing code.
Core Features & Use Cases
- Sealed State Class Guidance: Enforces
data object for stateless states, data class for data-carrying states, and ImmutableList for list payloads.
- Flow and Scope Rules: Prescribes cold
Flow<ViewState> by default, StateFlow only for shared streams, applicationScope for DB mutations, and viewModelScope for UI-bound work.
- Common Mistake Prevention: Flags anti-patterns like calling repositories directly, inline mapping, ViewModel-to-ViewModel dependencies, and mock-based tests.
- Use Case: When asked to "create a ViewModel for the task detail screen", the Skill produces a ViewModel with injected use cases, a dedicated mapper, a sealed
TaskDetailViewState, and matching fake-based unit tests.
Quick Start
Ask the AI to create a ViewModel for a new screen in the Alkaa project, for example by saying "add a ViewModel for the settings screen that loads the current theme".