What problem does it solve?
This Skill eliminates the common issue of bloated, hard-to-test ViewModels in Android apps by providing clear guidance for implementing a proper domain layer that separates business logic from UI and data layers.
Core Features & Use Cases
- Architecture Guidance: Clear rules for when to add a domain layer, including reuse, complexity, and testability requirements
- Use Case Design Standards: Naming conventions, operator fun invoke implementation rules, and statelessness requirements for consistent use case creation
- Review & Validation Tools: PR checklists and anti-pattern references to ensure business logic is correctly placed and implemented
- Use Case Example: For a multi-step user login flow that combines repository calls and input validation, use this Skill to structure the logic into a reusable, testable use case instead of cluttering the ViewModel.
Quick Start
Use the domain-layer skill to review your existing Android ViewModel and extract its complex business logic into a compliant, testable use case following Google's official guidelines.