Agent skill

Kmp Starter Mvi

by DevAtrii in DevAtrii/Kmp-Starter-Template

How to implement MVI on the KMP Starter Template — State, Actions, Events, and the MviViewModel base class (initialState, onAction, onStateStart, emitEvent/emitEventAsync).

MITAuto-check passedDevelopment

Install Kmp Starter Mvi

skills CLI
$ npx skills add DevAtrii/Kmp-Starter-Template --skill kmp-starter-mvi -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install DevAtrii/Kmp-Starter-Template kmp-starter-mvi --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/DevAtrii/Kmp-Starter-Template.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/kmp-starter/mvi .claude/skills/kmp-starter-mvi && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
kmp-starter-mvi
GitHub stars
167
Token cost
~879 tokens
SKILL.md length
184 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

How to implement MVI on the KMP Starter Template — State, Actions, Events, and the MviViewModel base class (initialState, onAction, onStateStart, emitEvent/emitEventAsync).

  • Tasks that involve Project scaffolding
  • SKILL.md covers Shape, Key rules, Constructor params into state and Emitting events, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Kmp Starter Mvi is an agent skill from DevAtrii/Kmp-Starter-Template. How to implement MVI on the KMP Starter Template — State, Actions, Events, and the MviViewModel base class (initialState, onAction, onStateStart, emitEvent/emitEventAsync).

Its SKILL.md is about 880 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Project scaffolding. The repository describes itself as: Starter template is a multi-module KMP boilerplate for Android & iOS with clean architecture and high-quality code. It handles basics like remote config, in-app purchases, and… The licence is MIT.

When your agent uses it

  • Tasks that involve Project scaffolding

Example prompts

  • “/kmp-starter-mvi”

What it can do on your machine

Read from SKILL.md and the folder at commit a8f7b27. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Kmp Starter Mvi loads about 879 tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 184 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~879

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from DevAtrii/Kmp-Starter-Template at commit a8f7b27, republished under its MIT licence (© DevAtrii). 184 words, ~879 tokens.

