kotlin-mvi

Enforce an MVI pattern with Event, State, and Effect in Kotlin Compose projects.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/jperezdelreal/GymBro --skill kotlin-mvi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-mvi
Source: https://github.com/jperezdelreal/GymBro/tree/main/.squad/skills/android/kotlin-mvi
Command: npx skills add https://github.com/jperezdelreal/GymBro --skill kotlin-mvi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Jetpack Compose Multiplatform projects often struggle with establishing and maintaining a consistent UI architecture across targets. This skill provides a practical MVI pattern to unify events, state, and effects for Kotlin-based apps on Android and CMP.

Core Features & Use Cases

  • MVI fundamentals: Event, State, and Effect model with a single onEvent entry point.
  • Guidance for CMP and Android-specific implementations, including expect/actual patterns for shared logic and platform-specific UI.
  • Best practices for state management, testing, and incremental migration without forcing a rewrite.

Quick Start

Initialize a Kotlin Multiplatform Compose project and scaffold an MVI-based screen following this skill's guidance.

Frequently Asked Questions about kotlin-mvi

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Kotlin Compose apps with MVI for predictable state management?

Structure Kotlin Compose apps with MVI by enforcing an Event, State, and Effect model using a single onEvent entry point. StateFlow backs the state to ensure predictable state management and clear event handling across Android and Compose Multiplatform targets.

What is the best way to unify architecture across Android and Compose Multiplatform projects?

Unify architecture across Android and Compose Multiplatform projects by applying a consistent MVI pattern. This approach enforces cross-target logic sharing using expect/actual patterns or interfaces for platform-aware dependency handling, ensuring a unified UI architecture.

Can I use MVI with Compose Multiplatform for shared logic without a full rewrite?

Yes, you can use MVI with Compose Multiplatform without a full rewrite. The pattern supports incremental migration, allowing you to gradually adopt the Event, State, and Effect model into existing codebases while maintaining shared logic across platforms.

How do I handle platform-specific dependencies in Kotlin Multiplatform MVI implementations?

Handle platform-specific dependencies in Kotlin Multiplatform MVI implementations using expect/actual patterns or interfaces. This platform-aware dependency handling allows shared MVI logic to interact with platform-specific UI and services seamlessly across Android and CMP targets.

Does this MVI pattern use StateFlow for state management in Jetpack Compose?

Yes, this MVI pattern uses StateFlow-backed state for state management in Jetpack Compose. Combined with a single onEvent entry point for event handling, it provides predictable state emission and clear unidirectional data flow for UI components.

What are the limitations of using MVI architecture in Compose Multiplatform projects?

MVI architecture in Compose Multiplatform requires strict adherence to unidirectional data flow and defining Event, State, and Effect models for each screen. This introduces boilerplate and may complicate simple UI tasks compared to lighter state management approaches.