android_ui_verification – skill Thiết kế & UI cho agent AI
Kiểm thử và xác minh giao diện đầu cuối tự động trên Android Emulator bằng ADB.
Cài skill android_ui_verification bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/android-ui-verification-096d9.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /android_ui_verification – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/android-ui-verification-096d9.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $android_ui_verification – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/android-ui-verification-096d9.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /android_ui_verification – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/android-ui-verification-096d9.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /android_ui_verification – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
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.
adbinstalled and in PATH.- Application in debug mode for logcat access.
🚀 Workflow
1. Device Calibration
Select the authorized emulator serial with adb devices -l; pass -s SERIAL to every command when multiple devices exist. Before interacting, inspect current display geometry and UI bounds to ensure tap coordinates are accurate.
adb shell wm size*Note: Size overrides, density, rotation and insets affect input coordinates. Prefer fresh UI bounds on the actual selected display rather than deriving coordinates solely from physical size.*
2. UI Inspection (State Discovery)
Use the uiautomator dump to find the exact bounds of UI elements (buttons, inputs).
adb shell uiautomator dump /sdcard/view.xml && adb pull /sdcard/view.xml ./artifacts/view.xmlSearch 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.
adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png ./artifacts/test_result.pngAnalytical Verification
Monitor the JS console logs in real-time to detect errors or log successes.
adb logcat -d | grep "ReactNativeJS" | tail -n 20Cleanup
Always store generated files in the artifacts/ folder to satisfy project organization rules.
💡 Best Practices
- Wait for State: Poll for the expected UI state with a bounded timeout; a fixed delay alone is not 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 makegrepverification easy. - Fail Fast: If a
uiautomator dumpfails or doesn't find the expected text, stop and troubleshoot rather than blind-tapping.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Bundled helper example
From this skill’s directory, after selecting the authorized emulator, run ANDROID_SERIAL=emulator-5554 bash scripts/verify_ui.sh login-screen. Replace the example serial with the verified device. The inert, non-executable helper captures artifacts/view.xml, artifacts/login-screen.png and recent JS logs; it does not assert that the login flow passed. Inspect the captured state against the expected UI and keep artifacts private when they contain personal data.
Skill liên quan
- theme-factory – Bộ công cụ tạo kiểu cho artifact bằng theme. Các artifact có thể là slide, tài liệu, báo…
- claude-design – Thiết kế các artifact HTML dùng một lần (landing page, slide deck, prototype).
- performance-optimization – Tối ưu hiệu năng ứng dụng ở frontend, backend, truy vấn và cơ sở dữ liệu. Dùng khi có…
- angular-ui-patterns – Các mẫu UI Angular hiện đại cho trạng thái loading, xử lý lỗi và hiển thị dữ liệu. Dùng…
- animejs-animation – Kỹ năng thư viện hoạt ảnh JavaScript nâng cao, dùng để tạo hoạt ảnh web phức tạp và hiệu…
- anti-slop-design – Principal Design Technologist tự chủ. Chữa phần mềm vibe-coded khỏi tình trạng AI…
- anti-ui-slop – Ngăn các coding agent tạo ra giao diện chung chung. Mở rộng design system của sản phẩm…
- antigravity-design-expert – Kỹ năng cốt lõi về kỹ thuật UI/UX để xây dựng giao diện web tương tác cao, mang tính…