Skill Wiki v0.1.0
rule @android-compose/rule-modifier-as-first-optional-param

Modifier As First Optional Param

Every component composable that emits layout exposes a `modifier: Modifier = Modifier` parameter. It comes after all required parameters and before all other optional ones.…

Skill
@android-compose
Domain
android-compose
Version
0.1.0
Quality
4.0
Edges
2 out · 1 in
Tokens
132/304/322
$ prime install @android-compose/rule-modifier-as-first-optional-param

Projection

Always in _index.xml · the agent never has to ask for this.

ModifierAsFirstOptionalParam [rule] v0.1.0

Every component composable that emits layout exposes a modifier: Modifier = Modifier parameter. It comes after all required parameters and before all other optional ones. The modifier is applied to the ROOT element of the component's emitted layout — never to an inner child. This convention lets the caller adjust size, padding, click behaviour, semantics, or test tags from the outside without the component having to anticipate every possible adjustment.

Source

prime-system/examples/android-compose/primes/compiled/@android-compose/rule-modifier-as-first-optional-param/atom.yaml

Compiled at 2026-05-10