Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/skydoves/android-testing-skillsnpx agentmods add skills/skydoves/android-testing-skills/setting-up-host-vs-device-testsWrote 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.
[](https://agentmods.dev/skills/skydoves/android-testing-skills/setting-up-host-vs-device-tests)<a href="https://agentmods.dev/skills/skydoves/android-testing-skills/setting-up-host-vs-device-tests"><img src="https://agentmods.dev/badge/skills/skydoves/android-testing-skills/setting-up-host-vs-device-tests.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00185 | $0.04609 |
| Opus 5 | $0.00093 | $0.02305 |
| Sonnet 5 | $0.00037 | $0.00922 |
| Haiku 4.5 | $0.00018 | $0.00461 |
Grade A, and why
setting-up-host-vs-device-tests 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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 304 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Setting Up Host vs Device Tests — Pick the Right Source Set
Compose tests run unchanged on either Robolectric (JVM, fast, no emulator) or on a real/virtual device (full Android stack, RenderThread, accessibility). The same runComposeUiTest { setContent { … } } block compiles in both — only the underlying Looper and Choreographer differ. This skill encodes which flavor each test should live in, the Robolectric class skeleton, and the one legitimate Thread.sleep exception (screenshot tests waiting on the RenderThread).
When to use this skill
- The user is starting a Compose UI test and asks "test/ or androidTest/?".
- A test passes on a local emulator but fails on CI's Robolectric runner (or vice versa).
- The user reports
Build.FINGERPRINT == "robolectric"warnings fromenableAccessibilityChecks(...). - A screenshot test produces a black/empty PNG on the host runner.
- A ripple/
pressInteractiontest renders no ripple on Robolectric and the user is debugging why. - The user wrote
Thread.sleep(1000)to "wait for an animation" and is asking why it is flaky. - The user mentions
androidDeviceTest/androidHostTestsource sets (used inandroidxitself).
When NOT to use this skill
- The dependencies are not yet wired correctly — start with
./configuring-test-dependencies/SKILL.md. - The choice is between
createComposeRule()andrunComposeUiTest { }— see./choosing-test-rule-vs-runtest/SKILL.md. - The test runs in the right flavor but is flaky on idle/animation — see
../../synchronization/synchronizing-with-idle/SKILL.mdand../../synchronization/testing-animations-deterministically/SKILL.md.
Prerequisites
androidx.compose.ui:ui-test,ui-test-junit4, andui-test-manifeston the correct configurations for the chosen flavor — see./configuring-test-dependencies/SKILL.md.- For host tests:
org.robolectric:robolectricontestImplementation,testOptions { unitTests.isIncludeAndroidResources = true }in the Android block. - For device tests: a configured emulator or physical device,
androidx.test.runner.AndroidJUnitRunner(or a Hilt subclass) as thetestInstrumentationRunner. - Working knowledge of
MainTestClocksemantics — see the synchronization skill set.
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.
- 7d ago First seen · 304 lines · 185 tokens per session scan A 3c4cbe015687
setting-up-host-vs-device-tests is a skill published in the GitHub repository skydoves/android-testing-skills (318 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 185 tokens to every session and 4,609 once invoked, about $0.0009 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-30.
Other skills, from other repositories
mobiai-android-testing
Use when writing or running tests in an Android project — unit tests, UI tests, choosing the right framework and patterns.
flutter-testing-skill
Generates Flutter widget tests, integration tests, and golden tests in Dart. Supports local execution and TestMu AI cloud for real device testing. Use when user mentions "Flutter", "widget test", "WidgetTester", "testWidgets", "fluttertest", "integrationtest". Triggers on: "Flutter", "widget test", "Dart test"…
rn-testing
Testing React Native: Jest with jest-expo / react-native preset, React Testing Library Native, native module mocking, hook testing. Optional sections for Detox (native automation) and Maestro (declarative YAML e2e). Use this skill to: Configure Jest preset based on workflow. Write component tests with…
testing-reactnative
Testing React Native 0.85+. Use when writing tests, reviewing test coverage, or setting up testing.
ios-testing
Testing patterns for Swift and SwiftUI apps.
flutter-tester
Use when creating, writing, fixing, or reviewing tests in a Flutter project. Covers unit tests, widget tests, integration tests, Riverpod provider testing, and Mockito mocking. Provides Given-When-Then patterns, layer isolation strategies, and test setup for GetIt, SharedPreferences, and FakeDatabase.