Claude Code Android Kotlin Skill for Compose StateFlow Loading
Keep loading, success, and failure in ViewModel state and render each in Compose. Add a retry that can be verified with a controlled repository.
中文Install in Claude Code
Use Claude Code with the pinned skill and an existing Kotlin Compose project. Use its coroutine test setup.
- Get the complete `skills/android-kotlin` directory from the pinned revision.
- Copy it into the target project's `.claude/skills/` and confirm `.claude/skills/android-kotlin/SKILL.md`. Start Claude Code at the project root and describe a task matching the skill's purpose.
Example task
Design a fictional event list that fails on the first request and returns two events on retry. Describe the ViewModel states and what the screen should show.What to check
Record loading, failure, retry loading, and success with two items. Retry goes through the ViewModel's loading path.
Original SKILL.md on GitHub · Updated
Frequently asked question
Should the UI keep a separate loading flag?
Check whether the ViewModel already exposes that state. Let Compose observe it and send a retry action so two flags cannot drift.