ui-loop

ui-loop is a skill for Claude Code from kvdm-co-pilot/create-cmp. It costs 144 tokens per session (1,077 once invoked), scanned B, original, MIT.

A headless screen-preview workflow for checking an app's real screens without using a physical device or emulator. It reports which screens changed and whether an edit built successfully.

In plain words
What is it for?
Use it to render screens, see a live gallery, wait for an edit to finish rendering, identify affected screens, and compare a screen before and after a change.
Why use it?
It gives visual feedback during interface work and catches compile errors or unintended screen changes before a device check. A screen preview is a rendered view of the app's interface.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

Part of the create-cmp plugin — 18 skills, 4 agents, 3 hooks, 1 MCP server shipped together

Good fit Use it to render screens, see a live gallery, wait for an edit to finish rendering, identify affected screens, and compare a screen before and after a change.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kvdm-co-pilot/create-cmp/ui-loop
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 kvdm-co-pilot/create-cmp --skill ui-loop
Clone the repo
git clone --depth 1 https://github.com/kvdm-co-pilot/create-cmp

Made for: Claude Code.

Or install create-cmp, the plugin that ships this one along with the rest of its 18 skills, 4 agents, 3 hooks, 1 MCP server.

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 ui-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/kvdm-co-pilot/create-cmp/ui-loop/github.svg)](https://agentmods.dev/skills/kvdm-co-pilot/create-cmp/ui-loop)
Your own site
<a href="https://agentmods.dev/skills/kvdm-co-pilot/create-cmp/ui-loop"><img src="https://agentmods.dev/badge/skills/kvdm-co-pilot/create-cmp/ui-loop/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 ui-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/kvdm-co-pilot/create-cmp/ui-loop"><img src="https://agentmods.dev/badge/skills/kvdm-co-pilot/create-cmp/ui-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 144 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,077 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00144 $0.01077
Opus 5.5 $0.00058 $0.00431
Sonnet 5.5 $0.00029 $0.00215
Haiku 4.5 $0.00014 $0.00108

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

Security

Grade B, and why

ui-loop scanned grade B with 1 finding 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 25d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

which it is: the plugin is disabled (`enabledPlugins` in `~/.claude/settings.json` or the
template/.claude/skills/ui-loop/SKILL.md · 70 lines

What it actually says

UI feedback loop — see what you build, without a device

While building or changing any screen, use the preview loop instead of an emulator. It renders this app's real screens (real DI, real theme, seeded data) headlessly in seconds and tells you what your edit changed.

With the create-cmp plugin (cmp-inspector MCP tools):

  1. preview { projectDir } — once per session. Returns a live gallery URL for the human (it re-renders on every save) and per-screen structural summaries for you. Sources are watched; you never run Gradle by hand.
  2. After each edit: preview_status { waitForRender: true } blocks until the outcome. changedLastRender names the screens your edit touched (empty = the edit reached no screen); lastErrorSource: "compile" means the edit did not build — the compiler's e: lines are in lastError.
  3. preview_diff { screen } proves the change in one call: proven-clean / changed-with-regressions / no-change. No snapshot bookkeeping.

If the tools are missing: capability absence is a fault to diagnose and report — never a silent fallback. If ToolSearch finds no cmp-inspector tools, STOP and tell the human which it is: the plugin is disabled (enabledPlugins in ~/.claude/settings.json or the project settings); the session predates the plugin's enablement (MCP servers attach at session start — restart the session; no in-session retry will surface them); or the plugin copy is stale/broken (run cmp-doctor's inspector-MCP check group). Report before degrading.

Degraded path — for environments where the plugin is genuinely unavailable (CI, other agents), and only after the fault is reported: ./gradlew :composeApp:renderScreens renders every screen to composeApp/build/previews/<id>/{screen.png, tree.json} (-Pscreen=<id> for one); node qa/preview-gallery.mjs builds a self-contained gallery page from the output. What this loses: on-save re-render, changed-screen attribution, compile errors in-band, and the preview_diff change proof — structured feedback replaced by pixels.

Live tier — the human's live device view (standing step). Whenever connect_live succeeds, OFFER the remoteUrl it returns (http://127.0.0.1:9500/inspect/remote) to the human — every time, not as a maybe. It is a self-contained browser page that mirrors the running app (~700ms refresh) with click-to-tap driving the real device: they watch and drive the actual app while you assert on the tree (navigate_and_inspect — its before/after delta is the change proof live — and inspect_tree). It is also the right way for a human to watch an e2e run.

Asserting persisted state: db_query reads bounded rows from the running app's database; use it when a flow's proof is a row existing (or not) after an action, instead of shelling into sqlite or trusting the UI.

When the app crashes or misbehaves on device: runtime_crashes returns persisted crashes with cause attribution and runtime_logs bounded structured logcat for the app's pid; use these before hand-grepping adb logcat.

Screens come from inspector/PreviewRegistry.kt (desktopMain). The add-feature and add-screen stampers auto-register stamped screens at the // cmp:anchor preview-registry marker; when you add a screen by hand, register it there — a forced-state variant is just another entry ("home@empty"). Every common component also carries a story entry ("component.<kebab-name>" in inspector/ComponentStories.kt); when you add a component, add its story — the lane's componentStories step fails naming the missing id otherwise. Assert on tree.json structure; never read PNG bytes. Pixels are for humans.

A human comment left from the preview console follows .claude/rules/comments.md — read it before acting on or resolving one.

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. 25d ago First seen · 70 lines · 144 tokens per session scan B 64203348b2eb

Subscribe to this mod's changes

ui-loop is a skill published in the GitHub repository kvdm-co-pilot/create-cmp (0 stars, last pushed 4d ago), licensed MIT. It adds 144 tokens to every session and 1,077 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-30.

Related

Other skills, from other repositories

m3-expressive

Material 3 Expressive design patterns for Jetpack Compose - expressive theming, motion physics, shape morphing, typography emphasis, color emphasis, and all 28 expressive components.

TalissonVitorino/kmp-ios-skills · 41 tokens

liquid-glass

Apple Liquid Glass design patterns for SwiftUI iOS 26 - glass effects, morphing, containers, interactive glass, tinting, accessibility, and cross-platform glass design.

TalissonVitorino/kmp-ios-skills · 40 tokens

tipkit

In-app tips and feature discovery on iOS/macOS with Apple's TipKit — the Tip protocol (title/message/image/actions/options/id), display via TipView, popoverTip(:arrowEdge:action:), and UIKit TipUIView/TipUIPopoverViewController; eligibility with @Parameter + the #Rule macro and Event.donate(); Tips.configure…

TalissonVitorino/kmp-ios-skills · 228 tokens

kmp-glassmorphism-ui

Implements a production-grade Glassmorphism design system for Kotlin Multiplatform (KMP) Compose Multiplatform projects. Use when the user asks for glass UI, frosted glass effects, glassmorphism theme, translucent/transparent UI components, liquid/blob animated backgrounds, or premium modern dark-mode design in a…

Aks-4125/kmp-glassmorphism-skill · 81 tokens

accessibility-patterns

Mobile accessibility patterns for Android and iOS - content descriptions, touch targets, screen reader support, WCAG compliance, dynamic type, and color contrast.

TalissonVitorino/kmp-ios-skills · 35 tokens

compose-adaptive

Instructions to make or update an app's UI so that it adapts to different Android devices including phones, tablets, foldables, laptops, desktop, TV, Auto and XR. It includes how to handle different window sizes, pointing devices (such as mouse) and text entry devices (such as keyboard) using the Compose MediaQuery…

TalissonVitorino/kmp-ios-skills · 119 tokens