compose-ui-testing-patterns

compose-ui-testing-patterns is a skill for Claude Code, Codex from ashtanko/compose-android-template. It costs 54 tokens per session (1,637 once invoked), scanned A, original, MIT.

A guide to testing Jetpack Compose user interfaces, including screen states, user actions, keyboard focus, and visual appearance. Jetpack Compose is Android’s toolkit for building app screens.

In plain words
What is it for?
Use it when writing or reviewing Compose UI tests, screenshot tests, previews, accessibility semantics checks, image-loading fakes, keyboard input, focus, or pressed and hovered states.
Why use it?
It helps you choose a test that matches what you need to prove, without making simple UI checks depend on navigation or other app systems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when writing or reviewing Compose UI tests, screenshot tests, previews, accessibility semantics checks, image-loading fakes, keyboard input, focus, or pressed and hovered states.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ashtanko/compose-android-template/compose-ui-testing-patterns
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 ashtanko/compose-android-template --skill compose-ui-testing-patterns
Clone the repo
git clone --depth 1 https://github.com/ashtanko/compose-android-template

Made for: Claude Code, Codex.

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-ui-testing-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/ashtanko/compose-android-template/compose-ui-testing-patterns/github.svg)](https://agentmods.dev/skills/ashtanko/compose-android-template/compose-ui-testing-patterns)
Your own site
<a href="https://agentmods.dev/skills/ashtanko/compose-android-template/compose-ui-testing-patterns"><img src="https://agentmods.dev/badge/skills/ashtanko/compose-android-template/compose-ui-testing-patterns/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-ui-testing-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/ashtanko/compose-android-template/compose-ui-testing-patterns"><img src="https://agentmods.dev/badge/skills/ashtanko/compose-android-template/compose-ui-testing-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,637 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.00054 $0.01637
Opus 5.5 $0.00022 $0.00655
Sonnet 5.5 $0.00011 $0.00327
Haiku 4.5 $0.00005 $0.00164

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

Security

Grade A, and why

compose-ui-testing-patterns 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 1mo 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.agents/skills/compose-ui-testing-patterns/SKILL.md · 179 lines

How it starts

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

Compose: UI testing patterns

Core principle

Test the smallest UI contract that proves the behavior. Prefer plain state-driven UI tests with callbacks. Add integration only when lifecycle, navigation, DI, or platform behavior is the thing under test.

Test target choice

What you need to prove Test shape
Text, button, loading/error branch, conditional content Plain UI Compose test
Callback wiring from click/input Plain UI Compose test
Focus navigation or keyboard behavior Compose test with key input
Visual layout, clipping, elevation, typography, image composition Screenshot test
State holder updates UI correctly State holder/unit test plus one wiring smoke test
Hover, pressed, focused, dragged interaction state Plain UI test with MutableInteractionSource
Navigation, lifecycle, DI integration Integration test

Prefer plain UI tests

If the screen has a state holder/UI split, test the plain UI composable:

composeTestRule.setContent {
    ProfileScreen(
        state = ProfileUiState(name = "Ada", canSave = true),
        onNameChange = {},
        onSaveClick = { saved = true },
        onBackClick = {},
    )
}

composeTestRule.onNodeWithText("Ada").assertIsDisplayed()
composeTestRule.onNodeWithText("Save").performClick()

assertThat(saved).isTrue()

This avoids constructing ViewModels, components, repositories, navigation, and dependency graphs for layout behavior.

Semantics first

Assert semantics when behavior is semantic:

  • Text exists: onNodeWithText.
  • Button is enabled/disabled: assertIsEnabled, assertIsNotEnabled.
  • Content is selected/focused/toggled: use semantics assertions.
  • Content is absent: assertDoesNotExist.

Use test tags for nodes that have no stable user-visible text or where multiple nodes share text. Do not use tags as the first choice for all assertions; user-visible semantics are usually stronger.

Callback testing

Use simple counters or captured values:

Read the full file on GitHub · 179 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. 1mo ago First seen · 179 lines · 54 tokens per session scan A ea6f433270a7

Subscribe to this mod's changes

compose-ui-testing-patterns is a skill published in the GitHub repository ashtanko/compose-android-template (13 stars, last pushed 10d ago), licensed MIT. It adds 54 tokens to every session and 1,637 once invoked, about $0.0002 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

compose-ui-testing

Expert guidance on Jetpack Compose UI testing with createAndroidComposeRule, semantics matchers, synchronization, and screenshot tests with Paparazzi or Roborazzi. Use this for instrumented and screenshot UI tests.

almasumdev/awesome-kotlin-android-agent-skills · 46 tokens

android-ui-journey-testing

XML-specified Android UI journey testing, interactive step execution, assertion verification, and JSON outcome reporting.

sickn33/agentic-awesome-skills · 27 tokens

solopi-ai

A command-line framework for testing Android apps and devices with SoloPi, including on-device or cloud AI decision models. It manages devices, test cases, recorded interactions, replays, performance history, and evidence.

alipay/SoloPi · 82 tokens

argent-test-ui-flow

Autonomously test an app UI (iOS or Android) by running interact-screenshot-verify loops using argent MCP tools. Use when testing UI flows, verifying login works, testing navigation, running UI test scenarios, manual QA steps, visible UI changes, or visual behavior.

software-mansion/argent · 61 tokens

mobile-automation

Control Android and iOS devices, emulators and simulators — launch apps, tap, swipe, type, take screenshots, read the accessibility tree. Use when a task involves a mobile device or app, mobile UI testing, or reproducing a bug on a phone.

mobile-next/mobile-mcp · 58 tokens

argent-qa-e2e

Write repeatable QA regression e2e tests from test cases, tickets, or acceptance criteria. Use when the user asks to write, automate, or generate an e2e test or preserve an automated regression scenario, with deterministic setup, stable targets, executable structural or visual evidence, and two consecutive full…

software-mansion/argent · 137 tokens