feat: add android_ui_verification skill (#155)

Co-authored-by: Alex Mastny <alexandermastny@gmail.com>
This commit is contained in:
Alex Mastny
2026-02-28 08:13:58 +01:00
committed by GitHub
parent b2bc1d7488
commit 7c30e0cc31
4 changed files with 112 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
# 🌌 Antigravity Awesome Skills: 950+ Agentic Skills for Claude Code, Gemini CLI, Cursor, Copilot & More
# 🌌 Antigravity Awesome Skills: 951+ Agentic Skills for Claude Code, Gemini CLI, Cursor, Copilot & More
> **The Ultimate Collection of 950+ Universal Agentic Skills for AI Coding Assistants — Claude Code, Gemini CLI, Codex CLI, Antigravity IDE, GitHub Copilot, Cursor, OpenCode, AdaL**
> **The Ultimate Collection of 951+ Universal Agentic Skills for AI Coding Assistants — Claude Code, Gemini CLI, Codex CLI, Antigravity IDE, GitHub Copilot, Cursor, OpenCode, AdaL**
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Claude Code](https://img.shields.io/badge/Claude%20Code-Anthropic-purple)](https://claude.ai)
@@ -17,7 +17,7 @@
If this project helps you, you can [support it here](https://buymeacoffee.com/sickn33) or simply ⭐ the repo.
**Antigravity Awesome Skills** is a curated, battle-tested library of **950 high-performance agentic skills** designed to work seamlessly across all major AI coding assistants:
**Antigravity Awesome Skills** is a curated, battle-tested library of **951 high-performance agentic skills** designed to work seamlessly across all major AI coding assistants:
- 🟣 **Claude Code** (Anthropic CLI)
- 🔵 **Gemini CLI** (Google DeepMind)
@@ -42,7 +42,7 @@ This repository provides essential skills to transform your AI assistant into a
- [🎁 Curated Collections (Bundles)](#curated-collections)
- [🧭 Antigravity Workflows](#antigravity-workflows)
- [📦 Features & Categories](#features--categories)
- [📚 Browse 950+ Skills](#browse-950-skills)
- [📚 Browse 951+ Skills](#browse-951-skills)
- [🤝 How to Contribute](#how-to-contribute)
- [🤝 Community](#community)
- [☕ Support the Project](#support-the-project)
@@ -345,7 +345,7 @@ The repository is organized into specialized domains to transform your AI into a
Counts change as new skills are added. For the current full registry, see [CATALOG.md](CATALOG.md).
## Browse 950+ Skills
## Browse 951+ Skills
We have moved the full skill registry to a dedicated catalog to keep this README clean, and we've also introduced an interactive **Web App**!

View File

@@ -0,0 +1,65 @@
---
name: android_ui_verification
description: Automated end-to-end UI testing and verification on an Android Emulator using ADB.
risk: safe
source: community
---
# Android UI Verification Skill
This skill provides a systematic approach to testing React Native applications on an Android emulator using ADB commands. It allows for autonomous interaction, state verification, and visual regression checking.
## When to Use
- Verifying UI changes in React Native or Native Android apps.
- Autonomous debugging of layout issues or interaction bugs.
- Ensuring feature functionality when manual testing is too slow.
- Capturing automated screenshots for PR documentation.
## 🛠 Prerequisites
- Android Emulator running.
- `adb` installed and in PATH.
- Application in debug mode for logcat access.
## 🚀 Workflow
### 1. Device Calibration
Before interacting, always verify the screen resolution to ensure tap coordinates are accurate.
```bash
adb shell wm size
```
*Note: Layouts are often scaled. Use the physical size returned as the base for coordinate calculations.*
### 2. UI Inspection (State Discovery)
Use the `uiautomator` dump to find the exact bounds of UI elements (buttons, inputs).
```bash
adb shell uiautomator dump /sdcard/view.xml && adb pull /sdcard/view.xml ./artifacts/view.xml
```
Search the `view.xml` for `text`, `content-desc`, or `resource-id`. The `bounds` attribute `[x1,y1][x2,y2]` defines the clickable area.
### 3. Interaction Commands
- **Tap**: `adb shell input tap <x> <y>` (Use the center of the element bounds).
- **Swipe**: `adb shell input swipe <x1> <y1> <x2> <y2> <duration_ms>` (Used for scrolling).
- **Text Input**: `adb shell input text "<message>"` (Note: Limited support for special characters).
- **Key Events**: `adb shell input keyevent <code_id>` (e.g., 66 for Enter).
### 4. Verification & Reporting
#### Visual Verification
Capture a screenshot after interaction to confirm UI changes.
```bash
adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png ./artifacts/test_result.png
```
#### Analytical Verification
Monitor the JS console logs in real-time to detect errors or log successes.
```bash
adb logcat -d | grep "ReactNativeJS" | tail -n 20
```
#### Cleanup
Always store generated files in the `artifacts/` folder to satisfy project organization rules.
## 💡 Best Practices
- **Wait for Animations**: Always add a short sleep (e.g., 1-2s) between interaction and verification.
- **Center Taps**: Calculate the arithmetic mean of `[x1,y1][x2,y2]` for the most reliable tap target.
- **Log Markers**: Use distinct log messages in the code (e.g., `✅ Action Successful`) to make `grep` verification easy.
- **Fail Fast**: If a `uiautomator dump` fails or doesn't find the expected text, stop and troubleshoot rather than blind-tapping.

View File

@@ -0,0 +1,32 @@
#!/bin/bash
# Helper script for Android UI Verification Skill
# Usage: ./verify_ui.sh [screenshot_name]
ARTIFACTS_DIR="./artifacts"
SCREENSHOT_NAME="${1:-latest_screen}"
echo "🚀 Starting UI Verification..."
# 1. Create artifacts directory if not exists
mkdir -p "$ARTIFACTS_DIR"
# 2. Get Resolution
echo "📏 Calibrating display..."
adb shell wm size
# 3. Dump UI XML
echo "📋 Dumping UI hierarchy..."
adb shell uiautomator dump /sdcard/view.xml
adb pull /sdcard/view.xml "$ARTIFACTS_DIR/view.xml"
# 4. Capture Screenshot
echo "📸 Capturing screenshot: $SCREENSHOT_NAME.png"
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png "$ARTIFACTS_DIR/$SCREENSHOT_NAME.png"
# 5. Get Recent JS Logs
echo "📜 Fetching recent JS logs..."
adb logcat -d | grep "ReactNativeJS" | tail -n 20 > "$ARTIFACTS_DIR/js_logs.txt"
echo "✅ Done. Artifacts saved in $ARTIFACTS_DIR"

View File

@@ -329,6 +329,16 @@
"source": "community",
"date_added": "2026-02-27"
},
{
"id": "android_ui_verification",
"path": "skills/android_ui_verification",
"category": "uncategorized",
"name": "android_ui_verification",
"description": "Automated end-to-end UI testing and verification on an Android Emulator using ADB.",
"risk": "safe",
"source": "community",
"date_added": null
},
{
"id": "angular",
"path": "skills/angular",