run-on-device
Skill1 starsChanged 40 days agoMITView on GitHub
Use when asked to run, launch, screenshot, or visually verify the app, or after a UI change that needs confirming in the running app. Selects a physical Android device or emulator, installs and launches with the android CLI, then inspects the UI with android layout / android screen. Also covers KMP desktop and JVM server run targets.
In this repository34 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- android-benchmark-comparisonSkill
- build-and-verifySkill
- compose-animationsSkill
- compose-component-designSkill
- compose-focus-navigationSkill
- compose-performanceSkill
- compose-state-and-effectsSkill
- compose-ui-testing-patternsSkill
- deliver-specSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- gradle-runSkill
- grillingSkill
- grounded-writingSkill
- implement-with-subagentsSkill
- kotlin-api-designSkill
- kotlin-architectureSkill
- kotlin-concurrency-and-flowSkill
- kotlin-control-flowSkill
- kotlin-skill-routerSkill
- new-featureSkill
- prototypeSkill
- release-kotlin-librarySkill
- researchSkill
- review-prSkill
- run-github-projectSkill
- setup-environmentSkill
- setup-issue-trackerSkill
- shepherdSkill
- tddSkill
- to-planSkill
- triageSkill
- wayfinderSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
If ANDROID_SERIAL is set or the user named a device, use it.
- Very specific: line 45
Never adb uninstall, pm clear, rm, or reboot without asking (settings.json enforces "ask").
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Run on device
Confirm a change in the running app, not just in tests. Read the
android-cli skill's references/interact.md before driving any Android UI.
1. Pick the run target
| Shape | Target |
Android / KMP androidTarget | Android device (below) |
KMP desktop (jvm("desktop") + Compose) | ./gradlew :composeApp:run (via gradle-run); screenshot the window is not available — ask the user to confirm visuals |
| KMP iOS | Not possible on Windows. Say so; verify shared code with jvmTest instead |
| JVM server (Ktor/Spring) | Start with ./gradlew :server:run in the background, hit the changed endpoint with curl, stop it after |
2. Select an Android device
adb devices -lClassify each line:
emulator-NNNN→ emulator. Anything else in statedevice→ physical device.unauthorized→ ask the user to accept the RSA prompt on the phone.offline→ ask them to replug / re-enable USB debugging. Do not proceed with that device.
Choice rules:
- If
ANDROID_SERIALis set or the user named a device, use it. - Exactly one usable device → use it.
- Several → prefer a physical device when the change involves camera, sensors, biometrics, push, Bluetooth, performance, or real-world rendering; otherwise ask which one (one question, list serial + model).
- None →
android emulator list, thenandroid emulator start <name>(one AVD → use it; several → ask; none → offerandroid emulator create). If the user wants a physical device instead, tell them: enable Developer options → USB debugging, connect, accept the prompt; or for Wi-Fi:adb pair <ip:port>thenadb connect <ip:port>.
Pass the serial explicitly everywhere: --device <serial> for android,
-s <serial> for adb.
3. Physical-device safety
A real phone holds the user's data and other apps.
- Never
adb uninstall,pm clear,rm, orrebootwithout asking (settings.json enforces "ask"). - Install with the normal update path; if install fails with signature mismatch, stop and ask — fixing it requires uninstalling, which wipes app data.
- Wake/unlock before inspecting:
adb -s <serial> shell input keyevent KEYCODE_WAKEUP. If the lock screen is secure, ask the user to unlock; never try to enter a PIN. - Screenshots may contain personal notifications. Keep them under
build/device-shots/(git-ignored) and don't upload them anywhere. - Note device differences when reporting:
adb -s <serial> shell getprop ro.product.modelandro.build.version.sdk.
4. Install and launch
Build the APK with build-and-verify (:app:assembleDebug through gradle-run),
then install the built artifact so Gradle never runs outside the wrapper:
android run --device <serial> --apks app/build/outputs/apk/debug/app-debug.apk --activity <package>.MainActivity--activity is required with --apks; without it the APK is installed but not
launched. Several app modules or flavors → android describe to find the APK.
5. Verify
android layout --device <serial>— primary check: expected text, ids, states.android screen capture --device <serial> -o build/device-shots/<step>.png— then look at the PNG before continuing.- Drive the flow with
adb -s <serial> shell input tap|text|swipe|keyeventusingcentercoordinates from the layout, orandroid screen resolvefor annotated shots. - Crash or blank screen →
adb -s <serial> logcat -d -t 300 *:Eand report the top app frame. - Blank/black screen with no crash → before blaming the app, launch a system
app (
adb -s <serial> shell am start -a android.settings.SETTINGS) and capture it. If it is black too, the emulator compositor is stuck (often a lingeringSplash Screenlayer indumpsys SurfaceFlinger --list):android emulator stopthenandroid emulator start --cold <avd>. Report it as an environment issue, not an app result.
6. Report
Device: Pixel 8 (physical, API 35) | emulator-5554 <avd name> (API 36)
Flow: open Login → enter bad password → tap Sign in
Saw: error text "Wrong password" under field ✅ ; button stays enabled ✅
Shot: build/device-shots/login-error.png
Issues: none | <what differs from expected>Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

