Agent Skills
› chrisbanes/skills
› compose-performance
compose-performance
GitHub用于分析Jetpack Compose性能问题,包括重组成本、稳定性报告、跳过逻辑及帧率状态读取等。通过复现过渡、分类轴线和最小化修复来优化UI渲染性能。
触发场景
调查Compose重组开销
分析编译器稳定性报告
排查可跳过性参数
检查帧率状态读取
安装
npx skills add chrisbanes/skills --skill compose-performance -g -y
SKILL.md
Frontmatter
{
"name": "compose-performance",
"description": "Use when investigating Jetpack Compose recomposition cost, compiler stability reports, skippability, unstable parameters, frame-rate State reads, cross-phase snapshot back-writing, or @ReadOnlyComposable contracts."
}
Compose performance
Core principle
Measure one user-visible transition, identify the runtime axis that causes the work, then apply the smallest correction at the phase or boundary where that axis begins.
Procedure
- Reproduce one concrete transition and capture the observable evidence: recomposition counts, compiler reports, profiler data, or a clear trace. Build only through Gradle run. If no build can run, reason from the declared types; do not unpack toolchain jars or work around the sandbox.
- Classify the primary axis: parameter stability and skipping, State read phase, or snapshot state written back into an earlier phase.
- Check for a false lead: a real data change, a correctness defect, or an unchanged lazy item that is expected to recompose.
- Read the corresponding focused reference before proposing a change.
- For review work, pair every finding with the smallest evidence-supported
repair. For a false stability promise, explicitly say to replace mutable
non-snapshot properties with immutable data or snapshot-observable state,
verify that contract, and only then decide whether an annotation remains
needed. For a phase problem, name the layout or draw consumer where the
changing read or calculation should move. A cross-phase write proves
invalidation or an extra pass; do not claim oscillation or an infinite loop
unless evidence shows values repeatedly changing. Do not stop at diagnosis.
When only source code is available, separate the proven feedback path from
its unmeasured runtime cost. Give a conditional repair direction based on
the intended measurement boundary; do not prescribe a callback swap,
equality guard, or content-layout rewrite as a performance fix without
evidence that it changes the observed problem. For an
Intheld inmutableStateOfwith the default structural equality policy, an unchanged value already avoids invalidation. - Change one axis at a time and re-measure the same transition.
- Finish when the evidence improves at the observed boundary without hiding state changes, caching stale values, or moving work to a less correct owner.
Topic router
| Signal | Read |
|---|---|
| Cause is unknown, or several axes may interact | Diagnosis |
classes.txt, composables.txt, strong skipping, unstable parameters, or collection stability |
Stability |
| Scroll, animation, gesture, layout, or draw State read at frame rate; measured state fed back into composition | Deferred reads |
| A composable only reads composition locals or accessor-style values | Composition contracts |
| State ownership or effect lifecycle is the root cause | Compose state and effects |
版本历史
-
2026.10.18
当前 2026-10-19 03:04
新增构建依赖要求:必须通过 Gradle run 构建以捕获可观测证据;若无法运行则仅基于声明类型推理,禁止解包工具链 JAR 或绕过沙箱。
-
2026.9.25
2026-09-27 20:22
改进了 GPT-6 技能评估和针对性指导。
-
2026.8.27
2026-08-28 05:51
恢复技能评估行为,捕获遥测数据并对比效率指标。
-
2026.8.24
2026-08-27 17:15
减少技能指令的冗余度,精简内容描述。
-
2026.8.16
2026-08-19 19:31
新增 RED/GREEN 智能体场景示例,增强对不稳定参数、动画绘制及误报情况的处理指导;细化审查工作流中证据支持与修复建议的要求。
- 2026.8.5 2026-08-16 02:44


