compose-kotlin-agent-skills
haidrrrry · haidrrrry/compose-kotlin-agent-skills
This skill set teaches AI coding agents to generate correct and high-quality Jetpack Compose and Kotlin code for Android and multiplatform apps.
Jetpack Compose & Kotlin AI agent skills for Cursor, Claude Code, Codex, Gemini & 27+ agents. Strict MVI · Kotlin 2.x K2 · Compose 2026 · CI-validated.
Preview
What you can do with it
- Generate high-quality Jetpack Compose UI components for Android applications.
- Build correct Kotlin Multiplatform Mobile (KMM) code following MVI patterns.
- Automatically fix common Kotlin/Compose coding mistakes like race conditions or leaks.
Safety check
No risky patterns found in the files we scanned.
Automated scan of the repo files. Always review code you run.
From the README
compose-kotlin-agent-skills
Make your AI coding agent actually understand Jetpack Compose & Kotlin — on Android, Kotlin Multiplatform, and Compose Multiplatform. Strict MVI · Kotlin 2.x K2 · Compose 2026 · CI-validated · 27 agents supported.
Quick install
| Agent | Command |
|---|---|
| Cursor | git clone https://github.com/haidrrrry/compose-kotlin-agent-skills.git .cursor/skills/compose-kotlin-agent-skills |
| Claude Code | git clone https://github.com/haidrrrry/compose-kotlin-agent-skills.git ~/.claude/skills/compose-kotlin-agent-skills |
| Codex CLI | git clone https://github.com/haidrrrry/compose-kotlin-agent-skills.git → add block to root AGENTS.md (guide) |
| Gemini CLI | git clone https://github.com/haidrrrry/compose-kotlin-agent-skills.git → add block to GEMINI.md (guide) |
| GitHub Copilot | git clone https://github.com/haidrrrry/compose-kotlin-agent-skills.git .github/skills/compose-kotlin-agent-skills (guide) |
Per-agent details → Setup · All 27 agents → agents/README.md
The problem
AI coding agents generate Kotlin/Compose code that compiles but gets the details wrong:
_state.value = …instead of atomic_state.update { }— race conditionscollectAsState()instead ofcollectAsStateWithLifecycle()— battery drain- Hardcoded UI strings instead of
stringResource(R.string.…)— broken localisation LazyColumnwithoutkey+contentType— broken scroll, recomposition stormsGlobalScope.launch { }inside ViewModels — leaksmutableStateListOfin ViewModel — survives config change wrong
This skill kit fixes that by giving your AI agent:
- A primary
SKILL.mdwith the 2026 toolchain, strict MVI guardrails, and a dedicated banned-antipatterns reference. - 3 modular sub-skills (architecture, Compose, testing) loaded on demand — Compose sub-skill includes REVIEW MODE for screen audits.
- 20 reference modules (00–19) covering every major Android/Kotlin topic.
- 27 per-agent install guides so Cursor, Claude Code, Codex, Copilot, Gemini, etc. each load it correctly.
- CI-validated — every
SKILL.mdis frontmatter-linted, link-checked, and registered inapi/skills.lockon every push.
What this is NOT
| Wrong guess | Reality |
|---|---|
| Android library / Gradle dependency | No — nothing to implementation(...). Pure markdown. |
| Alexa / Bixby / voice-assistant "skill" | No — not a voice platform. The word "skill" here = agentskills.io format. |
| On-device LLM runtime / tool-calling SDK | No — no model inference, no agent framework. |
| Compose UI library (coachmarks, theming, charts) | No — we don't ship Composables; we teach how to write them. |
| Backend or REST API | No — markdown files plus a Python validator. |
TL;DR: clone this repo into your agent's skills folder. The agent reads it before writing Kotlin. That's it.
What changes when you install it
| Area | Without the skill | With the skill |
|---|---|---|
| ViewModel state | _state.value = ... (race conditions) | Atomic _state.update { it.copy(...) } |
| Flow collection | collectAsState() (drains battery in background) | collectAsStateWithLifecycle() |
| UI text | Hardcoded "Login" literals | stringResource(R.string.login) |
| Lists | LazyColumn with no key | Stable key + contentType per item |
| Architecture | Mixed MVVM / state in Composable | Strict MVI — UiState + UiEvent + UiEffect |
| DI | companion object Singleton | @HiltViewModel + constructor injection |
| Navigation | String routes (deprecated) | Navigation 3 type-safe NavKey routes |
| Coroutines | GlobalScope.launch { } | viewModelScope + structured concurrency |
| Compose perf | Unstable params → constant recomposition | @Stable / @Immutable + deferred reads |
| Edge-to-edge | Status bar overlaps content | enableEdgeToEdge() + correct insets |
| Versions | Made up / outdated | Pinned to 2026 stable releases |
Platforms
| Supported | |
|---|---|
| Target (what the docs teach) | Android · Kotlin Multiplatform · Compose Multiplatform |
| Host (where the docs are read) | macOS · Linux · Windows — anywhere your AI agent runs |
| Agent compatibility | 27 install guides (see agents/README.md) |
| Languages taught | Kotlin 2.x (K2 compiler) |
| Tooling enforced | AGP 9, Compose BOM 2026, Navigation 3 |
Skill catalog
| Skill | When the agent loads it |
|---|---|
SKILL.md (root) | Any Android / Kotlin / Compose work — toolchain, MVI guardrails, banned antipatterns |
skills/android-kotlin-architecture/SKILL.md | Clean Architecture, MVVM/MVI, modules, UseCases, UiState / UiEvent / UiEffect |
skills/android-kotlin-compose/SKILL.md | Jetpack Compose UI, recomposition, Material 3, edge-to-edge, REVIEW MODE audits |
skills/android-kotlin-testing/SKILL.md | ViewModel tests, Compose UI tests, Hilt fakes, Turbine |
Full routing index → AGENTS.md
What's covered
| Topic | Reference | What the agent learns |
|---|---|---|
| Banned antipatterns | references/00-banned-antipatterns.md | Master WRONG/RIGHT lookup — load first for reviews |
| Architecture | references/01-architecture.md | Clean Arch, MVVM, MVI, module structure |
| Compose UI | references/02-compose-ui.md | Composition, stability, Modifier order, theming |
| Animations | references/03-animations.md | Springs, Canvas, gestures, shared el |