Compose Agent Skill
Make your AI coding tool actually understand Compose — Android, Desktop, iOS, and Web.
Backed by real source code from androidx/androidx and compose-multiplatform-core — not vibes.
See the difference
Same prompt. Same model. The only variable is whether this skill is installed.
You: "Add a counter to this composable."
| ❌ Without the skill | ✅ With the skill |
|---|
@Composable
fun Counter() {
// recreated every recomposition —
// count resets to 0 constantly
var count = mutableStateOf(0)
Button(onClick = { count.value++ }) {
Text("Count: ${count.value}")
}
}
State is recreated on every recomposition — the counter silently resets. Also boxes the Int.
|
@Composable
fun Counter() {
// survives recomposition, no boxing
var count by remember { mutableIntStateOf(0) }
Button(onClick = { count++ }) {
Text("Count: $count")
}
}
remember keeps state across recomposition; mutableIntStateOf avoids boxing. Verified against androidx source.
|
You: "Set up navigation between two screens."
| ❌ Without the skill | ✅ With the skill |
|---|
// string routes — no type safety,
// args stringly-typed, deprecated pattern
NavHost(nav, startDestination = "home") {
composable("home") { Home(nav) }
composable("detail/{id}") { back ->
Detail(back.arguments?.getString("id"))
}
}
|
// type-safe routes, compiler-checked args
@Serializable object Home
@Serializable data class Detail(val id: String)
NavHost(nav, startDestination = Home) {
composable<Home> { Home(nav) }
composable<Detail> { entry ->
Detail(entry.toRoute<Detail>().id)
}
}
|
The difference is source-backed grounding — the agent checks real androidx/androidx and compose-multiplatform-core signatures instead of guessing. See how it works ↓
Install
This skill is distributed as a plugin. See docs/INSTALL.md for per-host instructions:
- Claude Code:
/plugin marketplace add aldefy/compose-skill → /plugin install compose-expert
(one step on Claude Code 2.1.275+: /plugin install compose-expert --marketplace aldefy/compose-skill)
- Copilot CLI:
copilot plugin install aldefy/compose-skill
- Codex CLI: manual install — see INSTALL.md.
Already installed manually? See docs/MIGRATION.md.
Updates
New versions are published as GitHub Releases with migration notes. Run /plugin update (Claude Code) or copilot plugin update aldefy/compose-skill (Copilot) to pick them up.
The problem
AI coding tools generate Compose code that compiles but gets the details wrong. Incorrect remember usage, unstable recompositions, broken modifier ordering, deprecated navigation patterns, hallucinated APIs that don't exist. They guess at behavior instead of knowing it.
This skill fixes that by giving your AI assistant two things:
- 35 reference guides covering every major Compose topic — including Compose Multiplatform, A2UI, AppState, Remote Compose, adaptive layouts and input, Android XR, Wear OS, Media3, Android TV, Material 3 motion, Paging 3, Nav 2 → Nav 3 migration, and production crash patterns
- 6 source code files pulled directly from
androidx/androidx and compose-multiplatform-core so the agent can check how things actually work
What changes when you install it