using-chrisbanes-skills

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Using chrisbanes skills

使用chrisbanes技能

Core principle

核心原则

Route by the decision the code needs, not by the number of APIs mentioned in the prompt. Load one cluster when its shared procedure owns the concern; add a specialist only when its independent behavior changes the same work.
根据代码所需的决策来选择技能,而非根据提示中提到的API数量。当某个技能集群的共享流程能覆盖关注点时,加载该集群;只有当某个专业技能的独立行为会改变当前工作时,才添加该技能。

Routing procedure

路由流程

  1. Read the task and the Kotlin source that makes the code-design concern concrete.
  2. If one focused skill clearly matches, load it directly and stop routing.
  3. Otherwise, match each observed code signal to the table below and load the smallest skill set that covers the work.
  4. Combine skills only when separate concerns affect the same change; do not load adjacent skills speculatively.
  5. Finish routing when every material concern has one focused owner and those skills are loaded before advice or edits.
  1. 阅读任务内容以及明确代码设计关注点的Kotlin源码。
  2. 如果某个针对性技能完全匹配,直接加载该技能并停止路由。
  3. 否则,将观察到的每个代码信号与下表匹配,加载能覆盖工作内容的最小技能集合。
  4. 仅当不同关注点影响同一变更时才组合技能;不要推测性地加载相关技能。
  5. 当每个关键关注点都有对应的针对性技能负责,且这些技能在提供建议或进行编辑前已加载完成时,结束路由。

Common routes

常见路由

Task signalStart with
Broad Compose screen review, local or hoisted UI state, screen state holders, effect APIs, navigation, snackbar, analytics, focus requests, or event Flow collection
compose-state-and-effects
Recomposition, jank, compiler reports, skippability, unstable parameters, frame-rate State reads, back-writing, or
@ReadOnlyComposable
compose-performance
Modifier parameters, root layout placement, variable visual content, primitive content parameters, optional content, or Boolean shape flags
compose-component-design
Compose visibility, value, color, size, transition, content swap, or choosing an animation API
compose-animations
Keyboard, TV, desktop, D-pad,
FocusRequester
,
focusProperties
, key events, or initial focus behavior
compose-focus-navigation
Compose UI tests, screenshot tests, previews, semantics, fake image loading, keyboard input, focus assertions, or interaction state tests
compose-ui-testing-patterns
Coroutine scope ownership,
init { launch }
, non-suspending launch APIs,
runBlocking
, cancellation,
StateFlow
,
SharedFlow
,
Channel
,
stateIn
, or one-shot events
kotlin-concurrency-and-flow
Kotlin branching,
when
expressions, guard conditions, sealed type exhaustiveness, smart casts, nullable branching, or complex
if
/
else
chains
kotlin-control-flow
Kotlin function placement, member versus top-level or extension functions, factories, single-field domain types, value classes, Kotlin Multiplatform source sets, expect/actual, or platform services
kotlin-api-design
One ready GitHub issue or confirmed conversation specification needs repository-aware planning before a separate implementation session
to-plan
Polling or shepherding PRs/MRs, triaging review comments, fixing CI failures, or keeping reviews moving
shepherd
任务信号起始技能
全面Compose页面评审、本地或提升的UI状态、页面状态持有者、Effect API、导航、Snackbar、埋点、焦点请求或事件Flow收集
compose-state-and-effects
重组、卡顿、编译器报告、可跳过性、不稳定参数、帧率State读取、回写或
@ReadOnlyComposable
compose-performance
Modifier参数、根布局定位、可变视觉内容、基础内容参数、可选内容或布尔形状标志
compose-component-design
Compose可见性、值、颜色、尺寸、过渡、内容切换或动画API选择
compose-animations
键盘、TV、桌面、D-pad、
FocusRequester
focusProperties
、按键事件或初始焦点行为
compose-focus-navigation
Compose UI测试、截图测试、预览、语义化、模拟图片加载、键盘输入、焦点断言或交互状态测试
compose-ui-testing-patterns
Coroutine作用域归属、
init { launch }
、非挂起式launch API、
runBlocking
、取消、
StateFlow
SharedFlow
Channel
stateIn
或一次性事件
kotlin-concurrency-and-flow
Kotlin分支、
when
表达式、守卫条件、密封类型穷举、智能转换、可空分支或复杂
if
/
else
kotlin-control-flow
Kotlin函数定位、成员函数与顶层/扩展函数对比、工厂、单字段领域类型、值类、Kotlin多平台源码集、expect/actual或平台服务
kotlin-api-design
已有明确的GitHub Issue或确认的对话规范,需要在单独的实现环节前进行仓库相关规划
to-plan
轮询或跟进PR/MR、分类评审意见、修复CI失败问题或推动评审进程
shepherd

Combining skills

技能组合

  • For Compose event handling from a component, use
    compose-state-and-effects
    , then add
    kotlin-concurrency-and-flow
    when event delivery semantics matter.
  • For performance work, start with
    compose-performance
    .
  • For animations triggered by state, use
    compose-animations
    ; add
    compose-state-and-effects
    for ownership changes and
    compose-performance
    for frame-rate values.
  • For reusable UI components, use
    compose-component-design
    .
  • For tests around focus behavior, use
    compose-focus-navigation
    first, then
    compose-ui-testing-patterns
    for test shape.
  • For Kotlin state, concurrency, or platform-boundary work that also changes branching shape, combine the cluster with
    kotlin-control-flow
    .
  • 对于组件的Compose事件处理,使用
    compose-state-and-effects
    ;当事件传递语义至关重要时,添加
    kotlin-concurrency-and-flow
  • 对于性能优化工作,从
    compose-performance
    开始。
  • 对于由状态触发的动画,使用
    compose-animations
    ;若涉及状态归属变更,添加
    compose-state-and-effects
    ;若涉及帧率相关值,添加
    compose-performance
  • 对于可复用UI组件,使用
    compose-component-design
  • 对于焦点行为相关测试,先使用
    compose-focus-navigation
    ,再使用
    compose-ui-testing-patterns
    来确定测试形态。
  • 对于涉及Kotlin状态、并发或平台边界的工作,同时需要修改分支结构时,将对应技能集群与
    kotlin-control-flow
    组合使用。

RED/GREEN agent scenarios

RED/GREEN Agent场景

  1. RED loads every Compose skill for a screen with local state and a snackbar. GREEN loads
    compose-state-and-effects
    first and adds another skill only for an evidenced concern.
  2. Novel case: a reusable card has a modifier problem and animated height. GREEN uses
    compose-component-design
    plus
    compose-animations
    , not the state cluster by default.
  3. Counterexample: a request only changes a guard condition in common Kotlin. GREEN loads
    kotlin-control-flow
    and does not route through API design.
  1. RED场景:针对包含本地状态和Snackbar的页面,加载所有Compose技能。 GREEN场景:先加载
    compose-state-and-effects
    ,仅当有明确证据表明存在其他关注点时才添加其他技能。
  2. 新案例:一个可复用卡片存在Modifier问题和动画高度。 GREEN场景:使用
    compose-component-design
    搭配
    compose-animations
    ,默认不加载状态集群技能。
  3. 反例:仅修改通用Kotlin中的守卫条件。 GREEN场景:加载
    kotlin-control-flow
    ,不通过API设计进行路由。