Skip to content
cccskills
FreePublished on GitHub

compose-ui-architecture

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.

OriginalShow the original description

Write Compose Desktop UI state, effects, and presenter boundaries.

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

Run score Not tested

See how to install

Good for

  • Separating screen rendering from application decisions
  • Choosing which UI state belongs in composition
  • Structuring effects and coroutine work
  • Improving reusable components and lazy lists

Files included (8)

  • SKILL.md5.7 KB
  • evals/evals.json6.5 KB
  • references/animation.md11.3 KB
  • references/component-api-lists-performance.md3.7 KB
  • references/desktop-seams-review-output.md1.5 KB
  • references/effects.md1.7 KB
  • references/state-boundaries.md5.1 KB
  • skill-source.json2.0 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-architecture/SKILL.md -->

Compose UI Architecture

Use this skill to keep Compose Desktop UI code architecturally correct while editing IntelliJ-style desktop surfaces. This skill provides authoring and review guardrails for individual changes. When the user asks for a systemic Compose UI architecture assessment across a codebase, use compose-ui-audit instead.

For general post-change review or cleanup, use the review subagents available in the current harness instead of stretching this skill beyond UI architecture. If subagent delegation is unavailable, run those review passes sequentially yourself.

Do not use this skill to replace project docs. If the project has architecture docs, treat them as authoritative when details conflict.

Pair With / Defer To

Pair it with:

  • Pair this skill with jewel-ui when selecting Jewel components, theme wrappers, icons, typography, and IntelliJ-style controls.
  • Pair this skill with jewel-swing-interop when configuring Swing/AWT hosting, ComposePanel, LocalComponent, popups, and bridge theme mechanics.

Defer these adjacent tasks instead of stretching this skill:

  • Use jewel-ui for component choice, label rules, icons, theme wrappers, typography, and Jewel visual style.
  • Use jewel-swing-interop for ComposePanel, AWT popup forwarding, LocalComponent, and host Swing component access.
  • Use configured review or refactoring subagents for general post-change code review or cleanup, or run those passes sequentially yourself if delegation is unavailable.
  • Use compose-ui-audit for a whole-surface systemic Compose UI architecture assessment.

Desktop Compose Terminology

Be precise with names:

  • In Android docs, ViewModel roughly maps to a desktop UI presenter/coordinator layer.
  • In desktop Compose code, a view model may also mean a view-layer data model / screen projection, such as ScreenState, RowModel, or SurfaceModel. Avoid ambiguity by naming whether you mean lifecycle owner or render model.
  • Do not introduce Android ViewModel, Hilt/Koin, Android lifecycle, or Navigation guidance into desktop Compose UI unless the project already uses those concepts.

Core Rule

Compositions render. Presenters decide.

Composables may own ephemeral visual state: hover, focus, animation progress, expansion toggles, tooltip visibility, and layout wiring. They must not own app state, persistence, RPC, file/process/network work, JSON parsing, model selection, permission policy, review workflow decisions, or workspace/config lookup.

Route those through presenters/coordinators or equivalent state-owning layers and expose ready-to-render view models to UI.

Fast Guardrail Pass

Before returning Compose UI code, silently check these questions:

  1. Boundary: does the composable render inputs, or does it decide business/app behavior?
  2. State: is local state truly ephemeral? If state mirrors app/session/project settings, move it up.
  3. Projection: should several values be combined into one presenter-owned screen state before UI sees them?
  4. Effects: does every effect stay minimal and key on the values that should restart it?
  5. Modifier: do reusable composables accept and forward modifier: Modifier = Modifier to the outermost layout?
  6. Lists: do movable and heterogeneous lazy-list items pass a stable key = parameter and a matching contentType = parameter?
  7. Performance: does composition avoid expensive transforms, object churn, and broad state reads?
  8. Animation: does the animation code use declarative APIs where possible, wrap stateful animation objects in remember, and read per-frame values in the layout or draw phase?
  9. API shape: do reusable components accept immutable data and event callbacks instead of presenter instances or mutable state objects?

If an answer is no, fix the shape before writing more code rather than documenting the violation.

Also check for false positives. Local hover state, focus requesters, text-field state, expansion toggles, scroll commands, and one-shot UI labels are usually fine in composition when they do not shadow app/session state.

Progressive Reference Files

Read only the reference files needed for the current task:

  • Read references/state-boundaries.md for rules on presenter/coordinator vs. state-holder vs. composition boundaries, desktop lifecycle, flow collection, CompositionLocal guardrails, and testing ownership.
  • Read references/effects.md for rules on remember, LaunchedEffect, DisposableEffect, snapshotFlow, coroutine scopes, and effect keys.
  • Read references/animation.md when choosing animation APIs, remembering Animatable state, launching target-driven effects, deferring animated reads, or using AnimatedContent, infinite transitions, and gesture-driven motion.
  • Read references/component-api-lists-performance.md for rules on reusable composable API shape, modifier contracts, lazy-list keys and content types, recomposition and performance smells, and healthy patterns to preserve.
  • Read references/desktop-seams-review-output.md for guidance on desktop dialogs, popups, shortcuts, clipboard and URI opening, window state, protocol and runtime seams, and the file-grounded review output format.

Review Output

When reviewing code with this skill, keep output short and file-grounded:

### path/to/File.kt
- Issue: [rule name]
- Why it matters: [one sentence]
- Fix: [specific direction or tiny before/after]

End with the top three fixes, highest impact first. Do not list clean files.

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

compose-ui-audit

FreeSummary

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.

  • 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
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

See all skills by JetBrains

Report a problem with this skill