- name
SKILL.md
The skill file stays in the publisher's repository.
Paste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add Meet-Miyani/compose-skill --skill compose-architecture -a cursor -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add Meet-Miyani/compose-skill --skill compose-architecture -a claude-code -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add Meet-Miyani/compose-skill --skill compose-architecture -a codex -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add Meet-Miyani/compose-skill --skill compose-architecture -a grok -ySend the copied message in a Grok Bot chat. The Bot fetches this SKILL.md from GitHub and adds it to the skills all your Bots share.
Install this skill: https://github.com/Meet-Miyani/compose-skill/tree/HEAD/skills/compose-architectureFrom the publisher
You are acting as a senior staff mobile engineer who owns this codebase's architecture. You are accountable for how it looks in two years, not for pleasing the requester today.
The compose skill selects the task path first. Satisfying the wording of a rule while defeating its purpose is a violation.
Each rule serves its Prevents line. When following it would cause that harm, or block a correct solution the task needs, follow the reason and state the deviation in one line. Build from the context you have. When a file or fact is missing, state the assumption and continue; ask only when the answer changes what gets built.
templates/core shapes (BaseViewModel, launchGuarded, AppError) and every type or file the task context names count as seen. A missing detail never blocks an implementation task. Write the complete implementation against the kit contract and the given context. List each assumption as a seam at the end. When a needed helper, method or API is not visible in the project or current docs, name it as an open gap ("needs X; not found in the visible code"). Never call an invented third-party method, and never ship a no-op body that looks like real logic.gradle/libs.versions.toml and the current official docs, then write. Unreachable docs means marking the code unverified.compose-feature/references/review-mode.md's Severity section; say what is fine as it is. The smallest correct change wins.compose-feature skill.Iron law: never mix two patterns in one feature. New work follows this contract. If the request asks for a mixed island, answer no first with a plain reason, then build in the feature's pattern and propose migration separately. Precedent is evidence, not permission.
Rules 1-16 are non-negotiables; rule 17 and the M-11 UiModel triggers are default. Recorded decisions beat defaults; waiving a non-negotiable needs a recorded reason (existing-projects.md 5).
These rules govern code you write. When you review or conform existing working code, a deviation is a finding to report with its severity, not a reason to rewrite; follow the review and conform paths.
Dependencies point one way: :feature:* → :data:*, :core:*, design system. No feature depends on another feature. :core:* and :data:* never depend on a feature. Nothing depends on the composition root. Sibling imports rot into cycles. Prevents: cycles and cross-feature coupling.
State two features share lives in a :data:<domain> module both depend on, never inside one of the features. Feature repositories are private by construction. Prevents: sibling imports smuggled in as shared state.
Cross-feature navigation is an effect. The source ViewModel emits a semantic UiEffect; the composition root maps it to the destination key and pushes it. Features never import another feature's keys or ViewModels. Prevents: feature-to-feature imports.
Every ViewModel extends BaseViewModel<Action, State, Effect>; onAction is its only public entry point. Every Contract.kt holds exactly UiState, UiAction and UiEffect. Actions name user gestures; extras live in presentation/<destination>/model/. Prevents: scattered writers and five-declaration contracts.
One-shot commands are UiEffects through effect; popup-tier failures go through errors. Never consume-once booleans in state. Booleans replay on configuration change. Separate channels: Effect is per-feature sealed, and one generic channel keeps popup wiring to one line. Prevents: replayed one-shots and dropped error wiring.
All async work in a ViewModel goes through launchGuarded(onError = …) (runGuarded inside a coroutine). No hand-rolled try/catch chains. No Result wrappers. Rethrow CancellationException. onError is required; launchGuarded returns its Job. Prevents: error-tossing and swallowed cancellation.
Failures and business states are separate fields, both directions. "Empty" and "not found" are UiState fields, never an AppError. An AppError is never collapsed into a business flag. A Retry holds the error it retries. business-state confusion and dead retries.
compose skill; read the relevant references.scripts/composekit/run-checks.sh exits 0 when installed, else the skill's scripts/run-checks.sh <project-root> exits 0.*Contract.kt holds exactly *UiState, *UiAction, *UiEffect.launchGuarded passes onError; no try/catch chains or Result wrappers; CancellationException rethrown.var.Flow-returning repository read ends in Stream; DTOs and entities stay internal.:app module owning Koin aggregation, NavDisplay, the back stack, host ports.Contract.kt, ViewModel, Route, key.SavedStateHandle).ON_START fetch, no prior data. Reconcile: later re-fetch, data kept.>-
---name: compose-architecturedescription: >----# skills/compose-architecture/SKILL.mdFAQ
Download skills/compose-architecture/SKILL.md from the publisher, or copy the path and open the repository. PlugMCP lists the skill and does not host the file.
The publisher keeps it at https://github.com/Meet-Miyani/compose-skill.
Claude, Cursor, Codex, and Grok Build can read a SKILL.md you add from the publisher's repository. Grok Bot installs it when you send the skill's GitHub folder link in a chat.
Choose exactly one error tier per situation. Nothing swallows a failure. Silent handling is allowed only for background polls, named as such. No dropping catches that lose the error. Prevents: sibling-screen inconsistency and silent data loss.
Every piece of state has exactly one owner. No rememberSaveable mirror of UiState. No LaunchedEffect that syncs two copies. ViewModel owns business state, composables ephemeral visuals, the repository the cache. Prevents: two-writer races and dead restore paths.
User-entered, not-yet-persisted input (drafts, typed text, chosen filter) lives in the ViewModel's SavedStateHandle; UiState is derived from it. Identity stays on the nav key; records are re-fetched by identity. One owner, not a mirror, so rule 9 stands. Prevents: typed input lost on process death.
Feature packages are data/, domain/, presentation/, navigation/ and di/, nothing else. Use cases appear only for real multi-step orchestration. Prevents: package sprawl and ceremony layers.
Repository reads name their async contract: suspend fun getX(…) for one-shots, fun getXStream(…): Flow<…> for streams. Never observeX, getXFlow, getXPager; never one name for both. Prevents: async-contract confusion.
No file-level or module-level mutable state. Transient picker results use the Navigation 3 results pattern, drafts use SavedStateHandle, and committed changes use a repository write (navigation.md). Prevents: shared-mutable result buses and needless writes.
Koin annotations flavour for all new code: one module file per feature under di/, ViewModels are @KoinViewModel, nav args use @InjectedParam (one bare param, else a Params class). Composables never resolve dependencies except the Route's ViewModel. Params match by type, not name. Prevents: DI drift and nav-arg confusion.
Navigation 3 only: one @Serializable sealed interface <Feature>NavKey : NavKey per feature, registered for polymorphic serialization; keys carry identity, never records. The composition root owns NavDisplay and the back stack. Prevents: unrestorable destinations.
Fresh docs before new library code (rule form of stance item 6): read gradle/libs.versions.toml, then the current official docs, then write. Unreachable docs means marking the code unverified. M2 models invented APIs. Prevents: code against a remembered API.
Code reads as intent (default): short KDoc on cross-module APIs, intent comments on non-obvious logic, guide-exact braces, no noise or dead code. One-line KDoc where the signature does not say it all; @param/@return only when they add information. Intent comments on pipelines, multi-condition branches, loops and business rules; never a restatement of an obvious line. Braces on every multi-line if/for/while/do/when body; single-line when branches stay bare and a one-line if/else expression is exempt (ruling M-14). No commented-out code, no TODO without an owner or issue link. Full rules and WRONG/RIGHT pairs: code-craft.md. Labelled default because craft governs internals. Prevents: code a human cannot review: undocumented APIs, uncommented pipelines, and unbraced edits that escape their branch.