# compose

Adopt this skill: https://proskills.md/skills/other/meet-miyani-compose-skill-skills-compose

Page: https://proskills.md/skills/other/meet-miyani-compose-skill-skills-compose
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: skills/compose/SKILL.md
size: 5522
upstream: https://github.com/meet-miyani/compose-skill/blob/main/skills/compose/SKILL.md

```text
---
name: compose
description: >-
  Use this skill first for any Jetpack Compose or Compose Multiplatform task: a new feature or screen, a change to existing code, a bug fix, a review, making code follow the kit, project or build setup, or a question. It picks the task path and the exact kit files to read. Not for Kotlin work outside a Compose or CMP app.
---

# Compose

## Every task

- Verify before claiming done: run the checks named by the task path and report their result.
- Make the smallest correct change; keep what works.
- Explain the result in plain engineering reasons.
- Build from the context you have; state assumptions.
- Open only the files the tree names for your task kind and areas; open another reference only when a check fails or a named file sends you there.

## Question 0: Is the task clear enough to act?

- Look in the prompt, then the code.
  - Clear enough: continue to Question 1.
  - A missing answer changes what gets built: ask at most 3 questions, each with a stated default.
  - No human can answer (CI or headless): proceed and list the assumptions.
- In a kit project, never ask how the architecture should look.

## Question 1: What kind of task is it?

- New feature or screen → 1. If adding to an existing project, use the `../compose-architecture/references/existing-projects.md` Choose tree; 2. read `../compose-feature/SKILL.md` as the main area; 3. scaffold with its new-feature script when applicable; 4. choose each area in Question 2; 5. run the feature checks and tests.
- Change to existing code → 1. Find the affected code; 2. use the `../compose-architecture/references/existing-projects.md` Choose tree and keep its coherent pattern; 3. read the owning topic skill from Question 2; 4. make the smallest change; 5. run its checks and affected tests. Change only what the request names; list related gaps as follow-ups.
- Bug fix → 1. Use the `../compose-architecture/references/existing-projects.md` Choose tree; 2. write a failing test that reproduces the bug using `../compose-feature/references/testing.md`; 3. read only the affected area in Question 2; 4. make the smallest fix; 5. show the test passing and run affected checks.
- Review only → 1. Use the `../compose-architecture/references/existing-projects.md` Choose tree; 2. read `../compose-feature/references/review-mode.md` for severity; 3. inspect only the relevant area in Question 2; 4. report findings and what is sound; 5. make no edits.
- Conform or fix after review → 1. Restructure only: keep behaviour, visible UI, navigation, persistence and public APIs exactly as they are; 2. do not add screens, controls, wiring, saved state or features the existing code lacks; list them as follow-ups in the answer; 3. when changing a constructor or signature, update every caller and test in the same change; 4. run the existing tests before and after; both runs must pass; 5. run the guards. Use the `../compose-architecture/references/existing-projects.md` Choose tree and `../compose-feature/references/review-mode.md` for severity.
- Project, module or build setup → 1. For existing code, use the `../compose-architecture/references/existing-projects.md` Choose tree; 2. read `../compose-project/SKILL.md`; 3. choose the build area in Question 2; 4. make the change; 5. run project checks and affected build/tests.
- Question or explanation → 1. For existing code, use the `../compose-architecture/references/existing-projects.md` Choose tree; 2. identify the area in Question 2; 3. read only the file holding the fact; 4. answer with evidence and state any uncertainty.

## Question 2: Which area does it touch?

Read the area's SKILL.md only for the task's main area; for every other area, read only its one reference.

- UI → `../compose-ui/references/ux-states.md`; if this is the task's main area, also `../compose-ui/SKILL.md`.
- State and lifetime → `../compose-architecture/references/state-ownership.md`; if this is the task's main area, also `../compose-architecture/SKILL.md`.
- Errors → `../compose-architecture/references/error-handling.md`; if this is the task's main area, also `../compose-architecture/SKILL.md`.
- Navigation → `../compose-architecture/references/navigation.md`; if this is the task's main area, also `../compose-architecture/SKILL.md`.
- Data storage → `../compose-data/references/datastore.md`; if this is the task's main area, also `../compose-data/SKILL.md`.
- Network → `../compose-data/references/networking-ktor.md`; if this is the task's main area, also `../compose-data/SKILL.md`.
- Paging → `../compose-data/references/paging.md`; if this is the task's main area, also `../compose-data/SKILL.md`.
- DI and modules → `../compose-architecture/references/dependency-injection.md`; if this is the task's main area, also `../compose-architecture/SKILL.md`.
- Platform / iOS / desktop → `../compose-platform/references/sharing-and-bridges.md`; if this is the task's main area, also `../compose-platform/SKILL.md`.
- Notifications and background work → `../compose-platform/references/notifications-and-background-work.md`; if this is the task's main area, also `../compose-platform/SKILL.md`.
- Build and Gradle → `../compose-project/references/convention-plugins.md`; if this is the task's main area, also `../compose-project/SKILL.md`.
- Testing → `../compose-feature/references/testing.md`; if this is the task's main area, also `../compose-feature/SKILL.md`.

Not covered here → use judgement and state the assumption.
```

