compose-ai-tools
Render @Preview composables to PNG outside Android Studio, so AI coding
agents can see what they’re changing. Works with Jetpack Compose
(Android, via Robolectric) and Compose Multiplatform Desktop (via
ImageComposeScene).
Alongside each PNG the renderer can emit structured data products — ATF accessibility findings, layout-inspector trees, recomposition heat maps, resolved theme tokens, drawn text, and more — so an agent can reason about the UI, not just look at it.
Installation
Gradle plugin
The plugin is published to Maven Central — no auth, no PAT.
// <module>/build.gradle.kts
plugins {
id("ee.schimke.composeai.preview") version "0.10.1"
}
Then:
./gradlew :app:discoverPreviews # scan @Preview annotations
./gradlew :app:renderAllPreviews # render every @Preview to PNG
Requires Java 17+, Gradle 9.4.1+, AGP 9.1+ (Android), Kotlin 2.2.21, Compose Multiplatform 1.10.3 (Desktop).
VS Code extension
Published to the VS Code Marketplace and Open VSX (for VSCodium / Cursor / Windsurf).
Install from inside the IDE: open the Extensions view (⇧⌘X / Ctrl+Shift+X), search Compose Preview, click Install.
CLI
Install on $PATH for shell or agent use via the bootstrap script:
curl -fsSL https://raw.githubusercontent.com/yschimke/compose-ai-tools/main/scripts/install.sh | sh
Agent skill
Point any agent that can fetch a URL at
skills/compose-preview/SKILL.md
— the skill is a complete install-and-iterate playbook.
CI / GitHub Actions
Composite actions for CI pipelines:
install— pin the CLI on$PATH.preview-baselines— push baselines to a branch.preview-comment— before / after PR comments.a11y-report— accessibility findings on PRs.
Where next?
- Reference — one page per data product (a11y, layout, theme, recomposition, scroll captures, …): what it is, what it answers, and how to enable it.
- How it works — discovery, renderer pipeline, caching.
- Samples — rendered baselines for
samples:android,samples:wear,samples:cmp,samples:remotecompose, regenerated on every push tomain. - Releases · Changelog · License (Apache 2.0).