android-device-testing

android-device-testing is a skill for Claude Code, Codex from GuillemRoca/agent-skills-android. It costs 39 tokens per session (2,776 once invoked), scanned A, original, MIT.

Guidance for testing Android apps on real phones or emulators, which are virtual Android devices. It covers tests that interact with the app interface, device controls, and tools for inspecting what is displayed.

In plain words
What is it for?
Writing Espresso, UI Automator, or Jetpack Compose tests; managing emulators with ADB; inspecting accessibility and layouts; and checking behavior across devices.
Why use it?
Some problems appear only on a device, at a particular Android version, screen size, or interface layout. Device-based tests and inspection help reproduce and diagnose them.

Skill for Claude CodeCodex

Part of the agent-skills-android plugin — 29 skills, 7 commands, 3 agents, 1 hook shipped together

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.

agentmods
npx agentmods add skills/guillemroca/agent-skills-android/android-device-testing
Any agent
npx skills add GuillemRoca/agent-skills-android --skill android-device-testing
Clone the repo
git clone --depth 1 https://github.com/GuillemRoca/agent-skills-android

Made for: Claude Code, Codex.

Or install agent-skills-android, the plugin that ships this one along with the rest of its 29 skills, 7 commands, 3 agents, 1 hook.

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 android-device-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/guillemroca/agent-skills-android/android-device-testing.svg)](https://agentmods.dev/skills/guillemroca/agent-skills-android/android-device-testing)
Your own site
<a href="https://agentmods.dev/skills/guillemroca/agent-skills-android/android-device-testing"><img src="https://agentmods.dev/badge/skills/guillemroca/agent-skills-android/android-device-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,776 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00039 $0.02776
Opus 5 $0.00019 $0.01388
Sonnet 5 $0.00008 $0.00555
Haiku 4.5 $0.00004 $0.00278

Measured 4d ago against content hash 213102bd7d5f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

android-device-testing 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 4d 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.

skills/android-device-testing/SKILL.md · 328 lines

How it starts

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

Android Device Testing

Overview

Test your app on real or emulated Android devices. This skill covers instrumented testing frameworks (Espresso, UI Automator, Compose testing), device management (ADB, emulators), UI inspection (Layout Inspector), and debugging tools for on-device behavior.

When to Use

  • Writing instrumented tests (UI tests that run on a device/emulator)
  • Debugging behavior that only reproduces on-device
  • Setting up emulators for CI or local testing
  • Inspecting UI hierarchy, accessibility, or layout issues
  • Verifying behavior across API levels or screen sizes

Skip when: Writing unit tests that don't need a device (use JUnit5 + MockK instead).

Core Process

Step 1: Compose UI Testing

  1. Set up Compose test dependencies:
// build.gradle.kts
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-test-manifest")
  1. Write Compose UI tests:
@get:Rule
val composeTestRule = createComposeRule()

@Test
fun taskItem_displaysTitle() {
    composeTestRule.setContent {
        AppTheme {
            TaskItem(
                task = Task("1", "Buy groceries", false),
                onToggle = {},
                onDelete = {},
            )
        }
    }

    composeTestRule
        .onNodeWithText("Buy groceries")
        .assertIsDisplayed()
}

@Test
fun taskItem_toggleCallsCallback() {
    var toggledId: String? = null

    composeTestRule.setContent {
        AppTheme {
            TaskItem(
                task = Task("1", "Buy groceries", false),
                onToggle = { toggledId = it },
                onDelete = {},
            )
        }
    }

    composeTestRule
        .onNodeWithContentDescription("Buy groceries")
        .performClick()

    assertEquals("1", toggledId)
}

@Test
fun taskList_showsEmptyState_whenNoTasks() {
    composeTestRule.setContent {
        AppTheme {
            TaskListContent(
                uiState = TaskListUiState.Success(tasks = emptyList()),
                onToggle = {},
                onDelete = {},
            )
        }
    }

    composeTestRule
        .onNodeWithText("No tasks yet")
        .assertIsDisplayed()
}

Read the full file on GitHub · 328 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. 4d ago First seen · 328 lines · 39 tokens per session scan A 213102bd7d5f

Subscribe to this mod's changes

android-device-testing is a skill published in the GitHub repository GuillemRoca/agent-skills-android (2 stars, last pushed 2mo ago), licensed MIT. It adds 39 tokens to every session and 2,776 once invoked, about $0.0002 per session on Opus 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.