scripting-adb-for-ci

scripting-adb-for-ci is a skill for Claude Code, Codex from skydoves/android-testing-skills. It costs 270 tokens per session (6,919 once invoked), scanned A, original, Apache-2.0.

A guide for connecting Android Debug Bridge, or adb, to continuous integration (CI) jobs that build and test software automatically. It covers shell scripts, test results, multiple devices, retries, timeouts, port forwarding, and cleanup.

In plain words
What is it for?
Use it to run Android instrumentation tests reliably, distribute tests across devices, interpret their real status codes, retry transient failures, and capture failure data.
Why use it?
It addresses cases where CI reports success even when Android tests fail, devices disconnect, ports are reversed, or setup changes leak into later runs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

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/skydoves/android-testing-skills/scripting-adb-for-ci
Any agent
npx skills add skydoves/android-testing-skills --skill scripting-adb-for-ci
Clone the repo
git clone --depth 1 https://github.com/skydoves/android-testing-skills

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 scripting-adb-for-ci

README.md
[![agentmods](https://agentmods.dev/badge/skills/skydoves/android-testing-skills/scripting-adb-for-ci.svg)](https://agentmods.dev/skills/skydoves/android-testing-skills/scripting-adb-for-ci)
Your own site
<a href="https://agentmods.dev/skills/skydoves/android-testing-skills/scripting-adb-for-ci"><img src="https://agentmods.dev/badge/skills/skydoves/android-testing-skills/scripting-adb-for-ci.svg" alt="Measured on agentmods" height="20"></a>
Per session 270 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,919 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.1 $0.00270 $0.06919
Opus 5 $0.00135 $0.03460
Sonnet 5 $0.00054 $0.01384
Haiku 4.5 $0.00027 $0.00692

Measured 6d ago against content hash 1a1194eb2446, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

scripting-adb-for-ci 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 6d 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.

adb/automation/scripting-adb-for-ci/SKILL.md · 500 lines

How it starts

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

Scripting adb For CI — Bash Idioms, Exit Codes, Fan-out

This skill is the connective tissue that turns the other ADB skills into a CI pipeline: exit-code propagation, retries, timeouts, parallel device fan-out, port forwarding, idempotent setup, capture-on-failure, and Test Orchestrator wiring. Each section cross-links to the skill that owns the underlying primitive.

When to use this skill

  • A CI job invokes adb shell am instrument and "passes" even when tests fail — it gates on $?, but am instrument always exits 0; the real status lives in INSTRUMENTATION_STATUS_CODE lines on stdout (and -w is needed just to get that stdout at all).
  • The team has multiple physical devices on a single agent and wants to run sharded tests in parallel.
  • adb forward and adb reverse are confused — most teams have at least one bug from the opposite argument order.
  • Transient error: device not found / error: closed failures are not retried; the job fails on the first hiccup.
  • A script lacks cleanup so leaked port forwards or modified settings put global ... survive into the next run.
  • The team wires Test Orchestrator with androidTestImplementation — the build silently fails to install the orchestrator APK.

When NOT to use this skill

  • The single primitive (logcat, screencap, pull, push, settings, input, am instrument) is not yet understood. Read the relevant sibling skill first.
  • The CI itself (Gradle plugin, Firebase Test Lab cloud config). Use FTL's own docs for that layer.
  • Compose / instrumentation test mechanics. Use ../../../compose/synchronization/synchronizing-with-idle/SKILL.md and friends.

Prerequisites

  • Bash (zsh works for most of this; macOS users should brew install coreutils for gtimeout if relying on timeout).
  • Platform Tools 24+ on the host. On older toolchains adb shell exit codes are unreliable.
  • Devices on API 24+ for reliable shell exit-code propagation. Pre-Nougat use a sentinel __ADB_RC=$? in stdout and grep on the host.

Read the full file on GitHub · 500 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. 6d ago First seen · 500 lines · 270 tokens per session scan A 1a1194eb2446

Subscribe to this mod's changes

scripting-adb-for-ci is a skill published in the GitHub repository skydoves/android-testing-skills (318 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 270 tokens to every session and 6,919 once invoked, about $0.0014 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.

Related

Other skills, from other repositories