kotlin-compose

from pluginagentmarketplace/custom-plugin-kotlin

Kotlin Development Plugin

3 stars1 forksUpdated Jan 5, 2026
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-kotlin --skill kotlin-compose

SKILL.md

Kotlin Compose Skill

Build modern UIs with Jetpack Compose declarative patterns.

Topics Covered

State Management

@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 } }

Side Effects

@Composable
fun UserScreen(userId: String) {
    LaunchedEffect(userId) {
        viewModel.loadUser(userId)
    }

    DisposableEffect(Unit) {
        val listener = viewModel.addListener()
        onDispose { listener.remove() }
    }
}

Modifiers

Box(
    modifier = Modifier
        .fillMaxSize()
        .padding(16.dp)
        .background(MaterialTheme.colorScheme.surface)
        .clickable { onClick() }
)

Material 3 Theming

@Composable
fun AppTheme(content: @Composable () -> Unit) {
    val colorScheme = if (isSystemInDarkTheme()) darkColorScheme() else lightColorScheme()
    MaterialTheme(colorScheme = colorScheme, typography = Typography, content = content)
}

Troubleshooting

IssueResolution
Infinite recompositionUse remember or derivedStateOf
State lost on rotationUse rememberSaveable or ViewModel

Usage

Skill("kotlin-compose")

Repository Stats

Stars3
Forks1
LicenseOther