mvi-activity

Implement MVI architecture for Android Activities with Jetpack Compose.

1|1|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/maichanchinh/claude-skills --skill mvi-activity
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mvi-activity
Source: https://github.com/maichanchinh/claude-skills/tree/main/skills/mvi-activity
Command: npx skills add https://github.com/maichanchinh/claude-skills --skill mvi-activity

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) and references (resource) components.

What problem does it solve?

This Skill provides a robust template and guidance for implementing the Model-View-Intent (MVI) architectural pattern in Android Activities using Jetpack Compose, ensuring clear separation of concerns and predictable state management.

Core Features & Use Cases

  • MVI Pattern Implementation: Structure Android Activities with distinct layers for UI, state, actions, and events.
  • Jetpack Compose Integration: Build declarative UIs that react to immutable state changes.
  • State Management: Utilize StateFlow for UI state and SharedFlow for one-time events (navigation, messages).
  • Use Case: When creating a new feature screen in an Android app that requires complex user interactions and dynamic data display, use this Skill to scaffold the Activity, Screen, and ViewModel following MVI best practices.

Quick Start

Use the mvi-activity skill to generate the boilerplate code for a new Android Activity screen following the MVI pattern with Jetpack Compose.

Frequently Asked Questions about mvi-activity

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

FAQPage Schema
How do I implement MVI architecture in an Android Activity using Jetpack Compose?

To implement MVI architecture with Jetpack Compose, structure your Android Activity using sealed classes for actions and events, and leverage StateFlow and SharedFlow to manage UI state and side effects. This separates Activity, Screen, and ViewModel components for maintainable declarative UIs.

What is the best way to manage state and side effects in a Compose-based MVI screen?

The best way to manage state in MVI is using StateFlow for immutable UI state and SharedFlow for one-time side effects like navigation or messages. This ensures predictable state changes and clear separation of concerns in Jetpack Compose.

When should I use the MVI pattern for my Android app's screens?

You should use the MVI pattern when creating a new feature screen with complex user interactions and dynamic data display. It provides a robust template for predictable state management and enforces a clear separation between UI, state, actions, and events.

Can I scaffold a new Android feature screen with MVI without writing boilerplate code manually?

Yes, you can scaffold a new Android feature screen without manual boilerplate. This Skill generates the initial Activity, Screen, and ViewModel code following MVI best practices, establishing the StateFlow and SharedFlow setup for immediate development.

Does MVI architecture work well with Jetpack Compose's declarative UI model?

MVI architecture works exceptionally well with Jetpack Compose because it relies on immutable state objects. Compose UIs react directly to these state changes via StateFlow, creating a unidirectional data flow that naturally fits the declarative UI paradigm.

What are the limitations of using sealed classes for actions and events in Android MVI?

Using sealed classes for actions and events in Android MVI requires defining all possible state variations upfront, which can increase code verbosity for highly dynamic screens. However, it guarantees type safety and exhaustive state handling at compile time.