skills/android/SKILL.md
Use this skill when the user wants to: - Control Android devices, emulators, or simulators - Perform mobile testing, QA automation, or UI testing on Android - Find, tap, scroll, or interact with elements on Android screens - Launch, install, uninstall, or manage Android apps - Take screenshots, capture logs, or debug Android issues - Write or run Appium-like automation without Appium - Get element locators, accessibility tree, or UI hierarchy - Press hardware buttons like back, home, or volume - Type text or enter credentials on Android This skill provides 20+ ADB-based Python automation scripts.
npx skillsauth add samir-sayyed/android-agent-skills Android Automation SkillInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Production-ready automation for Android app testing. 20+ scripts optimized for AI agents and human developers.
# macOS
brew install android-platform-tools
# Verify
adb version
# Check device connection
./scripts/device/list_devices.sh
# Take screenshot
python scripts/interaction/screenshot.py --output screen.png
# Map current screen
python scripts/interaction/screen_mapper.py
# Tap element by text
python scripts/interaction/navigator.py --find-text "Settings" --tap
| Script | Description | Usage |
|--------|-------------|-------|
| list_devices.sh | List connected devices/emulators | ./scripts/device/list_devices.sh |
| emulator_boot.py | Boot emulator by AVD name | python scripts/device/emulator_boot.py --avd Pixel_7_API_34 |
| emulator_shutdown.py | Shutdown emulator | python scripts/device/emulator_shutdown.py [--udid <id>] |
| device_info.py | Get device properties | python scripts/device/device_info.py |
| Script | Description | Usage |
|--------|-------------|-------|
| app_install.py | Install APK | python scripts/app/app_install.py --apk app.apk |
| app_uninstall.py | Uninstall app | python scripts/app/app_uninstall.py --package com.example.app |
| app_launch.py | Launch app | python scripts/app/app_launch.py --package com.example.app |
| app_stop.py | Force stop app | python scripts/app/app_stop.py --package com.example.app |
| app_list.py | List installed apps | python scripts/app/app_list.py [--filter user] |
| Script | Description | Usage |
|--------|-------------|-------|
| screenshot.py | Capture screenshot | python scripts/interaction/screenshot.py --output shot.png |
| annotated_screenshot.py | Screenshot with labeled elements | python scripts/interaction/annotated_screenshot.py --output annotated.png |
| screen_mapper.py | Analyze UI hierarchy | python scripts/interaction/screen_mapper.py [--format tree] |
| navigator.py | Find/interact with elements | python scripts/interaction/navigator.py --find-text "Login" --tap |
| gesture.py | Swipe, scroll, pinch | python scripts/interaction/gesture.py --swipe up |
| gesture_record.py | Record/replay gestures | python scripts/interaction/gesture_record.py --record gestures.json |
The navigator.py script supports advanced element finding:
# Wait for element (useful after navigation/loading)
python scripts/interaction/navigator.py --find-text "Welcome" --wait-timeout 10 --tap
# XPath queries
python scripts/interaction/navigator.py --xpath "//android.widget.Button[@text='Submit']" --tap
# Self-healing with fallbacks (tries primary, then fallbacks)
python scripts/interaction/navigator.py --find-text "Login" --fallback-id "submit_btn" --tap
# Retry on failure
python scripts/interaction/navigator.py --find-id "dynamic_element" --retry-count 3 --tap
| Script | Description | Usage |
|--------|-------------|-------|
| keyboard.py | Type text | python scripts/input/keyboard.py --text "Hello World" |
| button.py | Hardware buttons | python scripts/input/button.py --key HOME |
| open_url.py | Open URL in browser | python scripts/input/open_url.py --url "https://example.com" |
| Script | Description | Usage |
|--------|-------------|-------|
| accessibility_audit.py | Check accessibility | python scripts/testing/accessibility_audit.py |
| logcat_monitor.py | Monitor logs | python scripts/testing/logcat_monitor.py --package com.example.app |
| app_state.py | Debug snapshot | python scripts/testing/app_state.py --output state/ |
| visual_diff.py | Compare screenshots | python scripts/testing/visual_diff.py baseline.png current.png |
The AI agent automatically detects when to use this skill based on your request:
You: "Launch the Settings app"
AI: [Uses app_launch.py with com.android.settings]
You: "Tap on Wi-Fi"
AI: [Uses navigator.py to find and tap Wi-Fi element]
You: "Scroll down and take a screenshot"
AI: [Uses gesture.py to scroll, then screenshot.py]
# Launch app
python scripts/app/app_launch.py --package com.example.app
# Map screen to find login fields
python scripts/interaction/screen_mapper.py
# Enter credentials
python scripts/interaction/navigator.py --find-type EditText --index 0 --enter-text "[email protected]"
python scripts/interaction/navigator.py --find-type EditText --index 1 --enter-text "password"
# Tap login button
python scripts/interaction/navigator.py --find-text "Login" --tap
# Check accessibility
python scripts/testing/accessibility_audit.py
# Capture baseline
python scripts/interaction/screenshot.py --output baseline.png
# Make changes and capture current
python scripts/interaction/screenshot.py --output current.png
# Compare
python scripts/testing/visual_diff.py baseline.png current.png
# Boot emulator
python scripts/device/emulator_boot.py --avd CI_Emulator --headless
# Install APK
python scripts/app/app_install.py --apk app-debug.apk
# Run automated tests
python scripts/app/app_launch.py --package com.example.app
python scripts/interaction/navigator.py --find-text "Start" --tap
# Capture logs
python scripts/testing/logcat_monitor.py --package com.example.app --duration 30
# Cleanup
python scripts/device/emulator_shutdown.py
# Check USB debugging is enabled
adb devices
# Restart ADB server
adb kill-server && adb start-server
# Dump full UI hierarchy
python scripts/interaction/screen_mapper.py --verbose
# Use different search strategies
python scripts/interaction/navigator.py --find-id "login_button" --tap
python scripts/interaction/navigator.py --find-class "android.widget.Button" --index 0 --tap
# List available AVDs
emulator -list-avds
# Check for locks
rm -rf ~/.android/avd/*.avd/*.lock
All scripts output JSON by default for easy parsing:
{
"success": true,
"data": { ... },
"error": null
}
Use --format text for human-readable output.
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.