Manus에서 모든 스킬 실행
원클릭으로
원클릭으로
원클릭으로 Manus에서 모든 스킬 실행
시작하기kotlin-flow
Kotlin Flow - StateFlow, SharedFlow, operators, testing
스타7
포크1
업데이트2025년 12월 30일 12:44
파일 탐색기
6 개 파일SKILL.md
readonly메뉴
Kotlin Flow - StateFlow, SharedFlow, operators, testing
Modern Android development - Jetpack, Compose, Architecture Components
Jetpack Compose - composables, state, effects, theming
Kotlin coroutines - structured concurrency, Flows, exception handling
Dependency Injection - Hilt, Koin, scopes, testing
Kotlin DSL - type-safe builders, Gradle DSL, @DslMarker
Ktor framework - routing, authentication, WebSockets
| name | kotlin-flow |
| description | Kotlin Flow - StateFlow, SharedFlow, operators, testing |
| version | 1.0.0 |
| sasmp_version | 1.3.0 |
| bonded_agent | 03-kotlin-coroutines |
| bond_type | PRIMARY_BOND |
| execution | {"timeout_ms":30000,"retry":{"max_attempts":3,"backoff":"exponential","initial_delay_ms":1000}} |
| parameters | {"required":[{"name":"topic","type":"string","validation":"^(basics|operators|hot_flows|testing)$"}],"optional":[{"name":"include_examples","type":"boolean","default":true}]} |
| logging | {"level":"info","events":["skill_invoked","topic_loaded","error_occurred"]} |
Reactive programming with Kotlin Flow.
// Cold Flow - starts fresh for each collector
fun loadData(): Flow<Data> = flow {
emit(fetchData())
}
// Hot Flow - shared state
private val _state = MutableStateFlow(State())
val state: StateFlow<State> = _state.asStateFlow()
fun searchUsers(query: Flow<String>): Flow<List<User>> =
query
.debounce(300)
.filter { it.length >= 2 }
.distinctUntilChanged()
.flatMapLatest { term -> userRepository.search(term) }
.catch { emit(emptyList()) }
val dashboard: Flow<Dashboard> = combine(
userFlow,
ordersFlow,
notificationsFlow
) { user, orders, notifications ->
Dashboard(user, orders.size, notifications.count())
}
@Test
fun `flow emits values`() = runTest {
viewModel.state.test {
assertThat(awaitItem().isLoading).isFalse()
viewModel.load()
assertThat(awaitItem().isLoading).isTrue()
advanceUntilIdle()
assertThat(awaitItem().data).isNotNull()
}
}
| Issue | Resolution |
|---|---|
| Flow never emits | Add terminal operator (collect, first) |
| Stale data in UI | Use stateIn or shareIn properly |
Skill("kotlin-flow")