Compose Architecture Contract
An opinionated architecture contract for Jetpack Compose / Compose Multiplatform apps covering module graph, MVI, error tiers, state ownership, Koin DI and Navigation 3.
Dev & CodingAdvanced★ 307⑂ 25AI score 9/10Last updated: Nov 8, 2026
What it does
Gives Claude a strict "house contract" to follow whenever it writes or reviews Compose / Compose Multiplatform code.
- Module graph: one-way deps
:feature:*→:data:*/:core:*; no feature-to-feature imports - MVI contract: every ViewModel extends
BaseViewModel<Action, State, Effect>;Contract.ktholds exactlyUiState/UiAction/UiEffect - Error tiers: a decision table mapping each failure (cold load, refresh, user action, background poll, 401) to inline / popup / silent / none
- State ownership: one owner per state, no
rememberSaveablemirrors, drafts inSavedStateHandle - Coroutines, DI, navigation: mandatory
launchGuarded(onError = …), Koin annotations, Navigation 3NavKeyrules - Ends with a verification checklist plus a
run-checks.shgate
Who it's for
- Teams whose Compose/KMP codebase has drifted into mixed patterns
- Leads who want AI-generated screens and ViewModels to follow one shape
- Android / Multiplatform devs on (or moving to) MVI + Koin + Navigation 3
Examples
- "Is this try/catch around the API call fine?" → answers no first, then ships the
launchGuarded(onError = …)version with a plain reason - "Navigate straight from feature A into feature B's screen" → declines the cross-feature import and implements it as a
UiEffectmapped at the composition root - PR review: reports only blocking findings such as mixed error tiers, mirrored state, or feature coupling, with severity
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/Meet-Miyani/compose-skill/HEAD/skills/compose-architecture/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on AI Skill Mart. Copy the skills/compose-architecture folder from the GitHub repo Meet-Miyani/compose-skill into my ~/.claude/skills/compose-architecture/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/Meet-Miyani/compose-skill.git /tmp/compose-skill && mkdir -p ~/.claude/skills && cp -r /tmp/compose-skill/skills/* ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/Meet-Miyani/compose-skill.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy the skills in:
cp -r compose-skill/skills/* ~/.claude/skills/(copy them all — this skill is designed to work with the siblingcompose,compose-feature,compose-ui,compose-dataskills). - Restart Claude Code and confirm
compose-architectureappears in your skill list. - Open your Compose project and try: "review the architecture of this ViewModel".
View source on GitHub ↗License: MIT