compose-agent
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCompose Agent
Compose Agent
Review, write, or modify Jetpack Compose code for correctness, modern API usage, and adherence to the official AndroidX guidelines. Report only genuine problems — do not nitpick or invent issues.
Target track (unless the repo says otherwise):
- Kotlin with Compose Compiler
2.0.20+(Strong Skipping Mode on by default).1.5.4+ - Jetpack Compose BOM current, Material 3, with
androidx.lifecycle.collectAsStateWithLifecycle() - Navigation 3 () when the project can adopt it; otherwise Navigation 2.8+.
androidx.navigation3 - Coroutines + Flow as the async primitives. Do not reach for RxJava or blocking I/O.
If the repo pins older versions, match the repo — but call out what the modern path would look like in a one-line note.
用于审查、编写或修改Jetpack Compose代码,确保其正确性、符合现代API用法并遵循官方AndroidX规范。仅报告真实存在的问题——不要吹毛求疵或编造问题。
目标技术栈(除非仓库另有说明):
- Kotlin 及 Compose Compiler
2.0.20+(默认启用Strong Skipping Mode)。1.5.4+ - 最新版Jetpack Compose BOM、Material 3、搭配使用的
collectAsStateWithLifecycle()。androidx.lifecycle - 项目支持时使用Navigation 3();否则使用Navigation 2.8+。
androidx.navigation3 - 使用Coroutines + Flow作为异步原语。不要使用RxJava或阻塞式I/O。
如果仓库固定了旧版本,则与仓库保持一致——但请用一行注释说明现代实现方式是什么样的。
Review Process
审查流程
- Check for deprecated or soft-deprecated API using .
references/api.md - Validate state and data flow using .
references/state.md - Validate side-effect choice (,
LaunchedEffect,DisposableEffect,produceState,snapshotFlow) usingrememberUpdatedState.references/effects.md - Review composable performance — stability, lambda modifiers, lazy list keys, deferred reads, cross-phase back-writes — using .
references/performance.md - Review modifier usage — ordering, lambda-form, over
Modifier.Node— usingcomposed { }.references/modifiers.md - Review navigation using — start from its decision table (Nav3 vs Nav2 type-safe vs plain state) before touching call sites.
references/navigation.md - Review coroutines and lifecycle collection using .
references/concurrency.md - Review Flow operators and StateFlow / SharedFlow shape (,
stateIn,shareInvariants,flatMap, error handling, backpressure,combine) usingasStateFlow().references/flows.md - Review composable API shape (parameter order, slots, naming, defaults) using .
references/component-api.md - Review UI testing patterns using when tests, semantics, screenshots, previews, or fake UI dependencies are in scope.
references/testing.md - Review focus and keyboard / D-pad navigation using when the UI uses focus APIs, keyboard input, TV, desktop, ChromeOS, or accessibility focus behavior.
references/focus.md - Review Compose Multiplatform / KMP boundaries using when common code,
references/kmp.md/expect, platform services, native views, or shared UI targets are in scope.actual - Review animation API choice and lifecycle — declarative vs imperative, ed
remember, target-driven launches,Animatableoverspring, deferred animated reads,tweenkeys — usingAnimatedContentwhen anyreferences/animation.md,animate*,Animatable,Transition,AnimatedVisibility, or infinite-transition API is in scope.AnimatedContent - Review Paging 3 in Compose — (the paging differ — not
collectAsLazyPagingItems, which does not apply tocollectAsStateWithLifecycle), stablePagingData,itemKeybranches, user-drivenLoadState/refresh()— usingretry()whenreferences/paging.md,LazyPagingItems, orPagingDatais in scope.collectAsLazyPagingItems - Final Kotlin style pass using .
references/kotlin.md
If doing a partial review, load only the relevant reference files — each references file is designed to be read in isolation.
- 使用检查已弃用或软弃用的API。
references/api.md - 使用验证状态和数据流。
references/state.md - 使用验证副作用选择(
references/effects.md、LaunchedEffect、DisposableEffect、produceState、snapshotFlow)。rememberUpdatedState - 使用审查可组合函数性能——稳定性、lambda形式的Modifier、懒加载列表key、延迟读取、跨阶段回写。
references/performance.md - 使用审查Modifier使用——顺序、lambda形式、优先使用
references/modifiers.md而非Modifier.Node。composed { } - 使用审查导航——在修改调用点之前,先从其决策表(Nav3 vs Nav2类型安全 vs 纯状态)开始分析。
references/navigation.md - 使用审查协程与生命周期收集。
references/concurrency.md - 使用审查Flow运算符及StateFlow / SharedFlow形态(
references/flows.md、stateIn、shareIn变体、flatMap、错误处理、背压、combine)。asStateFlow() - 使用审查可组合API形态(参数顺序、插槽、命名、默认值)。
references/component-api.md - 当测试、语义、截图、预览或模拟UI依赖在范围内时,使用审查UI测试模式。
references/testing.md - 当UI使用焦点API、键盘输入、TV、桌面、ChromeOS或无障碍焦点行为时,使用审查焦点与键盘/D-pad导航。
references/focus.md - 当公共代码、/
expect、平台服务、原生视图或共享UI目标在范围内时,使用actual审查Compose Multiplatform / KMP边界。references/kmp.md - 当任何、
animate*、Animatable、Transition、AnimatedVisibility或无限过渡API在范围内时,使用AnimatedContent审查动画API选择与生命周期——声明式 vs 命令式、references/animation.md存储的remember、目标驱动的启动、优先使用Animatable而非spring、延迟动画读取、tween的key。AnimatedContent - 当、
LazyPagingItems或PagingData在范围内时,使用collectAsLazyPagingItems审查Compose中的Paging 3——references/paging.md(分页差异器——不是collectAsLazyPagingItems,后者不适用于collectAsStateWithLifecycle)、稳定的PagingData、itemKey分支、用户驱动的LoadState/refresh()。retry() - 使用进行最终的Kotlin风格检查。
references/kotlin.md
如果进行部分审查,仅加载相关的参考文件——每个参考文件都设计为可独立阅读。
Core Instructions
核心指令
- Keep composables side-effect free in composition. All I/O, state mutation outside remembered objects, analytics, etc. belong in ,
LaunchedEffect,DisposableEffect, the ViewModel, or — for event/gesture-driven work only —produceStateinside a handler. Target-driven animation belongs inrememberCoroutineScope().launchor declarativeLaunchedEffect/animate*AsState, not inupdateTransitionfrom the composition body. Seescope.launchandreferences/animation.md.references/effects.md - Every composable that takes a names the parameter
Modifier, types itmodifier, and applies it to the outermost layout only. Never create aModifier = Modifierparameter you do not forward.modifier - Parameter order for a component: required data → → other optional parameters with defaults → trailing
modifier: Modifier = Modifierslots last. Onecontent: @Composable () -> Unitparameter per component.modifier - For stateful APIs, expose a stateless overload plus a stateful convenience that hoists . See
remember.references/component-api.md - Collect Flows with in UI code. Plain
collectAsStateWithLifecycle()keeps collecting when the screen is not visible and burns battery and bandwidth. Exception:collectAsState()is collected withFlow<PagingData<T>>, nevercollectAsLazyPagingItems()— seecollectAsStateWithLifecycle().references/paging.md - Prefer over
rememberSaveablefor UI state that should survive configuration change or process death, unless the value is unserializable or derivable.remember - Use the typed state factories (,
mutableIntStateOf,mutableLongStateOf,mutableFloatStateOf) for primitive state. RawmutableDoubleStateOfboxes.mutableStateOf<Int>(...) - Never write state a phase has already read. A layout callback (/
onSizeChanged/onGloballyPositioned) must not write state a sibling reads in composition (a cross-phase back-write, a measure → recompose loop), and never mutate aonPlaced/mutableStateListOfinside a composable body that also reads it (composition-phase self-invalidation, a mutate → recompose loop). Consume measured values in layout/draw, or mutate snapshot state from an event /mutableStateMapOf/ state holder. SeeLaunchedEffect.references/performance.md - Don't ship no-op "optimizations": on a pure function, or
remember(index)-ing an already-auto-memoized callback under Strong Skipping (SSM memoizes lambdas even with unstable captures). Prove a recomposition win with Layout Inspector counts or compiler reports, not the presence of a pattern. Seeremember.references/performance.md - Never put a lambda in a . Use explicit parameters.
CompositionLocal - Do not introduce third-party libraries without asking first. The Accompanist libraries covering pager, swipe-refresh, flow layout, and system UI controller are deprecated — the functionality is in AndroidX now (,
HorizontalPager,PullToRefreshBox/FlowRow,FlowColumn).enableEdgeToEdge() - When an element's background reads from (directly or via a blend), its text and icon colors must read from the same theming source. Hard-coded
MaterialTheme.colorScheme.*/Color.Black/ raw ARGB literals over theme-driven backgrounds are dark-mode regressions. SeeColor.White.references/component-api.md - Animate declaratively first. Use for single state-driven values and
animate*AsStatefor synchronized ones; reach forupdateTransitiononly when you need imperative control (gesture, fling, sequence). AlwaysAnimatableanremember, launch target-driven animations fromAnimatable(neverLaunchedEffectin composition to react to state), preferscope.launchoverspring()for interruptible motion, and read animated values in the layout/draw phase (lambda modifiers /tween) so the animation does not recompose every frame. SeegraphicsLayer.references/animation.md - For paged feeds, use , render with
collectAsLazyPagingItems()and stable domain ids, branch onitems(count = …, key = …)for loading/empty/error/append, and keeploadState/refresh()on user actions — not in the composition body. Seeretry().references/paging.md
- 确保组合过程中的可组合函数无副作用。所有I/O操作、remember存储对象之外的状态变更、埋点统计等都应放在、
LaunchedEffect、DisposableEffect、ViewModel中,或者——仅适用于事件/手势驱动的任务——放在处理器内的produceState中。目标驱动的动画应放在rememberCoroutineScope().launch或声明式的LaunchedEffect/animate*AsState中,而不是放在组合体的updateTransition里。参见scope.launch和references/animation.md。references/effects.md - 每个接收的可组合函数都应将参数命名为
Modifier,类型为modifier,并且仅将其应用于最外层布局。永远不要创建一个不向下传递的Modifier = Modifier参数。modifier - 组件的参数顺序:必填数据 → → 其他带默认值的可选参数 → 最后是尾随的
modifier: Modifier = Modifier插槽。每个组件只能有一个content: @Composable () -> Unit参数。modifier - 对于有状态的API,提供一个无状态的重载,加上一个提升了的有状态便捷重载。参见
remember。references/component-api.md - 在UI代码中使用收集Flow。普通的
collectAsStateWithLifecycle()会在屏幕不可见时继续收集,消耗电量和带宽。例外:collectAsState()使用Flow<PagingData<T>>收集,绝对不能用collectAsLazyPagingItems()——参见collectAsStateWithLifecycle()。references/paging.md - 对于需要在配置变更或进程死亡后保留的UI状态,优先使用而非
rememberSaveable,除非值无法序列化或可通过其他方式推导。remember - 对于基础类型状态,使用类型化状态工厂(、
mutableIntStateOf、mutableLongStateOf、mutableFloatStateOf)。原始的mutableDoubleStateOf会进行装箱。mutableStateOf<Int>(...) - 永远不要写入某个阶段已经读取过的状态。布局回调(/
onSizeChanged/onGloballyPositioned)不能写入兄弟节点在组合中读取的状态(跨阶段回写,会导致测量→重组循环),也永远不要在同时读取onPlaced/mutableStateListOf的可组合函数体内修改它们(组合阶段自失效,会导致修改→重组循环)。应在布局/绘制阶段消费测量值,或者从事件/mutableStateMapOf/状态持有者中修改快照状态。参见LaunchedEffect。references/performance.md - 不要交付无操作的“优化”:纯函数上的,或者在Strong Skipping模式下对已经自动记忆的回调使用
remember(index)(SSM会记忆即使带有不稳定捕获的lambda)。要用Layout Inspector计数或编译器报告证明重组优化的效果,而不是靠某种模式的存在。参见remember。references/performance.md - 永远不要在中放入lambda。使用显式参数。
CompositionLocal - 未经询问不要引入第三方库。覆盖分页器、下拉刷新、流式布局、系统UI控制器的Accompanist库已经弃用——这些功能现在已经在AndroidX中了(、
HorizontalPager、PullToRefreshBox/FlowRow、FlowColumn)。enableEdgeToEdge() - 当一个元素的背景从读取颜色时(直接或通过混合),其文本和图标颜色必须从同一主题源读取。在主题驱动的背景上使用硬编码的
MaterialTheme.colorScheme.*/Color.Black/ 原始ARGB字面量会导致深色模式回归问题。参见Color.White。references/component-api.md - 优先使用声明式动画。对于单状态驱动的值使用,对于同步动画使用
animate*AsState;仅当需要命令式控制(手势、抛掷、序列动画)时才使用updateTransition。始终用Animatable存储remember,从Animatable中启动目标驱动的动画(永远不要在组合中使用LaunchedEffect来响应状态),优先使用scope.launch而非spring()以实现可中断的动效,并在布局/绘制阶段(lambda形式的Modifier /tween)读取动画值,这样动画不会每帧都触发重组。参见graphicsLayer。references/animation.md - 对于分页信息流,使用,通过
collectAsLazyPagingItems()和稳定的业务ID进行渲染,根据items(count = …, key = …)分支处理加载/空状态/错误/加载更多,并且将loadState/refresh()放在用户操作中——而不是放在组合体里。参见retry()。references/paging.md
Output Format (review mode)
输出格式(审查模式)
Organize findings by file. For each issue:
- State the file and relevant line(s).
- Name the rule being violated (e.g., "Use instead of
collectAsStateWithLifecycle()").collectAsState() - Show a brief before/after code fix.
- Link the official source (or AndroidX component guidelines).
developer.android.com/...
Skip files with no issues. End with a prioritized summary — three items max, highest impact first.
按文件组织发现的问题。对于每个问题:
- 说明文件及相关行号。
- 指出违反的规则(例如:“使用代替
collectAsStateWithLifecycle()”)。collectAsState() - 展示简短的修复前后代码对比。
- 链接官方来源(或AndroidX组件规范)。
developer.android.com/...
跳过没有问题的文件。最后附上优先级总结——最多三项,影响最高的排在前面。
Example Output
输出示例
feature/profile/ProfileScreen.kt
feature/profile/ProfileScreen.ktfeature/profile/ProfileScreen.kt
feature/profile/ProfileScreen.ktLine 34: Use — UI Flows must stop collecting when the screen is not STARTED.
collectAsStateWithLifecycle()kotlin
// Before
val user by viewModel.user.collectAsState()
// After
val user by viewModel.user.collectAsStateWithLifecycle()Line 58: Pass to the outermost layout, not to inner content.
modifierkotlin
// Before
@Composable
fun UserCard(user: User, modifier: Modifier = Modifier) {
Column {
Text(user.name, modifier = modifier) // modifier swallowed here
Text(user.email)
}
}
// After
@Composable
fun UserCard(user: User, modifier: Modifier = Modifier) {
Column(modifier = modifier) {
Text(user.name)
Text(user.email)
}
}Line 72: Defer the animated read to the layout phase using the lambda form.
offsetkotlin
// Before
val dx by animateDpAsState(targetValue = if (expanded) 0.dp else (-200).dp, label = "drawerOffset")
Box(modifier = Modifier.offset(x = dx))
// After — layout-phase read, skips recomposition on every frame
val dx by animateDpAsState(targetValue = if (expanded) 0.dp else (-200).dp, label = "drawerOffset")
Box(modifier = Modifier.offset { IntOffset(dx.roundToPx(), 0) })第34行:使用——UI Flow在屏幕未处于STARTED状态时必须停止收集。
collectAsStateWithLifecycle()kotlin
// Before
val user by viewModel.user.collectAsState()
// After
val user by viewModel.user.collectAsStateWithLifecycle()第58行:将传递给最外层布局,而不是内部内容。
modifierkotlin
// Before
@Composable
fun UserCard(user: User, modifier: Modifier = Modifier) {
Column {
Text(user.name, modifier = modifier) // modifier swallowed here
Text(user.email)
}
}
// After
@Composable
fun UserCard(user: User, modifier: Modifier = Modifier) {
Column(modifier = modifier) {
Text(user.name)
Text(user.email)
}
}第72行:使用lambda形式将动画的读取延迟到布局阶段。
offsetkotlin
// Before
val dx by animateDpAsState(targetValue = if (expanded) 0.dp else (-200).dp, label = "drawerOffset")
Box(modifier = Modifier.offset(x = dx))
// After — layout-phase read, skips recomposition on every frame
val dx by animateDpAsState(targetValue = if (expanded) 0.dp else (-200).dp, label = "drawerOffset")
Box(modifier = Modifier.offset { IntOffset(dx.roundToPx(), 0) })Summary
总结
- Performance (high): Non-deferred animated reads on ,
ProfileScreen.kt:72,HomeScreen.kt:110recompose every frame. Switch to lambda-form modifiers.DetailScreen.kt:88 - Lifecycle (high): Three screens use — replace with
collectAsState()to avoid collecting in the background.collectAsStateWithLifecycle() - API shape (medium): swallows its
UserCardparameter. Forward it to the outermost layout.modifier
End of example.
- 性能(高优先级): 、
ProfileScreen.kt:72、HomeScreen.kt:110上的非延迟动画读取会导致每帧重组。请切换为lambda形式的Modifier。DetailScreen.kt:88 - 生命周期(高优先级): 三个屏幕使用了——请替换为
collectAsState()以避免在后台收集。collectAsStateWithLifecycle() - API形态(中优先级): 未传递其
UserCard参数。请将其转发给最外层布局。modifier
示例结束。
Authoring Mode
编写模式
When the agent is writing new code rather than reviewing, the same rules apply as guardrails. Before generating a composable, silently check:
- Does it take ?
modifier: Modifier = Modifier - Is state hoisted, or is there a clear reason to own it here?
- If it renders a list, does it use a stable ?
key = - If it launches work, is that work in a ,
LaunchedEffect, or the ViewModel — not in the composition body?produceState - If it collects a Flow, is it ? (A
collectAsStateWithLifecycle()is the exception — it usesFlow<PagingData<T>>.)collectAsLazyPagingItems() - Is the parameter order: data → modifier → other → content slot last?
- If it animates, is the API declarative first, remembered where needed, lifecycle-aware, and phase-correct?
- Does any layout callback or snapshot-collection mutation write state read back in composition (a cross-phase / self-invalidation loop)?
- If it pages, are keys stable, handled, and refresh/retry user-driven?
LoadState - If it needs focus, testing, or platform-specific behavior, did you load the focused reference before judging?
If any answer is no and there is no deliberate reason, fix it before returning the code.
当Agent编写新代码而非审查时,同样的规则作为防护栏适用。在生成可组合函数之前,请静默检查:
- 是否接收了?
modifier: Modifier = Modifier - 状态是否被提升,或者是否有明确的理由在此处拥有状态?
- 如果渲染列表,是否使用了稳定的?
key = - 如果启动了任务,该任务是否在、
LaunchedEffect或ViewModel中——而不是在组合体里?produceState - 如果收集Flow,是否使用了?(
collectAsStateWithLifecycle()是例外——它使用Flow<PagingData<T>>。)collectAsLazyPagingItems() - 参数顺序是否为:数据 → modifier → 其他 → 最后是content插槽?
- 如果有动画,是否优先使用声明式API、在需要时remember、具有生命周期感知且阶段正确?
- 是否存在布局回调或快照收集修改了组合中会回读的状态(跨阶段/自失效循环)?
- 如果是分页,key是否稳定、是否被处理、刷新/重试是否由用户驱动?
LoadState - 如果需要焦点、测试或平台特定行为,是否在判断前加载了相关参考文档?
如果任何答案为“否”且没有刻意的理由,请在返回代码前修复。
What This Skill Does Not Cover
本技能不覆盖的内容
Out of scope in v1 — delegate elsewhere or scope down explicitly:
- Material 3 compliance, theming, and design tokens — use the skill.
material-3 - Scoring an existing codebase with numeric grades — use the sibling skill in the same repo.
jetpack-compose-audit - Wear OS / TV / Auto / Glance deep platform review — this skill now covers focus and keyboard/D-pad basics, but not full platform certification.
- Accessibility deep review — we flag obvious gaps (missing , icon-only buttons without labels, touch targets under 48dp) but do not grade.
contentDescription
If the user needs any of the above, narrow the scope and say so.
v1版本范围外的内容——请委托给其他技能或明确缩小范围:
- Material 3合规性、主题和设计令牌——使用技能。
material-3 - 用数字等级对现有代码库进行评分——使用同一仓库中的姊妹技能。
jetpack-compose-audit - Wear OS / TV / Auto / Glance深度平台审查——本技能目前覆盖焦点和键盘/D-pad基础,但不包括完整的平台认证。
- 无障碍深度审查——我们会标记明显的缺陷(缺少、无标签的纯图标按钮、触摸目标小于48dp),但不进行评分。
contentDescription
如果用户需要以上任何内容,请缩小范围并说明。
References
参考文献
- — deprecated and soft-deprecated Compose APIs and their modern replacements.
references/api.md - — hoisting,
references/state.mdvsremember, ViewModel boundaries,rememberSaveable.derivedStateOf - —
references/effects.md,LaunchedEffect,DisposableEffect,SideEffect,produceState,snapshotFlow.rememberUpdatedState - — stability, Strong Skipping Mode, lambda modifiers, lazy keys, typed state factories, deferred reads.
references/performance.md - — modifier ordering, lambda form,
references/modifiers.mdoverModifier.Node.composed { } - — decision table (Nav3 vs Nav2 type-safe vs plain state), Navigation 3, and what to replace from Navigation 2.
references/navigation.md - — coroutines, Flow,
references/concurrency.md,collectAsStateWithLifecycle, scope choice.repeatOnLifecycle - — operator selection:
references/flows.mdvsStateFlowvs coldSharedFlow,Flow,stateIn(WhileSubscribed),shareInvariants,flatMap/combine/merge, error handling, backpressure,zipexposure.asStateFlow() - — composable API guidelines: parameter order, slots, naming, defaults, state hoisting shape.
references/component-api.md - — Compose UI tests, semantics assertions, screenshot tests, fake image/platform services, previews.
references/testing.md - —
references/focus.md, focus restoration, keyboard / D-pad input, key handlers, and focus tests.FocusRequester - — Kotlin Multiplatform and Compose Multiplatform boundaries,
references/kmp.md/expect, interfaces, platform leaf composables.actual - — animation API selection (
references/animation.mdvsanimate*AsStatevsupdateTransition),Animatableed animation state, target-driven launches, gesture-drivenremember/snapTo,animateDecay/spring/tween, reduced motion, deferred animated reads,keyframes/AnimatedContent,AnimatedVisibility, off-screen infinite transitions.animateItem() - — Paging 3 in Compose: when to page vs plain lists,
references/paging.md, stablecollectAsLazyPagingItems,itemKeyUI, pull-to-refresh, anti-patterns for paginated lazy lists.LoadState - — Kotlin coding conventions and Android Kotlin style the LLM keeps missing.
references/kotlin.md
- — 已弃用和软弃用的Compose API及其现代替代方案。
references/api.md - — 状态提升、
references/state.mdvsremember、ViewModel边界、rememberSaveable。derivedStateOf - —
references/effects.md、LaunchedEffect、DisposableEffect、SideEffect、produceState、snapshotFlow。rememberUpdatedState - — 稳定性、Strong Skipping Mode、lambda形式的Modifier、懒加载key、类型化状态工厂、延迟读取。
references/performance.md - — Modifier顺序、lambda形式、优先使用
references/modifiers.md而非Modifier.Node。composed { } - — 决策表(Nav3 vs Nav2类型安全 vs 纯状态)、Navigation 3,以及Navigation 2中需要替换的内容。
references/navigation.md - — 协程、Flow、
references/concurrency.md、collectAsStateWithLifecycle、作用域选择。repeatOnLifecycle - — 运算符选择:
references/flows.mdvsStateFlowvs 冷SharedFlow、Flow、stateIn(WhileSubscribed)、shareIn变体、flatMap/combine/merge、错误处理、背压、zip暴露。asStateFlow() - — 可组合API规范:参数顺序、插槽、命名、默认值、状态提升形态。
references/component-api.md - — Compose UI测试、语义断言、截图测试、模拟图片/平台服务、预览。
references/testing.md - —
references/focus.md、焦点恢复、键盘/D-pad输入、按键处理器、焦点测试。FocusRequester - — Kotlin Multiplatform与Compose Multiplatform边界、
references/kmp.md/expect、接口、平台叶子可组合函数。actual - — 动画API选择(
references/animation.mdvsanimate*AsStatevsupdateTransition)、Animatable存储的动画状态、目标驱动启动、手势驱动的remember/snapTo、animateDecay/spring/tween、减少动效、延迟动画读取、keyframes/AnimatedContent、AnimatedVisibility、屏幕外无限过渡。animateItem() - — Compose中的Paging 3:何时使用分页 vs 普通列表、
references/paging.md、稳定的collectAsLazyPagingItems、itemKeyUI、下拉刷新、分页懒加载列表的反模式。LoadState - — LLM经常遗漏的Kotlin编码约定和Android Kotlin风格。
references/kotlin.md
Acceptance Evals
验收评估
evals/evals.jsonjetpack-compose-auditbin/cievals/evals.jsonjetpack-compose-auditbin/ciPrimary Sources
主要来源
Every rule in this skill traces back to one of:
- and its subpages
https://developer.android.com/develop/ui/compose https://developer.android.com/kotlin/style-guidehttps://kotlinlang.org/docs/coding-conventions.htmlhttps://www.jetbrains.com/help/kotlin-multiplatform-dev/https://android.googlesource.com/platform/frameworks/support/+/androidx-main/compose/docs/compose-api-guidelines.mdhttps://android.googlesource.com/platform/frameworks/support/+/androidx-main/compose/docs/compose-component-api-guidelines.md
When a supplemental source (blog post, conference talk) disagrees with these, the primary sources win.
本技能中的每一条规则都可追溯至以下来源之一:
- 及其子页面
https://developer.android.com/develop/ui/compose https://developer.android.com/kotlin/style-guidehttps://kotlinlang.org/docs/coding-conventions.htmlhttps://www.jetbrains.com/help/kotlin-multiplatform-dev/https://android.googlesource.com/platform/frameworks/support/+/androidx-main/compose/docs/compose-api-guidelines.mdhttps://android.googlesource.com/platform/frameworks/support/+/androidx-main/compose/docs/compose-component-api-guidelines.md
当补充来源(博客文章、会议演讲)与这些来源冲突时,以主要来源为准。