Skip to content
cccskills
FreePublished on GitHub

compose-ui-audit

Audit Compose Desktop code for architecture and runtime issues, including state ownership, effects, coroutine use, lazy lists, animation, and recomposition. It produces prioritized findings with file and line references, while keeping visual design outside the audit scope.

OriginalShow the original description

Audit Compose Desktop UI state and effects.

JetBrains/intellij-community20,664 stars(GitHub 20,664 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Auditing state ownership and presenter boundaries in a Compose screen
  • Investigating effects, coroutines, or flow collection in desktop UI
  • Reviewing recomposition, lazy-list, or animation performance concerns

Files included (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 (original)

Review the instructions the agent will receive before you install.

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

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

actions

FreeSummary

Implement or update IntelliJ `AnAction` classes and their `plugin.xml` registrations. Keep labels and descriptions in message bundles, configure optional icons, and launch suspending work through the event coroutine scope so synchronous action handling does not freeze the IDE.

  • Adding a new IntelliJ action
  • Updating an action's registration or icon
  • Moving action labels into a message bundle
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

Move IntelliJ JPS test modules to Bazel and diagnose failures that occur only under Bazel. The guide helps trace missing dependencies, plugins, test data, and runfiles, then verify the generated target and migrated tests.

  • Migrating a JPS test module to Bazel
  • Diagnosing a test failure that occurs only in Bazel
  • Checking Bazel dependencies and test data wiring
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

code-style

FreeSummary

Write or review Kotlin and Java code in line with IntelliJ project conventions. The guidance covers language choice, formatting, sealed types, threading annotations, and safe handling of control flow exceptions so changes fit the surrounding codebase.

  • Writing a new Kotlin file that follows IntelliJ conventions
  • Reviewing Java code and checking its style guidance
  • Checking formatting, sealed-type handling, or exception handling
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

commits

FreeSummary

Create, amend, or rename IntelliJ commits with messages that follow the project’s ticket and label formats. Keep each commit focused, explain the reason and decision in the body when needed, and pass the message safely through the shell or PowerShell.

  • Writing a message for a change linked to a YouTrack ticket
  • Preparing a commit message for tests, cleanup, or documentation
  • Amending or renaming an existing IntelliJ commit
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

Compare how Python type checkers interpret a code snippet or file. The script runs selected tools, including ty, pyrefly, basedpyright, mypy, and zuban, then produces a Markdown report with verdicts, timings, and each checker's diagnostic output.

  • Comparing type inference for a Python snippet
  • Checking whether a Python expression should be a type error
  • Reviewing differences among Python type checkers
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

Shape Compose Desktop UI code by keeping composables focused on rendering and placing application decisions in presenters or coordinators. Get guidance on state ownership, effects, reusable component APIs, lazy-list keys, animation, and performance for individual UI changes.

  • Separating screen rendering from application decisions
  • Choosing which UI state belongs in composition
  • Structuring effects and coroutine work
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

See all skills by JetBrains

Report a problem with this skill