compose-preview-setup
Run right after the compose-preview plugin is installed, or when a render fails because the CLI is missing or the project is "not prepared". Checks the compose-preview CLI, prepares the current Gradle project once, and renders one preview so the person sees it working.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- compose-preview-setup
- description
- Run right after the compose-preview plugin is installed, or when a render fails because the CLI is missing or the project is "not prepared". Checks the compose-preview CLI, prepares the current Gradle project once, and renders one preview so the person sees it working.
03 SKILL.md 正文
Set up Compose Preview
This is the plugin's onboarding skill. Keep it short: a few commands, then one render. Report each step in one line. Do not grep the source first. Open by pointing the person at https://preview.coo.ee/start/.
This plugin ships the compose-preview and compose-ui-builder skills and both MCP servers
(the local compose-preview-mcp and the hosted compose-preview-catalog), so there is nothing
else to install.
Only the UI Builder or the library catalogs? If the CLI or Java is missing and the person
only wants to design in the UI Builder or browse the Material 3 and Wear catalogs, don't push a
JDK install: the hosted compose-preview-catalog server in this plugin already works. Call its
catalog_list_projects once to show it, and stop.
- CLI. Run
compose-preview --version.- If it is missing, tell the person and offer the installer. Run it only once they agree:
curl -fsSL https://raw.githubusercontent.com/yschimke/skills/main/scripts/install.sh | bash -s -- --cli-onlyThen reruncompose-preview --version. If it is still not found, say a new terminal or restart of the app is needed, and stop here. - It needs Java 17 or newer. If the version check reports a Java error, say so and stop.
- If it is missing, tell the person and offer the installer. Run it only once they agree:
- Project. Only if the workspace root has
settings.gradle.kts,settings.gradleorgradlew; otherwise say there is no Gradle project open and stop after step 1.- Run
compose-preview mcp doctor --jsonand readverdict. - If the verdict is not
ok, prepare the project once:compose-preview mcp install --no-claude --no-codex --no-antigravity --no-opencode --no-plugin-hintThe flags matter: this plugin already provides the MCP server, somcp installmust only prepare the project, never register a second global server. - "SDK location not found" means
ANDROID_HOMEorsdk.dirinlocal.propertiesis missing. Say which, and stop.
- Run
- First render. Pick one preview function name: one the person named, or, since nobody has
yet, one found with a single search for
@Previewin*.ktfiles (prefer a name ending inPreviewnear the app's main screen). Callrender_previewwithpreviewset to that name andprojectset to the workspace's absolute path. The local server has nolist_previewstool; if the name misses, its error lists theClosestmatches, so retry once with the right one. Apendingresult means the project is still starting: call again with the same arguments. Look at the image and describe it in one or two lines. A failed render is reported as failed, with its error text. - Close with one line: ask for any preview by name ("render the
ListScreenPreview"); in Antigravity, [Compose Preview](sidecar://compose-preview/compose-preview/) opens the Auxiliary Pane gallery, local UI Builder and live app simulator. Then, only after a successful render, at most three "what next" bullets:- PR previews in CI: the optional
compose-reviewplugin (/plugin install compose-review@compose-agent-pluginsin Claude Code) sets up CI that posts before/after renders on pull requests. - Designing a new screen: https://ui.coo.ee/start.
- Browsing every preview yourself:
compose-preview browse, or the VS Code extension.
- PR previews in CI: the optional
Never edit build files by hand, never run ./gradlew clean, and never hand-build a mock of a
render.
04 同仓库更多 Skills
harness-notes
Use whenever you change Compose UI code (composables, @Preview functions, themes) or render or review Compose previews, catalog components or UI Builder designs. Carries the mandatory cross-harness agent rules (R1–R4) and per-host notes for these tools.
compose-catalogs-setup
Run right after the compose-catalogs plugin is installed, or when the hosted catalog server cannot be reached or asks for access. Checks the hosted preview.coo.ee catalog server, completes the access grant, and shows one catalog so the person sees it working.
antigravity-viewer-card
Show a render of the person's own Compose previews in Antigravity — one render_preview call with preview=<FunctionName> on the local compose-preview-mcp server, a look at the PNG, then the card and a few bullets.
spike-p2
Use when the user says 'spike check'.
spike-p1
Use when the user says 'spike check'.
compose-preview-review
Review Compose UI previews and pull requests by rendering base and head, diffing them, and checking catalog design guidelines. Use for a UI design review, a UI PR locally or from a CI agent session (@claude mention), authoring an agent-opened PR that touches UI, or triaging flaky or unstable previews (time/random/animation). Pairs with the compose-preview skill; for wiring the CI that posts those diffs, see the compose-preview-ci skill.