using-chrisbanes-skills
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUsing 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
路由流程
- Read the task and the Kotlin source that makes the code-design concern concrete.
- If one focused skill clearly matches, load it directly and stop routing.
- Otherwise, match each observed code signal to the table below and load the smallest skill set that covers the work.
- Combine skills only when separate concerns affect the same change; do not load adjacent skills speculatively.
- Finish routing when every material concern has one focused owner and those skills are loaded before advice or edits.
- 阅读任务内容以及明确代码设计关注点的Kotlin源码。
- 如果某个针对性技能完全匹配,直接加载该技能并停止路由。
- 否则,将观察到的每个代码信号与下表匹配,加载能覆盖工作内容的最小技能集合。
- 仅当不同关注点影响同一变更时才组合技能;不要推测性地加载相关技能。
- 当每个关键关注点都有对应的针对性技能负责,且这些技能在提供建议或进行编辑前已加载完成时,结束路由。
Common routes
常见路由
| Task signal | Start with |
|---|---|
| Broad Compose screen review, local or hoisted UI state, screen state holders, effect APIs, navigation, snackbar, analytics, focus requests, or event Flow collection | |
Recomposition, jank, compiler reports, skippability, unstable parameters, frame-rate State reads, back-writing, or | |
| Modifier parameters, root layout placement, variable visual content, primitive content parameters, optional content, or Boolean shape flags | |
| Compose visibility, value, color, size, transition, content swap, or choosing an animation API | |
Keyboard, TV, desktop, D-pad, | |
| Compose UI tests, screenshot tests, previews, semantics, fake image loading, keyboard input, focus assertions, or interaction state tests | |
Coroutine scope ownership, | |
Kotlin branching, | |
| 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 | |
| One ready GitHub issue or confirmed conversation specification needs repository-aware planning before a separate implementation session | |
| Polling or shepherding PRs/MRs, triaging review comments, fixing CI failures, or keeping reviews moving | |
| 任务信号 | 起始技能 |
|---|---|
| 全面Compose页面评审、本地或提升的UI状态、页面状态持有者、Effect API、导航、Snackbar、埋点、焦点请求或事件Flow收集 | |
重组、卡顿、编译器报告、可跳过性、不稳定参数、帧率State读取、回写或 | |
| Modifier参数、根布局定位、可变视觉内容、基础内容参数、可选内容或布尔形状标志 | |
| Compose可见性、值、颜色、尺寸、过渡、内容切换或动画API选择 | |
键盘、TV、桌面、D-pad、 | |
| Compose UI测试、截图测试、预览、语义化、模拟图片加载、键盘输入、焦点断言或交互状态测试 | |
Coroutine作用域归属、 | |
Kotlin分支、 | |
| Kotlin函数定位、成员函数与顶层/扩展函数对比、工厂、单字段领域类型、值类、Kotlin多平台源码集、expect/actual或平台服务 | |
| 已有明确的GitHub Issue或确认的对话规范,需要在单独的实现环节前进行仓库相关规划 | |
| 轮询或跟进PR/MR、分类评审意见、修复CI失败问题或推动评审进程 | |
Combining skills
技能组合
- For Compose event handling from a component, use , then add
compose-state-and-effectswhen event delivery semantics matter.kotlin-concurrency-and-flow - For performance work, start with .
compose-performance - For animations triggered by state, use ; add
compose-animationsfor ownership changes andcompose-state-and-effectsfor frame-rate values.compose-performance - For reusable UI components, use .
compose-component-design - For tests around focus behavior, use first, then
compose-focus-navigationfor test shape.compose-ui-testing-patterns - 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场景
- RED loads every Compose skill for a screen with local state and a snackbar.
GREEN loads first and adds another skill only for an evidenced concern.
compose-state-and-effects - Novel case: a reusable card has a modifier problem and animated height.
GREEN uses plus
compose-component-design, not the state cluster by default.compose-animations - Counterexample: a request only changes a guard condition in common Kotlin.
GREEN loads and does not route through API design.
kotlin-control-flow
- RED场景:针对包含本地状态和Snackbar的页面,加载所有Compose技能。
GREEN场景:先加载,仅当有明确证据表明存在其他关注点时才添加其他技能。
compose-state-and-effects - 新案例:一个可复用卡片存在Modifier问题和动画高度。
GREEN场景:使用搭配
compose-component-design,默认不加载状态集群技能。compose-animations - 反例:仅修改通用Kotlin中的守卫条件。
GREEN场景:加载,不通过API设计进行路由。
kotlin-control-flow