## File: README.md
upstream: https://github.com/meet-miyani/compose-skill/blob/main/README.md

````text
<div align="center">

# Compose Skill (Compose Kit)

**A Compose skill for AI coding agents: seven agent skills that make Claude Code, Codex, Cursor, Copilot and Gemini
write better Jetpack Compose and Compose Multiplatform code.**<br>
One consistent house style, measured on seven models in real agent CLIs.

[![Release](https://img.shields.io/github/v/release/Meet-Miyani/compose-skill?label=release&color=2a78d6)](https://github.com/Meet-Miyani/compose-skill/releases)
[![CI](https://github.com/Meet-Miyani/compose-skill/actions/workflows/ci.yml/badge.svg)](https://github.com/Meet-Miyani/compose-skill/actions/workflows/ci.yml)
[![License](https://img.shields.io/github/license/Meet-Miyani/compose-skill?color=52514e)](LICENSE)
[![Website](https://img.shields.io/badge/website-compose.avinya.dev-ee3a20)](https://compose.avinya.dev)
[![Skills](https://img.shields.io/badge/skills-7-2a78d6)](#whats-inside)
[![v6 test](https://img.shields.io/badge/v6%20test-90%20%2B%2036%20agentic%20runs-2a78d6)](#results-v61)
[![Guard tests](https://img.shields.io/badge/guard%20tests-90%20passing-0ca30c)](tests/skills)
[![v6.1 A/B](https://img.shields.io/badge/v6.1%20A%2FB-stable-0ca30c)](#results-v61)

**Works with** Claude Code · Codex · Cursor · OpenCode · Copilot · Gemini CLI · Antigravity · Android Studio

**Website:** [compose.avinya.dev](https://compose.avinya.dev) · [Install guides per agent](https://compose.avinya.dev/install/) · [Results](https://compose.avinya.dev/results/)

</div>

<table>
<tr>
<td align="center" width="25%"><h2>+30.8</h2>points for<br><b>Gemini 3.8 Flash</b><br>with the v6.1 kit (v6 test)</td>
<td align="center" width="25%"><h2>+23.1</h2>points for<br><b>GPT-6-Luna</b><br>with the v6.1 kit (v6 test)</td>
<td align="center" width="25%"><h2>97.4%</h2>of rubric items for<br><b>DeepSeek V4.1 Flash</b><br>with v6.1 (cheap add-on model)</td>
<td align="center" width="25%"><h2>90 + 36</h2>agentic runs (panel + add-ons);<br>2 blind graders must agree on every item</td>
</tr>
</table>

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="docs/assets/v6-models-dark.svg">
    <img alt="v6 test: rubric score without the kit, with the v6.0 kit and with the v6.1 kit, as percent of 39 items, for seven models, sorted by lift. Gemini 3.8 Flash 56.4%, 84.6%, 87.2% (+30.8). GPT-6-Luna 71.8%, 89.7%, 94.9% (+23.1). DeepSeek V4.1 Flash 82.1%, 89.7%, 97.4% (+15.4). DeepSeek V4 Pro 74.4%, 76.9%, 87.2% (+12.8). GPT-6-Sol 76.9%, 87.2%, 87.2% (+10.3). Sonnet 5.5 79.5%, 89.7%, 87.2% (+7.7). Muse Spark 1.3 69.2%, 69.2%, 74.4% (+5.1). The two DeepSeek models are add-ons graded by Claude and GPT, so compare across groups with care." src="docs/assets/v6-models-light.svg" width="760">
  </picture>
</p>

## What we achieved

- **Held-out v5 (120 agentic runs):** the kit lifted Gemini 3.8 Flash by +25.6 points and Sonnet 5.5 by +18.6, and
  the test found a real flaw: on a "match our conventions" task, models restructured too much with the kit
  ([results](#results-held-out-v5)).
- **v6.0.0-preview.1 (2026-10-01):** seven skills, one entry tree, four install channels.
- **Website live (2026-10-02):** [compose.avinya.dev](https://compose.avinya.dev), with install guides per agent and a
  build check that every number on it appears in the evidence files.
- **v6 A/B (90 agentic runs):** v6.0 vs the v6.1 fixes vs no kit. The "no new UI controls, screens or features" item
  on conform tasks went from 2 of 10 cells (v6.0) to 8 of 10 (v6.1), and every pre-registered rule held
  ([results](#results-v61)).
- **v6.1.0 stable (2026-10-05):** no model scored below its own no-kit result, so it is released as stable. v6.1.1
  (2026-10-11) fixes a guard-script security issue. v6.2.0 (2026-10-23) adds
  adaptive-layout guidance (screens follow the window size class, never the device) and more guard fixes. v6.3.0
  (2026-11-08), the GitHub "Latest" release, asks agents to run a visible change and look at it before calling it done.
- **Cheap models (36 add-on runs):** DeepSeek V4.1 Flash went from 82.1% to 97.4% of items with v6.1, and DeepSeek
  V4 Pro from 74.4% to 87.2% ([results](#add-ons-cheap-deepseek-models)).

## Why

AI agents write Compose that compiles and then drifts: state ends up in the wrong place, every screen gets its own
pattern, error handling changes from file to file, and reviews flag perfectly fine code as blocking. Compose Kit gives
the agent one house style plus the reasoning behind it, and only loads the parts the current task needs.

- **One consistent style:** MVI on a shared `BaseViewModel` contract, Koin annotations, Navigation 3,
  feature-owned data/domain/presentation layers, and typed error handling.
- **Progressive loading:** a ~1.3k-token entry tree picks the task path and the exact reference files. The full kit
  is about 127k tokens; in the v5 test, 35 of 40 kit runs loaded under 20k.
- **Respects your project:** in a coherent existing codebase (Hilt, MVVM, Navigation 2, your own base class), the
  kit follows your pattern and proposes migration separately.
- **Checked, not trusted:** 11 shell guard scripts catch drift in CI, backed by 90 fixture tests.

## What's inside

| Skill | What it owns |
|---|---|
| **`compose`** | The entry decision tree (~1.3k tokens): task kind → affected area → exact reference files |
| `compose-architecture` | Module graph, MVI/`BaseViewModel` contract, error tiers, state ownership, naming, Koin DI, Navigation 3, coroutines |
| `compose-feature` | A screen or feature slice end to end: contract, ViewModel, UI, navigation, DI and tests; run and see; review mode |
| `compose-ui` | Composables: Route/Screen split, stability, loading/empty/error states, lists, animation, accessibility, resources, adaptive layouts |
| `compose-data` | Repositories, Ktor, Room, DataStore, Paging 3, offline-first, data-layer tests |
| `compose-project` | New projects, adopting the kit, modules, convention plugins, version catalog, CI and agent hooks |
| `compose-platform` | `commonMain` vs `expect`/`actual`, iOS/Swift interop, desktop and web targets, platform lifecycle |

Also included: project and feature templates, and the guard scripts (`compose-architecture/scripts/`).

## How it works

```mermaid
flowchart TD
    P["Your prompt"] --> E["compose entry tree · ~1.3k tokens"]
    E --> K{"What kind of task?<br/>new feature · change · bug fix · review<br/>conform · setup · question"}
    K --> A{"Which areas does it touch?<br/>architecture · feature · ui<br/>data · project · platform"}
    A --> F["Load one reference file per affected area"]
    F --> C["Code in the house style"]
```

## Install

Install all seven skills. `compose` is the entry point, and it hands each task to the other six. Step-by-step pages
for each agent are on the website: [Claude Code](https://compose.avinya.dev/install/claude-code/),
[Codex](https://compose.avinya.dev/install/codex/), [Cursor](https://compose.avinya.dev/install/cursor/),
[GitHub Copilot](https://compose.avinya.dev/install/github-copilot/),
[Gemini CLI and Antigravity](https://compose.avinya.dev/install/gemini-cli-and-antigravity/),
[OpenCode](https://compose.avinya.dev/install/opencode/).

Every option below can install for **one project** (lives in the repo, so your team gets it too) or **globally** (for
you, in every project on your machine).

### npx skills

Needs Node 22.20+. Works with Claude Code, Codex, Cursor, OpenCode, Copilot, Gemini CLI, Antigravity and 70+ other agents.

```sh
# This project only (run it in the repo root)
npx skills add Meet-Miyani/compose-skill --skill '*' -a claude-code

# Globally, for every project
npx skills add Meet-Miyani/compose-skill --skill '*' -a claude-code -g
```

Swap `claude-code` for your agent: `codex`, `cursor`, `opencode`, `github-copilot`, `gemini-cli`, `antigravity`. Repeat
`-a` to install for several at once. Leave it out and you get an interactive picker.

| Agent | This project | Global |
|---|---|---|
| Claude Code | `.claude/
````
