Compose Architecture Contract
Architecture guardrails for Jetpack Compose / Compose Multiplatform apps: module graph, MVI contract, error tiers and state ownership.
What it does
Defines the house contract Claude must follow when writing or reviewing Compose / Compose Multiplatform code.
- Module graph: one-way
:feature:*→:data:*/:core:*dependencies; no feature-to-feature imports - MVI contract: every ViewModel extends
BaseViewModel<Action, State, Effect>;Contract.ktholds exactlyUiState,UiAction,UiEffect - Error tiers: cold-load failure is inline with Retry, refresh failure is a popup, silent only for named background polls
- State ownership: one owner per piece of state, no
rememberSaveablemirrors, drafts live inSavedStateHandle - DI & navigation: Koin annotations flavour, Navigation 3 only with per-feature sealed
NavKey - Verification gates: run-checks script exits 0, modules compile, JVM tests pass, banned patterns self-audited
A "when NOT to use" table routes screen work to compose-feature, composables to compose-ui, repositories to compose-data, and so on.
Who it's for
- Teams running multi-module Compose or KMP apps
- Tech leads who want AI-generated code to stop drifting into a new pattern every session
- Projects already standardised on MVI + Koin + Navigation 3
Examples
- Adding a ViewModel — you get a single
onActionentry point and all async work routed throughlaunchGuarded(onError = …). - Asking for a PR review — cross-feature imports, hand-rolled
try/catch,Resultwrappers and mixed error tiers come back as blocking items. - Asking to "drop one MVI screen into this MVVM feature" — the skill declines in one plain sentence, builds in the feature's existing pattern, and proposes migration separately.
· · · 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 Claude 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 across:
cp -r compose-skill/skills/* ~/.claude/skills/— copy all of them, since this skill expects thecomposeentry point plus siblings likecompose-featureandcompose-ui. - Confirm the
references/andtemplates/core/folders came along. - Restart Claude Code and try: "Review this ViewModel against the Compose architecture contract."