本文へ移動
cccskills
無料GitHub で公開日本語紹介

compose-ui-audit

Compose DesktopのUIコードを読み、状態管理、画面構成、副作用、コルーチン、再描画の性能など、設計と実行時の問題を具体例とともに監査するスキルです。

原文原文の説明を見る

Audit Compose Desktop UI state and effects.

JetBrains/intellij-communityスター 20,665(GitHub 20,665 + cccskills 0)

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • Compose画面の状態管理を監査したいとき
  • 副作用やコルーチンの使い方を点検したいとき
  • 再描画や遅延リストの性能を調べたいとき

日本語での紹介

できること

Compose DesktopのUIコードを対象に、設計上の境界やComposeランタイムの使い方を読み取り、根拠のある問題を報告します。Composable内にアプリの状態や業務ロジックが入り込んでいないか、状態の所有者が適切か、rememberのキーやローカル状態が妥当かを確認します。LaunchedEffect、DisposableEffect、snapshotFlow、コルーチンの使い方、フロー収集やリソースのライフサイクルも監査対象です。

さらに、遅延リストのキーやcontentType、再描画時の処理、アニメーションAPI、Modifierの受け渡しと順序、Composableの大きさや公開APIの形を確認します。デスクトップ固有のフォーカス、ショートカット、ダイアログ、ファイル選択、クリップボードなどの接点も対象です。指摘には優先度、該当箇所、修正案を含め、調査範囲と確度も明示します。必要な場合は計測やトレースの資料を参照します。

こんなときに便利

Compose Desktopの画面やツールウィンドウについて、状態管理や副作用の設計を点検したいときに向いています。再描画の遅さやアニメーションの不具合を調べる場合にも、具体的なコード箇所から原因候補を整理できます。

使い方の例

  • 「この画面のComposeアーキテクチャを監査して」
  • 「このツールウィンドウの状態管理と副作用を確認して」
  • 「遅延リストとアニメーション周りの性能上の懸念を調べて」

注意点

監査対象はCompose Desktopの設計とランタイムです。見た目のデザイン評価、Jewelの部品選定、Android固有の設計は対象外です。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(39)

  • SKILL.md14.1 KB
  • evals/evals.json18.1 KB
  • references/api-hygiene.md8.8 KB
  • references/audit-search-patterns.md3.9 KB
  • references/boundary-violations.md3.3 KB
  • references/effects/derived-state-of-guide.md2.2 KB
  • references/effects/effect-selection-guide.md2.7 KB
  • references/effects/infinite-loop-patterns.md2.6 KB
  • references/effects/overview.md7.7 KB
  • references/lazy-layouts/animate-item.md2.0 KB
  • references/lazy-layouts/cache-window-and-prefetch.md3.2 KB
  • references/lazy-layouts/desktop-scroll-measurement.md2.0 KB
  • references/lazy-layouts/keys-and-content-type.md2.2 KB
  • references/lazy-layouts/nested-lazy-layouts.md1.6 KB
  • references/lazy-layouts/overview.md7.5 KB
  • references/measurement/benchmarking-methodology.md1.9 KB
  • references/measurement/overview.md5.5 KB
  • references/measurement/profiler-setup.md2.5 KB
  • references/modifiers/custom-modifier-node.md3.4 KB
  • references/modifiers/modifier-order.md2.1 KB
  • references/modifiers/overview.md7.4 KB
  • references/modifiers/phase-deferral.md2.6 KB
  • references/reporting-guidance.md2.3 KB
  • references/stability/ci-stability-gate.md2.0 KB
  • references/stability/desktop-measurement.md2.2 KB
  • references/stability/overview.md7.6 KB
  • references/stability/reading-classes-txt.md2.1 KB
  • references/stability/reading-composables-txt.md1.9 KB
  • references/stability/stabilising-types.md3.1 KB
  • references/stability/stability-config-syntax.md1.6 KB
  • references/stability/stability-inference-algorithm.md3.4 KB
  • references/stability/strong-skipping-escape-hatches.md2.6 KB
  • references/subcomposition/desktop-subcomposition-measurement.md1.7 KB
  • references/subcomposition/overview.md7.2 KB
  • references/subcomposition/subcomposition-decision-tree.md1.8 KB
  • references/subcomposition/swing-panel-subcomposition.md1.8 KB
  • references/tracing-setup.md5.3 KB
  • references/tracing-usage.md6.3 KB
  • skill-source.json2.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

<!-- Generated by community/.ai/render-guides.mjs; edit community/.agents/skills/compose-ui-audit/SKILL.md -->

Compose UI Audit

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.

Relationship To Agent Review Capabilities

  • For a quick second opinion on current changes, use an available read-only review subagent.
  • For cleanup or consolidation after implementation, use an available cleanup or refactoring subagent, then review the diff.
  • For a slow investigative review, use available deeper review subagents or specialist reviewers.
  • For a Compose UI architecture and runtime review specifically, use this skill directly.

Scope

In scope:

  • composition-vs-presenter boundary violations
  • app/state/workflow logic inside composables
  • remember, derivedStateOf, and local state misuse
  • LaunchedEffect, DisposableEffect, snapshotFlow, and coroutine-scope misuse
  • lazy-list keys and contentType
  • The audit covers modifier forwarding and order, composable size, file organization, KDoc, and reusable composable API shape.
  • Review Detekt and Compose-rules signals that affect UI API contracts, state ownership, effects, or hot-path performance.
  • recomposition/performance smells in Compose Desktop code
  • The audit checks animation API choice, remembered animation state, target-driven effects, and phase-correct animated reads.
  • desktop flow collection and coherent screen projections
  • state-holder shape and testability
  • The audit covers desktop seams including focus, keyboard shortcuts, dialogs and file pickers, clipboard and open URI handling, popups, window-local state, and protocol or runtime-backed UI boundaries.

