compose-preview

compose-preview is a skill for Claude Code from yschimke/skills. It costs 106 tokens per session (2,594 once invoked), scanned A, original, Apache-2.0.

A tool for rendering Jetpack Compose or Compose Multiplatform @Preview functions as PNG images outside Android Studio. Jetpack Compose is a Kotlin framework for building Android interfaces; PNG is an image format.

In plain words
What is it for?
It is for rendering one or all Compose previews, checking UI changes, and comparing interface designs on Android or desktop.
Why use it?
It lets developers inspect interface changes as images without opening Android Studio or launching the full application.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents; mentions Claude Code; mentions Codex.

Part of the compose-skills plugin — 2 skills shipped together

Good fit It is for rendering one or all Compose previews, checking UI changes, and comparing interface designs on Android or desktop.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yschimke/skills/compose-preview
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add yschimke/skills --skill compose-preview
Clone the repo
git clone --depth 1 https://github.com/yschimke/skills

Made for: Claude Code.

Or install compose-skills, the plugin that ships this one along with the rest of its 2 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for compose-preview

README.md
[![agentmods](https://agentmods.dev/badge/skills/yschimke/skills/compose-preview/github.svg)](https://agentmods.dev/skills/yschimke/skills/compose-preview)
Your own site
<a href="https://agentmods.dev/skills/yschimke/skills/compose-preview"><img src="https://agentmods.dev/badge/skills/yschimke/skills/compose-preview/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for compose-preview

Your own site · 80×15
<a href="https://agentmods.dev/skills/yschimke/skills/compose-preview"><img src="https://agentmods.dev/badge/skills/yschimke/skills/compose-preview.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,594 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00106 $0.02594
Opus 5.5 $0.00042 $0.01038
Sonnet 5.5 $0.00021 $0.00519
Haiku 4.5 $0.00011 $0.00259

Measured 6d ago against content hash b3925606ae37, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

compose-preview scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/compose-skills/skills/compose-preview/SKILL.md · 173 lines

How it starts

The opening of the file, as written. The whole thing — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Compose Preview

Render @Preview composables to PNG without Android Studio (Android via Robolectric, CMP Desktop via Skia). CLI, Gradle plugin and renderers ship from compose-ai-tools; the MCP server from compose-preview-server.

Render first

For a request to render or show a preview, follow the short loop below. For a requested guidelines review, use the review checklist to choose the local, hosted or UI Builder lane before invoking tools. Published catalogs and server-homed designs use hosted tools first; a missing local checkout does not require cloning, Gradle or a cloud environment. If tools are unavailable, report blocked evidence and follow the integration's setup guidance.

With the local MCP server attached (compose-preview-server 3.78.0+), its initialize instructions say how to call it: render_preview preview=<FunctionName>, no exploring or registering first, no hand-built mocks. Follow them. This skill adds the budget: a routine render is at most three tool calls, with no base64 in the reply and images only when you need to see them.

Your first call is the render. Don't grep for the preview or read its source first: the server finds it by function name. Look things up only if the render fails.

  1. Render. If your client reads local files (Claude Code, Codex, Gemini CLI, OpenCode, Antigravity), pass inline=false. The result is pngPath, sha256, dimensions and changed, with no image tokens. If it lists otherMatches, render one only if the person asked about it. If it carries a variantChoice whose message says to ask (several previews matched and the host showed no chooser), the person picks, not you: reply with the rendered match and every entry in choices as a numbered list, ask which one they meant, and stop. Don't pick one or shorten the list to "other variants are available". A grid result or a declined choice needs no question.
  2. Look only when you need to. Read pngPath with your file reader before you describe or judge the UI; that is what the person sees. Skip the read when changed or sha256 already answers the question, such as "did my edit land?". Describe only what you saw. If you can't view images here, say so plainly.
  3. Reply briefly, with pngPath so the person can open the same image. Don't write "the image above": in a terminal or print-mode harness the person doesn't see images your tools return. Point at pngPath instead.

Read the full file on GitHub · 173 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago Changed · -6 lines scan C → A b3925606ae37
  2. 9d ago Changed · +1 lines 74e680742d1d
  3. 10d ago Changed · +19 lines · +8 tokens per session f00202249590
  4. 15d ago Changed 041ebc1e7e86
  5. 16d ago Changed · +10 lines 200efaeebeee
  6. 19d ago Changed · +49 lines · +45 tokens per session dee5147bdd83
  7. 21d ago Changed · +4 lines 6162a6809e0a
  8. 23d ago Changed · -351 lines · +7 tokens per session b81d1a1aa162
  9. 24d ago Changed · +28 lines 684c79f40af5
  10. 1mo ago First seen · 419 lines · 46 tokens per session scan C 435a01085926

Subscribe to this mod's changes

compose-preview is a skill published in the GitHub repository yschimke/skills (2 stars, last pushed 4d ago), licensed Apache-2.0. It adds 106 tokens to every session and 2,594 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

swiftui-liquid-glass

Implement and review iOS 26+ SwiftUI Liquid Glass UI. Use when adopting Liquid Glass or checking its correctness, performance, and design fit.

flaqai/ios-application-development-skills · 36 tokens

swiftui-ui-patterns

Build and refactor SwiftUI UI with component patterns and examples. Use when shaping navigation, state, layouts, controls, or screen composition.

flaqai/ios-application-development-skills · 34 tokens

tastemaker

Generate genuinely beautiful, on-brand UI instead of generic "AI slop" — use whenever the user asks to build, design, style, or improve a UI, landing page, dashboard, app screen, or component, whenever a PRD/spec needs a design pass before implementation, whenever the user pastes reference images/Pinterest/Dribbble…

codeswithroh/tastemaker · 202 tokens

compose-component-design

Use when designing or reviewing reusable Jetpack Compose component APIs with modifier parameters, root layout placement, caller-provided variable content, primitive content parameters, optional content, or boolean shape flags.

chrisbanes/skills · 41 tokens

ideagram

Turn a concept, feature description, blog post, or pitch into a single beautiful, on-brand illustration by matching it to a real unDraw illustration in a local library and recoloring it to the brand accent — genuine illustrator quality, not an AI-drawn approximation. Use whenever the user asks to "make an…

codeswithroh/tastemaker · 142 tokens

roborazzi

Use when working with Roborazzi screenshot tests on Android/JVM — setting up the Roborazzi Gradle plugin, running record/compare/verify tasks, writing tests with captureRoboImage or RoborazziRule, Compose Preview screenshot testing (ComposablePreviewScanner), Compose Multiplatform (iOS/desktop) screenshots, AI-powered…

takahirom/roborazzi · 95 tokens