实现或修改 IntelliJ `AnAction`,并在 `plugin.xml` 中注册。将显示名称和说明写入消息资源文件,按需设置图标,并通过事件协程作用域启动挂起任务,避免同步处理阻塞 IDE。
- 为 IDE 菜单添加操作
- 修改操作注册或图标
- 整理操作名称和说明
审查 Compose Desktop 界面代码的架构和运行时问题,检查状态管理、副作用、协程、延迟列表、动画与重组,并按优先级列出发现。
Audit Compose Desktop UI state and effects.
实测评分 未实测
查看安装方法本技能审查 Compose Desktop 界面代码中的架构边界和 Compose 运行时用法,并根据代码证据报告问题。它会检查应用状态或业务逻辑是否进入可组合函数、状态归属是否合适,以及 remember 的键和局部状态是否合理。审查范围还包括 LaunchedEffect、DisposableEffect、snapshotFlow、协程用法、流的收集方式和资源生命周期。
此外,技能会检查延迟列表的键和 contentType、重组期间执行的工作、动画 API、Modifier 的传递与顺序、可组合函数的规模及公开 API 形态。桌面端接点包括焦点、快捷键、对话框、文件选择器和剪贴板。每项发现会标出优先级、代码位置和修复建议,并说明审查范围与置信度;必要时还会参考测量或跟踪资料。
需要检查 Compose Desktop 页面或工具窗口中的状态管理和副作用设计时,可以使用本技能。排查重组缓慢或动画异常时,也可以根据具体代码位置整理可能原因。
审查范围是 Compose Desktop 的架构和运行时,不包括视觉设计评价、Jewel 组件选择或 Android 专属设计。
本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。
AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。
不计入评分。 由 AI(OpenAI Codex)于 2026年10月28日 评估。仅供参考,安装前请同时查看原文。
安装前可以查看交给 AI 代理的指令内容。
Audit Compose Desktop UI code for architectural correctness and Compose runtime hygiene. This workflow gathers read-only
evidence rather than reviewing visual design. Use compose-ui-architecture for day-to-day authoring guardrails and
jewel-ui for Jewel component and theming guidance.
If the user asks for a general review, cleanup pass, or broad investigation rather than a Compose UI architecture audit, use the review subagents available in the current harness. If subagent delegation is unavailable, run those review passes sequentially yourself.
Keep the audit proportional. A focused request on one file should get a focused file review; a broad request like "audit this tool window" should map the surface, sample representative files, and report systemic patterns.
In scope:
remember, derivedStateOf, and local state misuseLaunchedEffect, DisposableEffect, snapshotFlow, and coroutine-scope misusecontentTypeOut of scope unless the user explicitly asks:
jewel-ui.jewel-swing-interopcollectAsStateWithLifecycle, Navigation, Material, Accompanist,
baseline profiles, and R8.## Summary
[overall posture: healthy / targeted cleanup needed / risky]
## Top findings
1. [severity] [finding] — `path:line`
2. ...
## Category notes
### Boundary and state ownership
### Desktop lifecycle and flow collection
### Effects and coroutine usage
### Lazy lists, animation, and recomposition
### Modifier/API shape
### Desktop interop seams
## Top 3 fixes
1. ...
## Confidence and limits
[what was sampled, what was not checked]
Do not assign numeric scores by default. If the user explicitly requests scoring, read reporting-guidance.md, label scoring as a project-specific heuristic, and avoid importing Android release metrics.
If the user gives paths, audit those. Otherwise locate the UI source root from the project's
architecture docs or by searching for @Composable. Skip generated/build directories and tests
unless the user asks.
Find representative files before judging:
For broad audits, name the sampled surface in the report.
Treat search hits as candidate locations and read the surrounding code before reporting a finding. For the full pattern list, read audit-search-patterns.md.
Use the category checklist below, but avoid re-reading every reference file. Open only the reference files needed for actual evidence you find.
| Category | What to check | Read when deeper diagnosis is needed |
|---|---|---|
| Boundary and state ownership | Business/app logic in composition, broad app-state reads, local state shadowing app state, presenter objects passed into leaf components, direct IJPL API/Project parameter leaks in @Composable (use abstract state or explicit provider boundaries, no lazy CompositionLocal minting like LocalProject) | boundary-violations.md |
| Desktop lifecycle and flow collection | Multiple raw flows that must be coherent, resource-producing flows started from leaves, composition-owned file watchers/subprocesses/loops | effects/overview.md |
| Effects and coroutine usage | Work launched from bodies, bad effect keys, stale callbacks, missing cleanup, noisy snapshotFlow, business workflows in effects | effects/overview.md |
| Lazy lists and recomposition | Missing stable keys/content types, per-row lookups, row/model churn, hot-path transforms, stale remember caches for theme/environment-derived UI values | lazy-layouts/overview.md, stability/overview.md |
| Animation | Wrong animation API, unremembered Animatable, target-driven animation launched from composition, per-frame values read during composition, broad AnimatedContent targets, offscreen infinite transitions | compose-ui-architecture animation, modifiers/overview.md, lazy-layouts/animate-item.md |
| Modifier/API shape | Swallowed modifiers, missing/misordered modifier, MutableState<T>/State<T> component APIs, unstable or mutable parameters, event/content-slot parameter shape, action/presenter CompositionLocals, unnecessary Modifier.composed {}, huge/deeply nested composables, poor file ordering, missing/stale KDoc on reusable composables | api-hygiene.md, modifiers/overview.md |
| Desktop interop seams | AWT/Swing details in leaves, shortcut paths bypassing presenter checks, persisted window/session policy in remember, protocol/runtime work in UI | subcomposition/overview.md |
When the target includes reusable component APIs, public/cross-file composables, Detekt findings, or lint-like Compose smells, read api-hygiene.md. It distils Detekt's comments/naming/complexity/coroutines/ performance guidance and Nacho López' Compose Rules into Compose Desktop/Jewel audit heuristics.
Review composables as production code, not as throwaway markup. Flag composables that are so large, deeply nested, or mixed-purpose that they obscure state ownership, make recomposition behavior hard to reason about, or prevent focused testing/reuse.
Prefer findings that point to a specific extraction boundary: a toolbar, row, empty state, footer, popup, repeated section, or distinct branch. Do not ask for arbitrary fragmentation; extraction should make the UI easier to read, name, test, or reuse.
Also check file organization and API polish:
For private helpers, KDoc often means the helper needs a clearer name or smaller scope instead.
For reusable component API design, use the AndroidX Compose API guidelines as high-level reference material, adapted for Compose Desktop/Jewel and without importing Android-only assumptions:
remember KeysCheck remember(...) calls that cache UI values derived from theme, density, locale, font scale, window state, Swing
LaF defaults, or similar environment-provided state.
Coarse keys such as a theme name, LaF name, dark-mode boolean, or no key can leave stale UI. Underlying colours, typography, metrics, strings, shortcut text, or defaults can change without that coarse label changing.
Report this only when stale output is plausible and user-visible. Good fixes are, in order:
remember if the calculation is cheap;remember keys;JewelTheme.instanceUuid in Jewel code.Do not mechanically demand more keys for every remember; the finding needs a concrete stale-cache risk.
If the task involves jank, slow UI, or recomposition issues, measure before diagnosing and again after any proposed fix. Use the relevant existing reference instead of duplicating the procedure here:
Use these guides when investigating jank, recomposition, or rendering performance with trace evidence:
Read reporting-guidance.md before producing the final report. In short:
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
实现或修改 IntelliJ `AnAction`,并在 `plugin.xml` 中注册。将显示名称和说明写入消息资源文件,按需设置图标,并通过事件协程作用域启动挂起任务,避免同步处理阻塞 IDE。
将 IntelliJ JPS 测试模块迁移到 Bazel,并排查仅在 Bazel 中出现的失败。根据症状检查依赖、插件、测试数据和 runfiles,重新生成并验证目标。
按 IntelliJ 项目规范编写或审查 Kotlin 和 Java 代码,涵盖语言选择、格式、密封类型、线程注解及控制流异常处理。
本指南帮助您按 IntelliJ 项目规则拆分更改并撰写提交信息:有工单时使用编号和变更说明,无工单时使用标签与子系统名,并在需要时说明原因和决定。
使用多个 Python 类型检查器比较代码片段或文件的类型推断和报错判断,并汇总各工具的结论、耗时与诊断信息,可保存为 Markdown 报告。
整理 Compose Desktop 界面中的状态和副作用,让可组合函数负责绘制,由展示器或协调器处理应用决策。了解状态归属、Effect、可复用组件接口、延迟列表键、动画和性能,适用于单项界面修改。