Out of scope unless the user explicitly asks:

  • Defer Jewel component choice, theme wrappers, icon APIs, and typography details to jewel-ui.
  • low-level Swing/AWT interop mechanics; defer to jewel-swing-interop
  • Android-specific topics include Android lifecycle, collectAsStateWithLifecycle, Navigation, Material, Accompanist, baseline profiles, and R8.
  • numeric Android-style 0-100 scoring
  • broad Detekt cleanup unrelated to Compose UI architecture

Output Shape

## 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.

Audit Process

1. Confirm target

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.

2. Map the surface

Find representative files before judging:

  • screens and full layouts
  • reusable components
  • timeline / lazy-list surfaces
  • settings panels
  • permission/review workflow UI
  • state-holder classes
  • presenter projection classes consumed by UI

For broad audits, name the sampled surface in the report.

3. Gather evidence

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.

4. Judge by desktop Compose categories

Use the category checklist below, but avoid re-reading every reference file. Open only the reference files needed for actual evidence you find.

CategoryWhat to checkRead when deeper diagnosis is needed
Boundary and state ownershipBusiness/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 collectionMultiple raw flows that must be coherent, resource-producing flows started from leaves, composition-owned file watchers/subprocesses/loopseffects/overview.md
Effects and coroutine usageWork launched from bodies, bad effect keys, stale callbacks, missing cleanup, noisy snapshotFlow, business workflows in effectseffects/overview.md
Lazy lists and recompositionMissing stable keys/content types, per-row lookups, row/model churn, hot-path transforms, stale remember caches for theme/environment-derived UI valueslazy-layouts/overview.md, stability/overview.md
AnimationWrong animation API, unremembered Animatable, target-driven animation launched from composition, per-frame values read during composition, broad AnimatedContent targets, offscreen infinite transitionscompose-ui-architecture animation, modifiers/overview.md, lazy-layouts/animate-item.md
Modifier/API shapeSwallowed 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 composablesapi-hygiene.md, modifiers/overview.md
Desktop interop seamsAWT/Swing details in leaves, shortcut paths bypassing presenter checks, persisted window/session policy in remember, protocol/runtime work in UIsubcomposition/overview.md

Composable Size, Nesting, And API Hygiene

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:

  1. public screen/entry-point composables should appear near the top of the file;
  2. private sub-composables should generally follow in top-down usage order;
  3. helpers/constants should stay close to the code that uses them unless project conventions say otherwise;
  4. public or cross-file reusable composables should have KDoc explaining purpose, important parameters, slot expectations, and non-obvious behavior.

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:

Theme And Environment-Sensitive remember Keys

Check 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:

  1. remove remember if the calculation is cheap;
  2. pass the concrete inputs used by the calculation as remember keys;
  3. key by a framework-provided theme/environment change token when the dependency is broad or not practical to enumerate, such as JewelTheme.instanceUuid in Jewel code.

Do not mechanically demand more keys for every remember; the finding needs a concrete stale-cache risk.

5. Optional: performance diagnosis

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:

6. Optional: Perfetto tracing

Use these guides when investigating jank, recomposition, or rendering performance with trace evidence:

Reporting Rules

Read reporting-guidance.md before producing the final report. In short:

  • Cite concrete file paths and line numbers where possible.
  • Prefer 2-4 representative examples for systemic findings.
  • Do not infer runtime problems from a grep hit alone.
  • Do not double-count one root cause across categories.
  • Separate Compose runtime/architecture findings from Jewel component-choice findings.
  • When no serious issues are found, say so with confidence/limits and low-priority polish only.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

actions

無料概要あり

IntelliJプラグインのAnActionと登録設定を実装・変更し、表示文言やアイコンの定義、非同期処理の起動方法を整えます。

  • IDEに新しいアクションを追加したいとき
  • アクションの登録やアイコンを変更したいとき
  • 表示名と説明文の定義を整理したいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

bazel-test-migration

無料概要あり

IntelliJのJPSテストモジュールをBazelへ移行し、Bazelだけで起きる失敗を依存関係や実行環境から切り分ける手順を案内します。

  • JPSテストをBazelへ移行したいとき
  • Bazelだけで起きるテスト失敗を調べたいとき
  • テストの依存関係やデータ設定を確認したいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

code-style

無料概要あり

IntelliJのKotlin・Javaコードを新規作成やレビューする際に、言語の選び方、書式、型の扱い、例外処理などのプロジェクト規約に沿って整えるスキルです。

  • IntelliJ規約に沿ってKotlinを書きたいとき
  • Javaコードをレビューしたいとき
  • 例外処理やsealed型の分岐を確認したいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

commits

無料概要あり

IntelliJ向けの変更を適切な単位に分け、チケットの有無に応じた形式で、理由や判断も伝わるコミットメッセージを作成・修正するスキルです。

  • チケット付き変更のメッセージを作りたいとき
  • テストやドキュメントのコミットを整理したいとき
  • 既存のコミットメッセージを修正したいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

compare-python-typecheckers

無料概要あり

Pythonコードの型推論や型エラーを複数の型チェッカーで比較し、各ツールの判定と診断内容をまとめたレポートを作成します。

  • 型推論の違いを比較したいとき
  • 型エラーになるか確かめたいとき
  • 複数チェッカーの診断を見比べたいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

compose-ui-architecture

無料概要あり

Compose Desktopの画面で状態や副作用をどこに持たせるか整理し、表示と判断の境界、再利用部品やリストの設計を整えます。

  • 画面とプレゼンターの責務を分けたいとき
  • UI状態の置き場所を整理したいとき
  • Effectやコルーチンの使い方を見直したいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

JetBrains のスキルをすべて見る

このスキルの問題を報告する