Skip to content
Back to skills

Android Kotlin Compose

ASecurity

Jetpack Compose UI engineering for 2026 — edge-to-edge, Material 3, recomposition stability, Modifier ordering, LazyColumn performance, and animations. Use when building composables, fixing jank, theming, adaptive layouts, Canvas drawing, auditing screens, or asking "why does my screen recompose", "Modifier order", "edge to edge Compose", "audit this composable", "review this screen".

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 24, 2026
ai-agentskotlinspringapiperformance

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 24, 2026

npx -y skills add Shreyamkmr/AgenticCar --skill android-kotlin-compose --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Android Kotlin Compose?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Android Kotlin Compose
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/shreyamkmr-android-kotlin-compose/badge)](https://www.skillsdirectory.com/skills/shreyamkmr-android-kotlin-compose)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: android-kotlin-compose
description: >
  Jetpack Compose UI engineering for 2026 — edge-to-edge, Material 3, recomposition
  stability, Modifier ordering, LazyColumn performance, and animations. Use when building
  composables, fixing jank, theming, adaptive layouts, Canvas drawing, auditing screens,
  or asking "why does my screen recompose", "Modifier order", "edge to edge Compose",
  "audit this composable", "review this screen".
---

# Android Kotlin — Compose UI Module

Parent kit: [`../compose-kotlin-agent-skills/SKILL.md`](../compose-kotlin-agent-skills/SKILL.md) · Index: [`../compose-kotlin-agent-skills/AGENTS.md`](../compose-kotlin-agent-skills/AGENTS.md) · Banned list: [`../compose-kotlin-agent-skills/references/00-banned-antipatterns.md`](../compose-kotlin-agent-skills/references/00-banned-antipatterns.md)

## REVIEW MODE

**Trigger phrases:** "audit this file", "check this composable", "review this screen", "review mode", "a11y pass on this composable".

When triggered, **silently run this 6-point checklist** on the target file before responding. Cite failures by checklist number and banned-antipattern row from [`../compose-kotlin-agent-skills/references/00-banned-antipatterns.md`](../compose-kotlin-agent-skills/references/00-banned-antipatterns.md).

| # | Check | Fail if |
|---|-------|---------|
| 1 | **Modifier param** | Missing `modifier: Modifier = Modifier` or not last optional param |
| 2 | **State hoisting** | Screen/business state inside `@Composable` that belongs in ViewModel |
| 3 | **Lazy list keys** | `LazyColumn`/`LazyRow` items missing `key = {}` or `contentType = {}` |
| 4 | **Lifecycle collection** | Uses `collectAsState()` instead of `collectAsStateWithLifecycle()` |
| 5 | **Side effects in composition** | IO, DB, network, or `viewModelScope` work directly in composable body |
| 6 | **Stability** | Data class params to child composables lack `@Stable` or `@Immutable` |

**Output format for REVIEW MODE:**

```
## Compose audit — <filename>

| # | Status | Finding |
|---|--------|---------|
| 1 | PASS/FAIL | ... |
...

### Banned antipatterns hit
- Row N: <pattern> → <fix>

### Suggested diff
<code block with minimal fix>
```

Load [`../compose-kotlin-agent-skills/references/17-accessibility.md`](../compose-kotlin-agent-skills/references/17-accessibility.md) when audit includes TalkBack, touch targets, or contrast.

---

## AUTHORING MODE

Default behavior when **writing new Compose UI** (not auditing). Follow all rules below.

## Read First

| File | When |
|------|------|
| [`../compose-kotlin-agent-skills/references/02-compose-ui.md`](../compose-kotlin-agent-skills/references/02-compose-ui.md) | Stability, slots, Material 3, CompositionLocal themes |
| [`../compose-kotlin-agent-skills/references/03-animations.md`](../compose-kotlin-agent-skills/references/03-animations.md) | Springs, Canvas, gestures |
| [`../compose-kotlin-agent-skills/references/10-performance.md`](../compose-kotlin-agent-skills/references/10-performance.md) | derivedStateOf, LazyColumn keys, baseline profiles |
| [`../compose-kotlin-agent-skills/references/16-coil-image.md`](../compose-kotlin-agent-skills/references/16-coil-image.md) | AsyncImage, Coil 3.4 network dep |
| [`../compose-kotlin-agent-skills/references/17-accessibility.md`](../compose-kotlin-agent-skills/references/17-accessibility.md) | Semantics, 48dp targets, WCAG |

## Edge-to-Edge (Default — AGP 9 / API 35+)

```kotlin
class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        enableEdgeToEdge()
        super.onCreate(savedInstanceState)
        setContent {
            AppTheme {
                Scaffold(
                    modifier = Modifier.fillMaxSize(),
                    contentWindowInsets = WindowInsets(0, 0, 0, 0)
                ) { innerPadding ->
                    NavHost(
                        modifier = Modifier
                            .fillMaxSize()
                            .padding(innerPadding)
                    )
                }
            }
        }
    }
}
```

- `enableEdgeToEdge()` on every `ComponentActivity`
- Respect `WindowInsets` — never hardcode status bar padding
- Use `WindowInsets.safeDrawing` for interactive content
- Test gesture nav bar + display cutout on physical device

## Composable Contract

```kotlin
@Composable
fun AccountCard(
    account: AccountUi,
    onClick: () -> Unit,
    modifier: Modifier = Modifier  // always first param after required data
) {
    Card(
        modifier = modifier
            .fillMaxWidth()
            .clip(RoundedCornerShape(12.dp))
            .clickable(onClick = onClick)
    ) {
        Text(
            text = stringResource(R.string.account_title, account.name),
            style = MaterialTheme.typography.titleMedium
        )
    }
}
```

## Recomposition Rules

1. Extract sub-composables for separate restart scopes
2. Defer scroll/animation reads: `Modifier.offset { IntOffset(...) }`
3. `@Immutable` on UiState / list wrappers passed to children
4. `remember(keys) { derivedStateOf { } }` for expensive derived values
5. Never write state in composable body after read (backwards write)

## LazyColumn Checklist

- [ ] `key = { it.id }` on every `items()`
- [ ] `contentType` when row layouts differ
- [ ] Stable lambdas: `remember(id) { { onClick(id) } }`
- [ ] No nested `verticalScroll` + `LazyColumn`
- [ ] Sort/filter in ViewModel or `remember`, not inline in `items {}`

## Anti-Patterns (Compose)

| Banned | Fix |
|--------|-----|
| Hardcoded `Text("Save")` | `stringResource(R.string.action_save)` |
| `collectAsState()` on Android | `collectAsStateWithLifecycle()` |
| `Modifier.clickable` before `padding` when touch target should exclude margin | Order: padding → clip → background → clickable |
| `items(list)` without key | `items(list, key = { it.id })` |
| Raw `fontSize = 16.sp` | `MaterialTheme.typography.bodyLarge` |

Full list: [`../compose-kotlin-agent-skills/references/00-banned-antipatterns.md`](../compose-kotlin-agent-skills/references/00-banned-antipatterns.md)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.