hieudoanm/hieudoanm.github.io/compose
Claude Code and agent skill by hieudoanm/hieudoanm.github.io
- community
Checking that the SKILL.md file is still in the repository.
Best practices for building desktop UIs with Compose Multiplatform (Kotlin). Use when writing, structuring, styling, or reviewing a Compose app — covers Gradle setup, theming and design tokens, state and recomposition, side effects, lists and performance, desktop windows, accessibility, and testing, with suggested values.
Install
npx vskill@latest install hieudoanm/hieudoanm.github.io/composeSKILL.md
The same SKILL.md was published earlier as hieudoanm/hieudoanm.github.io/compose.
Compose Multiplatform Best Practices
Compose replaces the widget tree with a function tree: you describe what the UI should look like for the current state, and the runtime recomposes what changed. Best practice here is state-first, token-driven, side-effect-free composition — hoist state out of composables, consume design tokens instead of literal values, and keep the composable body a pure function of its parameters.
This document is written against Kotlin 2.4+ / Compose 1.12+ and includes concrete values you can drop straight into code.
When to use
Use when writing, structuring, styling, or reviewing a Compose app.
Prerequisites
- Basic familiarity with Kotlin and the project conventions.
- For implementation, access to the relevant source code and development environment.
Scope boundary
- When the project does not use this technology or pattern, or the task falls outside its scope; follow the project’s existing stack and conventions.
Essential checks
- Stateless by default, stateful at the edge — hoist to one owner, pass down, emit events up
- Reducers own the logic; composables own the pixels. If a rule is testable without Compose, it belongs outside Compose
- Tokens, not literals — color, type, shape, spacing defined once and consumed by role
- Immutable state plus a single event type — exhaustive, reviewable, skippable
- Effects for anything asynchronous or external; the body stays pure.
- Stable keys on every list item; extract rows into leaf composables.
- Prefer M3 components over hand-rolled visuals — they bring theming, states, and accessibility for free
- [ ] google() in both pluginManagement and dependencyResolutionManagement
Focus areas
- 1. Core Stack & Gradle Setup
- 2. Theming: Define Tokens Once, Consume by Role
- 3. Spacing & Layout: Use the 4dp Grid
- 4. State & Recomposition — The Core Discipline
- 5. Side Effects & Lifecycle
- 6. Lists & Performance
- 7. Desktop Windows
- 8. Accessibility
- 9. Testing
- 10. Common Pitfalls
Detailed references
Related materials
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.skills/programming/languages/kotlin/ui/compose/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hieudoanm/hieudoanm.github.io/compose)