ui-ux-pro-max-skill/cli/assets/data/stacks/jetpack-compose.csv
Viet Tran a38d04c3d5
feat(search): overhaul relevance and curated design data
Overhaul BM25 relevance, reasoning and data-quality contracts; refresh UI styles and framework guidance; add resilient text, chip, badge and micro-interaction guidance; strengthen release, provenance and catalog refresh gates; update bilingual documentation.
2026-08-14 00:08:23 +07:00

12 KiB

1NoCategoryGuidelineDescriptionDoDon'tCode GoodCode BadSeverityDocs URLApplies ToStatusVerified At
21ComposablePure UI composablesComposable functions should only render UIAccept state and callbacksCalling usecase/repoPure UI composableBusiness logic in UIHighhttps://developer.android.com/jetpack/compose/mental-modeljetpack-compose 1.11.4 (current stable)active2026-08-13
32ComposableSmall composablesEach composable has single responsibilitySplit into componentsHuge composableReusable UIMonolithic UIMediumjetpack-compose 1.11.4 (current stable)active2026-08-13
43ComposableStateless by defaultPrefer stateless composablesHoist stateLocal mutable stateStateless UIHidden stateHighhttps://developer.android.com/jetpack/compose/state#state-hoistingjetpack-compose 1.11.4 (current stable)active2026-08-13
54StateSingle source of truthUI state comes from one sourceStateFlow from VMMultiple statesUnified UiStateScattered stateHighhttps://developer.android.com/topic/architecture/ui-layerjetpack-compose 1.11.4 (current stable)active2026-08-13
65StateModel UI StateUse sealed interface/data classUiState.LoadingBoolean flagsExplicit stateFlag hellHighhttps://developer.android.com/topic/architecture/ui-layer#define-ui-statejetpack-compose 1.11.4 (current stable)active2026-08-13
76Stateremember only UI stateremember for UI-only stateScroll, animationBusiness stateCorrect rememberMisuse rememberHighhttps://developer.android.com/jetpack/compose/statejetpack-compose 1.11.4 (current stable)active2026-08-13
87StaterememberSaveablePersist state across configrememberSaveablerememberState survivesState lostHighhttps://developer.android.com/jetpack/compose/state#restore-ui-statejetpack-compose 1.11.4 (current stable)active2026-08-13
98StatederivedStateOfOptimize recompositionderivedStateOfRecompute alwaysOptimizedJankMediumhttps://developer.android.com/jetpack/compose/performancejetpack-compose 1.11.4 (current stable)active2026-08-13
109SideEffectLaunchedEffect keysUse correct keysLaunchedEffect(id)LaunchedEffect(Unit)Scoped effectInfinite loopHighhttps://developer.android.com/jetpack/compose/side-effectsjetpack-compose 1.11.4 (current stable)active2026-08-13
1110SideEffectrememberUpdatedStateAvoid stale lambdasrememberUpdatedStateCapture directlySafe callbackStale stateMediumhttps://developer.android.com/jetpack/compose/side-effectsjetpack-compose 1.11.4 (current stable)active2026-08-13
1211SideEffectDisposableEffectClean up resourcesonDisposeNo cleanupNo leakMemory leakHighhttps://developer.android.com/develop/ui/compose/side-effects#disposableeffectjetpack-compose 1.11.4 (current stable)active2026-08-13
1312ArchitectureUnidirectional data flowUI → VM → StateonEventTwo-way bindingPredictable flowHard debugHighhttps://developer.android.com/topic/architecturejetpack-compose 1.11.4 (current stable)active2026-08-13
1413ArchitectureNo business logic in UILogic belongs to VMCollect stateCall repoClean UIFat UIHighhttps://developer.android.com/topic/architecture/recommendations#separation-of-concernsjetpack-compose 1.11.4 (current stable)active2026-08-13
1514ArchitectureExpose immutable stateExpose StateFlowasStateFlowMutable exposedSafe APIState mutationHighhttps://developer.android.com/kotlin/flow/stateflow-and-sharedflow#stateflowjetpack-compose 1.11.4 (current stable)active2026-08-13
1615LifecycleLifecycle-aware collectUse collectAsStateWithLifecycleLifecycle awarecollectAsStateNo leakLeakHighhttps://developer.android.com/reference/kotlin/androidx/lifecycle/compose/collectAsStateWithLifecycle.composablejetpack-compose 1.11.4 (current stable)active2026-08-13
1716NavigationEvent-based navigationVM emits navigation eventVM: Channel + receiveAsFlow(), V: Collect with Dispatchers.Main.immediateNav in UIDecoupled navUsing State / SharedFlow for navigation -> event is replayed and navigation fires again (StateFlow)Highhttps://developer.android.com/jetpack/compose/navigationjetpack-compose 1.11.4 (current stable)active2026-08-13
1817NavigationTyped routesUse sealed routessealed class RouteString routesType-safeRuntime crashMediumjetpack-compose 1.11.4 (current stable)active2026-08-13
1918PerformanceStable parametersPrefer immutable/stable params@ImmutableMutable paramsStable recompositionExtra recompositionHighhttps://developer.android.com/jetpack/compose/performancejetpack-compose 1.11.4 (current stable)active2026-08-13
2019PerformanceUse key in LazyProvide stable keyskey=idNo keyStable listItem jumpHighhttps://developer.android.com/develop/ui/compose/lists#item-keysjetpack-compose 1.11.4 (current stable)active2026-08-13
2120PerformanceAvoid heavy workNo heavy computation in UIPrecompute in VMCompute in UISmooth UIJankHighhttps://developer.android.com/develop/ui/compose/performance/bestpractices#use-rememberjetpack-compose 1.11.4 (current stable)active2026-08-13
2221PerformanceRemember expensive objectsremember heavy objectsrememberRecreate each recompositionEfficientWastefulMediumjetpack-compose 1.11.4 (current stable)active2026-08-13
2322ThemingDesign systemCentralized themeMaterial3 tokensHardcoded valuesConsistent UIInconsistentHighhttps://developer.android.com/jetpack/compose/themesjetpack-compose 1.11.4 (current stable)active2026-08-13
2423ThemingDark mode supportTheme-based colorscolorSchemeFixed colorAdaptive UIBroken darkMediumjetpack-compose 1.11.4 (current stable)active2026-08-13
2524LayoutPrefer Modifier over extra layoutsUse Modifier to adjust layout instead of adding wrapper composablesUse Modifier.padding()Wrap content with extra BoxPadding via modifierBox just for paddingHighhttps://developer.android.com/jetpack/compose/modifiersjetpack-compose 1.11.4 (current stable)active2026-08-13
2625LayoutAvoid deep layout nestingDeep layout trees increase measure & layout costKeep layout flatBox ? Column ? Box ? RowFlat hierarchyDeep nested treeHighhttps://developer.android.com/develop/ui/compose/layouts/basicsjetpack-compose 1.11.4 (current stable)active2026-08-13
2726LayoutUse Row/Column for linear layoutLinear layouts are simpler and more performantUse Row / ColumnCustom layout for simple casesRow/Column usageOver-engineered layoutHighhttps://developer.android.com/develop/ui/compose/layouts/basics#rowjetpack-compose 1.11.4 (current stable)active2026-08-13
2827LayoutUse Box only for overlapping contentBox should be used only when children overlapStack elementsUse Box as ColumnProper overlayMisused BoxMediumjetpack-compose 1.11.4 (current stable)active2026-08-13
2928LayoutPrefer LazyColumn over Column scrollLazy layouts are virtualized and efficientLazyColumnColumn.verticalScroll()Lazy listScrollable ColumnHighhttps://developer.android.com/jetpack/compose/listsjetpack-compose 1.11.4 (current stable)active2026-08-13
3029LayoutAvoid nested scroll containersNested scrolling causes UX & performance issuesSingle scroll containerScroll inside scrollOne scroll per screenNested scrollHighhttps://developer.android.com/develop/ui/compose/touch-input/pointer-input/scroll#nested-scrollingjetpack-compose 1.11.4 (current stable)active2026-08-13
3130LayoutAvoid fillMaxSize by defaultfillMaxSize may break parent constraintsUse exact sizeFill max everywhereConstraint-aware sizeOverfilled layoutMediumjetpack-compose 1.11.4 (current stable)active2026-08-13
3231LayoutAvoid intrinsic size unless necessaryIntrinsic measurement is expensiveExplicit sizingIntrinsicSize.MinPredictable layoutExpensive measureHighhttps://developer.android.com/jetpack/compose/layout/intrinsicsjetpack-compose 1.11.4 (current stable)active2026-08-13
3332LayoutUse Arrangement and Alignment APIsDeclare layout intent explicitlyUse Arrangement / AlignmentManual spacing hacksDeclarative spacingMagic spacingHighhttps://developer.android.com/develop/ui/compose/layouts/basics#align-itemsjetpack-compose 1.11.4 (current stable)active2026-08-13
3433LayoutExtract reusable layout patternsRepeated layouts should be sharedCreate layout composableCopy-paste layoutsReusable scaffoldDuplicated layoutHighhttps://developer.android.com/develop/ui/compose/componentsjetpack-compose 1.11.4 (current stable)active2026-08-13
3534ThemingNo hardcoded text styleUse typographyMaterialTheme.typographyHardcode spScalableInconsistentMediumjetpack-compose 1.11.4 (current stable)active2026-08-13
3635TestingStateless UI testingComposable easy to testPass stateHidden stateTestableHard testHighhttps://developer.android.com/jetpack/compose/testingjetpack-compose 1.11.4 (current stable)active2026-08-13
3736TestingUse testTagStable UI selectorsModifier.testTagFind by textStable testsFlaky testsMediumjetpack-compose 1.11.4 (current stable)active2026-08-13
3837PreviewMultiple previewsPreview multiple states@PreviewSingle previewBetter dev UXMisleadingLowhttps://developer.android.com/jetpack/compose/tooling/previewjetpack-compose 1.11.4 (current stable)active2026-08-13
3938DIInject VM via HiltUse hiltViewModel@HiltViewModelManual VMClean DICouplingHighhttps://developer.android.com/training/dependency-injection/hilt-jetpackjetpack-compose 1.11.4 (current stable)active2026-08-13
4039DINo DI in UIInject in VMConstructor injectInject composableProper scopeWrong scopeHighhttps://developer.android.com/topic/architecture/recommendations#dependency-injectionjetpack-compose 1.11.4 (current stable)active2026-08-13
4140AccessibilityContent descriptionAccessible UIcontentDescriptionIgnore a11yInclusiveA11y failMediumhttps://developer.android.com/jetpack/compose/accessibilityjetpack-compose 1.11.4 (current stable)active2026-08-13
4241AccessibilitySemanticsUse semantics APIModifier.semanticsNoneTestable a11yInvisibleMediumjetpack-compose 1.11.4 (current stable)active2026-08-13
4342AnimationCompose animation APIsUse animate*AsStateAnimatedVisibilityManual animSmoothJankMediumhttps://developer.android.com/jetpack/compose/animationjetpack-compose 1.11.4 (current stable)active2026-08-13
4443AnimationAvoid animation logic in VMAnimation is UI concernAnimate in UIAnimate in VMCorrect layeringMixed concernLowjetpack-compose 1.11.4 (current stable)active2026-08-13
4544ModularizationFeature-based UI modulesUI per feature:feature:uiGod moduleScalableTight couplingHighhttps://developer.android.com/topic/modularizationjetpack-compose 1.11.4 (current stable)active2026-08-13
4645ModularizationPublic UI contractsExpose minimal UI APIInterface/RouteExpose implEncapsulatedLeaky moduleMediumjetpack-compose 1.11.4 (current stable)active2026-08-13
4746StateSnapshot state onlyUse Compose statemutableStateOfCustom observableCompose awareBuggy UIMediumjetpack-compose 1.11.4 (current stable)active2026-08-13
4847StateAvoid mutable collectionsImmutable list/mapPersistentListMutableListStable UISilent bugHighhttps://developer.android.com/develop/ui/compose/state#other-supported-types-of-statejetpack-compose 1.11.4 (current stable)active2026-08-13
4948LifecycleRememberCoroutineScope usageOnly for UI jobsUI coroutineLong jobsScoped jobLeakMediumhttps://developer.android.com/jetpack/compose/side-effects#remembercoroutinescopejetpack-compose 1.11.4 (current stable)active2026-08-13
5049InteropInterop View carefullyUse AndroidViewIsolated usageMix everywhereSafe interopMessy UILowhttps://developer.android.com/jetpack/compose/interopjetpack-compose 1.11.4 (current stable)active2026-08-13
5150InteropAvoid legacy patternsNo LiveData in UIStateFlowLiveDataModern stackLegacy debtMediumjetpack-compose 1.11.4 (current stable)active2026-08-13
5251DebugUse layout inspectorInspect recompositionToolsBlind debugFast debugGuessingLowhttps://developer.android.com/studio/debug/layout-inspectorjetpack-compose 1.11.4 (current stable)active2026-08-13
5352DebugEnable recomposition countsTrack recompositionDebug flagsIgnorePerformance awareHidden jankLowjetpack-compose 1.11.4 (current stable)active2026-08-13