在 Manus 中运行任何 Skill
一键导入
一键导入
一键在 Manus 中运行任何 Skill
开始使用kotlin-compose
Jetpack Compose - composables, state, effects, theming
星标7
分支1
更新时间2025年12月30日 12:44
文件资源管理器
6 个文件SKILL.md
readonly菜单
Jetpack Compose - composables, state, effects, theming
Modern Android development - Jetpack, Compose, Architecture Components
Kotlin coroutines - structured concurrency, Flows, exception handling
Dependency Injection - Hilt, Koin, scopes, testing
Kotlin DSL - type-safe builders, Gradle DSL, @DslMarker
Kotlin Flow - StateFlow, SharedFlow, operators, testing
Ktor framework - routing, authentication, WebSockets
| name | kotlin-compose |
| description | Jetpack Compose - composables, state, effects, theming |
| version | 1.0.0 |
| sasmp_version | 1.3.0 |
| bonded_agent | 02-kotlin-android |
| 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":"^(composables|state|effects|theming|testing)$"}],"optional":[{"name":"compose_version","type":"string","default":"1.6.0"}]} |
| logging | {"level":"info","events":["skill_invoked","topic_loaded","error_occurred"]} |
Build modern UIs with Jetpack Compose declarative patterns.
@Composable
fun Counter() {
var count by remember { mutableIntStateOf(0) }
Button(onClick = { count++ }) { Text("Count: $count") }
}
// Derived state
val isValid by remember { derivedStateOf { email.isNotBlank() && password.length >= 8 } }
@Composable
fun UserScreen(userId: String) {
LaunchedEffect(userId) {
viewModel.loadUser(userId)
}
DisposableEffect(Unit) {
val listener = viewModel.addListener()
onDispose { listener.remove() }
}
}
Box(
modifier = Modifier
.fillMaxSize()
.padding(16.dp)
.background(MaterialTheme.colorScheme.surface)
.clickable { onClick() }
)
@Composable
fun AppTheme(content: @Composable () -> Unit) {
val colorScheme = if (isSystemInDarkTheme()) darkColorScheme() else lightColorScheme()
MaterialTheme(colorScheme = colorScheme, typography = Typography, content = content)
}
| Issue | Resolution |
|---|---|
| Infinite recomposition | Use remember or derivedStateOf |
| State lost on rotation | Use rememberSaveable or ViewModel |
Skill("kotlin-compose")