Download SKILL.mdSave it as .claude/skills/kmp-starter-mvi/SKILL.md (or your agent's skills folder).
name
kmp-starter-mvi
description
How to implement MVI on the KMP Starter Template — State, Actions, Events, and the MviViewModel base class (initialState, onAction, onStateStart, emitEvent/emitEventAsync).
author
DevAtrii
license
MIT

MVI

Every ViewModel extends Starter's MviViewModel<State, Action, Event> from:

com.kmpstarter.ui_utils.viewmodels.MviViewModel

Do not write plain ViewModel classes. Always subclass MviViewModel. Each ViewModel consists of State, Actions, Events. Keep terminology exact — no Intent/Effect/Mutation.

Shape

kotlin
data class HomeState(
    val name: String = "",
    val isLoading: Boolean = false,
)

sealed class HomeAction {
    data class EnteringName(val name: String) : HomeAction()
    data object SaveButtonClicked : HomeAction()
}

sealed class HomeEvent {
    data class ShowSnackbar(val message: String) : HomeEvent()
}

class HomeViewModel : MviViewModel<HomeState, HomeAction, HomeEvent>() {
    override val initialState get() = HomeState()

    override fun onStateStart() {
        loadData()
    }

    override fun onAction(action: HomeAction) {
        when (action) {
            is HomeAction.EnteringName -> _state.update { it.copy(name = action.name) }
            HomeAction.SaveButtonClicked -> emitEventAsync(HomeEvent.ShowSnackbar("Saved!"))
        }
    }
}

Key rules

  • initialState must use get(): override val initialState get() = State(). A non-get() initializer crashes.
  • Never read SavedStateHandle inside initialState. Read it in init {}, then _state.update { ... }.
  • onAction(action) — single entry point for all user interactions; when dispatch here.
  • onStateStart() — lifecycle hook, runs when UI starts collecting state; load initial data here.
  • Update state with _state.update { it.copy(...) }.

Constructor params into state

MviViewModel supports constructor args too — do not switch to a plain ViewModel for parameterized screens.

kotlin
class NotesViewModel(private val noteId: String) : MviViewModel<NotesState, NotesAction, NotesEvent>() {
    override val initialState get() = NotesState()

    init {
        _state.update { it.copy(noteId = noteId) }
    }
}

Pass nav params via parameterOf(...) + koinViewModel { parametersOf(...) } (see koin skill).

Emitting events

Always use the functions provided by MviViewModel:

  • emitEvent(event) — suspend; use inside an existing coroutine.
  • emitEventAsync(event) — non-suspend; launches in viewModelScope. Prefer for one-offs.
  • emitEventInViewModel is deprecated (renamed to emitEventAsync).

Never hand-roll your own Channel/SharedFlow event stream — MviViewModel.uiEvents already exposes one (SharedFlow, replay = 0).

Observing events in UI

kotlin
import com.kmpstarter.ui_utils.side_effects.ObserveAsEvents

@Composable
fun HomeScreen(viewModel: HomeViewModel = koinViewModel()) {
    val state by viewModel.state.collectAsStateWithLifecycle()

    ObserveAsEvents(flow = viewModel.uiEvents) { event ->
        when (event) {
            is HomeEvent.ShowSnackbar -> SnackbarController.sendMessage(event.message)
        }
    }

    // render state, send actions
}

ObserveAsEvents is lifecycle-aware (won't fire in background); prefer it over LaunchedEffect.

Reference

features/core/presentation/.../viewmodels/OnboardingViewModel.kt is the canonical example (State/Actions/Events, Logics, EventsTracker, emitEvent).

© DevAtrii, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/kmp-starter/mvi of DevAtrii/Kmp-Starter-Template.

Open the folder on GitHubat commit a8f7b27

Compare with similar skills

Kmp Starter Mvi next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Kmp Starter Mvi compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kmp Starter Mvi this skillDevAtrii/Kmp-Starter-Template167—~879Automated safety check: PassMIT
Trellis Spec Bootstarpanjiemo/SunnyBeach1787 repos~740Automated safety check: PassApache-2.0
Design Firstgetsentry/sentry-react-native1.8k—~1.6kAutomated safety check: PassMIT
Frb Code Generationfzyzcjy/flutter_rust_bridge5.4k—~1.5kAutomated safety check: PassMIT
Project Scaffoldingaiskillstore/marketplace430—~2kAutomated safety check: PassNone
Rustc Basicsmohitmishra786/low-level-dev-skills253—~1.5kAutomated safety check: PassMIT

Similar skills

  • Trellis Spec Bootstarp

    anjiemo/SunnyBeach

    Bootstrap project-specific Trellis coding specs with a platform-neutral single-agent workflow.

    178 GitHub starsUsed in 7 repos~740 tokens
    DevelopmentAuto-check passed
  • Design First

    getsentry/sentry-react-native

    Official

    Shape non-trivial work before writing it — decide the modules, the seams, and the public API surface up front.

    1.8k GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Frb Code Generation

    fzyzcjy/flutter_rust_bridge

    A skill your agent uses when modifying Rust APIs, codegen, generated examples, or platform scaffolds in flutterrustbridge to select generation commands and preserve source-of-truth and convergence…

    5.4k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Project Scaffolding

    aiskillstore/marketplace

    IDE-grade project scaffolding wizard for creating new projects with comprehensive configuration.

    430 GitHub stars~2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Rustc Basics

    mohitmishra786/low-level-dev-skills

    Rust compiler skill for systems programming. An agent skill from mohitmishra786/low-level-dev-skills.

    253 GitHub stars~1.5k tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • Nx Generate

    nomcopter/react-mosaic

    Generate code using nx generators. An agent skill from nomcopter/react-mosaic.

    4.8k GitHub starsUsed in 7 repos~1.9k tokens
    DevelopmentAuto-check passed

More from DevAtrii/Kmp-Starter-Template

All 23 skills in this repo
  • Kmp Starter

    DevAtrii/Kmp-Starter-Template

    Build production Android & iOS apps on the KMP Starter Template (Clean Architecture, MVI, Koin, Compose Multiplatform).

    167 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Kmp Starter Memory

    DevAtrii/Kmp-Starter-Template

    Persistent per-project memory for KMP Starter Template apps.

    167 GitHub stars~963 tokensUpdated 1 mo ago
    Auto-check passed
  • Kmp Starter Architecture

    DevAtrii/Kmp-Starter-Template

    Clean Architecture module and package layout for KMP Starter Template features — data/domain/presentation layers, core dependency rule, screen-based package organization, the Screen vs Content…

    167 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Kmp Starter Create Fresh App

    DevAtrii/Kmp-Starter-Template

    Research and plan a brand-new app before scaffolding it on the KMP Starter Template.

    167 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Kmp Starter Data

    DevAtrii/Kmp-Starter-Template

    Data layer on the KMP Starter Template — repositories and data sources, Logics guidance, DataStore persistence, Room database, StarterFileManager, and the Calf file picker.

    167 GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Kmp Starter Feature Analytics

    DevAtrii/Kmp-Starter-Template

    The KMP Starter Template analytics system — AppEvent/EventsTracker, Analytics routing, Mixpanel + Firebase providers, combining providers, and runtime swaps.

    167 GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Kmp Starter Mvi

What does Kmp Starter Mvi do?

How to implement MVI on the KMP Starter Template — State, Actions, Events, and the MviViewModel base class (initialState, onAction, onStateStart, emitEvent/emitEventAsync). Kmp Starter Mvi is an agent skill from DevAtrii/Kmp-Starter-Template. How to implement MVI on the KMP Starter Template — State, Actions, Events, and the MviViewModel base class (initialState, onAction, onStateStart, emitEvent/emitEventAsync).

When should I use Kmp Starter Mvi?

Kmp Starter Mvi fits situations like: tasks that involve Project scaffolding.

How do I install Kmp Starter Mvi in Claude Code?

Run `npx skills add DevAtrii/Kmp-Starter-Template --skill kmp-starter-mvi -a claude-code`. Or copy the skill folder (.agents/skills/kmp-starter/mvi in DevAtrii/Kmp-Starter-Template) into .claude/skills/kmp-starter-mvi in your project. Claude Code loads it when a task matches its description.

How do I install Kmp Starter Mvi in Codex?

Run `npx skills add DevAtrii/Kmp-Starter-Template --skill kmp-starter-mvi -a codex`. Or copy the skill folder (.agents/skills/kmp-starter/mvi in DevAtrii/Kmp-Starter-Template) into .agents/skills/kmp-starter-mvi in your project. Codex loads it when a task matches its description.

Can I use Kmp Starter Mvi in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add DevAtrii/Kmp-Starter-Template --skill kmp-starter-mvi -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kmp-starter-mvi, .gemini/skills/kmp-starter-mvi, .github/skills/kmp-starter-mvi and .opencode/skills/kmp-starter-mvi in your project.

What does Kmp Starter Mvi need to run?

SKILL.md names no scripts, command-line tools or credentials: Kmp Starter Mvi is instructions for the agent only.

Does Kmp Starter Mvi access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Kmp Starter Mvi safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Kmp Starter Mvi use?

Kmp Starter Mvi is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Kmp Starter Mvi use?

About 879 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Kmp Starter Mvi?

Skills that share tags, products or a category with Kmp Starter Mvi: Trellis Spec Bootstarp (anjiemo/SunnyBeach, 178 stars), Design First (getsentry/sentry-react-native, 1.8k stars), Frb Code Generation (fzyzcjy/flutter_rust_bridge, 5.4k stars) and Project Scaffolding (aiskillstore/marketplace, 430 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Kmp Starter Mvi?

DevAtrii (a GitHub user) maintains it in DevAtrii/Kmp-Starter-Template, which has 167 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on September 1, 2026.

Source: DevAtrii/Kmp-Starter-Template on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.