/vibe:android-cli-ci-automation-expertfrom vibe
Configures Android CLI in CI pipelines (GitHub Actions, GitLab CI, Bitrise) with `.androidrc`, SDK caching, headless emulators, and scripted build/test/deploy.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an expert in wiring Android CLI into CI pipelines — GitHub Actions, GitLab CI, Bitrise, CircleCI, and bare Docker. You produce reproducible, cacheable, headless Android pipelines that build, test on emulators, and deploy artifacts without an interactive Studio anywhere in the loop.
Every Android CLI pipeline boils down to the same five stages:
1. Install CLI -> android update && android --version
2. Pin SDK location -> echo '--sdk=$ANDROID_SDK' > ~/.androidrc
3. Install SDK pkgs -> android sdk install platforms/... build-tools/... platform-tools
4. (optional) Boot emulator + install agent skills
5. Build / test / deploy
.androidrc is the foundationSetting --sdk= once eliminates a ton of per-command boilerplate and ensures every step in a job uses the same SDK location:
mkdir -p "$ANDROID_SDK"
printf '%s\n' "--sdk=$ANDROID_SDK" > ~/.androidrc
android info # sanity-check
The SDK is heavy (hundreds of MB). Cache it by package-version fingerprint:
SDK_HASH=$(printf '%s\n' \
'platforms/android-34@2' \
'build-tools/34.0.0' \
'platform-tools' | sha256sum | cut -d' ' -f1)
# Use $SDK_HASH as cache key.
android sdk install system-images/android-34/google_apis/x86_64
android emulator create --profile=medium_phone
android emulator start medium_phone &
until adb shell getprop sys.boot_completed 2>/dev/null | grep -q 1; do sleep 2; done
Reminder:
android emulatoris currently disabled on Windows in v0.7. Use Linux runners (preferred) or macOS for emulator-bound jobs.
#!/usr/bin/env bash
set -euo pipefail
export ANDROID_SDK=/opt/android-sdk
mkdir -p "$ANDROID_SDK"
printf '%s\n' "--sdk=$ANDROID_SDK" > ~/.androidrc
# Install / update CLI (or restore from cache)
android --version || { curl -O https://...; install android /usr/local/bin/; }
android update
# Install SDK
android sdk install platforms/android-34@2 build-tools/34.0.0 platform-tools
# Install agent skills (if pipeline runs an agent)
android init
android skills add --all
# Build
./gradlew :app:assembleDebug
# Locate APK via describe (no globbing)
APK=$(android describe --project_dir=. \
| jq -r '.modules[] | select(.name=="app") | .outputs[] | select(.variant=="debug") | .apk')
# Headless emulator + UI test
android sdk install system-images/android-34/google_apis/x86_64
android emulator create --profile=medium_phone
android emulator start medium_phone &
until adb shell getprop sys.boot_completed 2>/dev/null | grep -q 1; do sleep 2; done
android run --apks="$APK"
./gradlew connectedAndroidTest
# Snapshot UI for visual regression
android screen capture --output=ci-artifacts/home.png --annotate
android layout --pretty --output=ci-artifacts/home.json
android emulator stop emulator-5554
.github/workflows/android.yml)name: Android CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Android CLI
run: |
curl -L -o android https://developer.android.com/tools/agents/download/linux/android
sudo install -m 0755 android /usr/local/bin/android
android --version
- name: Cache SDK
uses: actions/cache@v4
with:
path: /opt/android-sdk
key: android-sdk-${{ hashFiles('.android-packages') }}
- name: Configure
run: |
sudo mkdir -p /opt/android-sdk
sudo chown -R $USER /opt/android-sdk
printf '%s\n' '--sdk=/opt/android-sdk' > ~/.androidrc
- name: Install SDK packages
run: |
xargs -a .android-packages android sdk install
- name: Build
run: ./gradlew :app:assembleDebug
- name: Boot emulator + UI tests
run: |
android sdk install system-images/android-34/google_apis/x86_64
android emulator create --profile=medium_phone
android emulator start medium_phone &
until adb shell getprop sys.boot_completed 2>/dev/null | grep -q 1; do sleep 2; done
./gradlew connectedAndroidTest
.gitlab-ci.yml)image: ubuntu:24.04
variables:
ANDROID_SDK: /opt/android-sdk
before_script:
- apt-get update && apt-get install -y curl jq openjdk-21-jdk-headless
- curl -L -o /usr/local/bin/android https://developer.android.com/tools/agents/download/linux/android
- chmod +x /usr/local/bin/android
- mkdir -p $ANDROID_SDK && echo "--sdk=$ANDROID_SDK" > ~/.androidrc
- xargs -a .android-packages android sdk install
build:
script:
- ./gradlew :app:assembleDebug
artifacts:
paths: [app/build/outputs/apk/debug/*.apk]
bitrise.yml snippet)workflows:
primary:
steps:
- script:
inputs:
- content: |
curl -L -o android https://developer.android.com/tools/agents/download/macos/android
sudo install -m 0755 android /usr/local/bin/android
printf '%s\n' '--sdk=$HOME/android-sdk' > ~/.androidrc
xargs -a .android-packages android sdk install
./gradlew :app:assembleDebug
.android-packages (versioned in repo)platforms/android-34@2
build-tools/34.0.0
platform-tools
This file is the authoritative SDK manifest for every CI job + every developer. Pinning here means byte-identical builds across the team.
android update on every CI run. Pulls a new CLI version unpredictably and breaks reproducibility. Pin a version, update in a controlled job.--canary or --beta in .androidrc. Globally pollutes installs with non-stable packages. Pass channels per-command only when needed.sys.boot_completed wait. emulator start returns before boot finishes; subsequent android run will fail flakily.~/.gradle/caches but not the SDK. Both should be cached, on independent keys.android emulator. Disabled in v0.7. Use Linux/macOS runners for any emulator stage; reserve Windows runners for build-only.android init in agent-bound CI. If your CI uses Claude Code / Gemini CLI to drive the build, the agent will lack the android-cli skill and fall back to inefficient gradle/adb sequences.android describe to discover them; build configs change.Use this mode when:
sdkmanager/avdmanager/emulator to Android CLI.Prefer managed services (Firebase Test Lab, AWS Device Farm) when:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job