Configure ViewModel state emission with StateFlow, SharedFlow, and sealed UiState classes in Android. Use for state modeling and sharing policies; defer generic lifecycle collection, navigation-event plumbing, Hilt injection, test code, and configuration-change recipes to their specific skills.
70
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
StateFlow<UiState> via .asStateFlow().viewModelScope for all coroutines.init block.See templates for ViewModel and UiState examples.
@Immutable.See templates for sealed UiState pattern.
collectAsStateWithLifecycle() in Compose.SharingStarted.WhileSubscribed(5000) for shared resources..asStateFlow() to consumers.StateFlow<UiState>.collectAsStateWithLifecycle()../gradlew test passes for ViewModel tests.405cdd5
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.