Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Android Ui Verification

ASecurity

当需要在 Android 模拟器上自主验证 RN/原生 App 的 UI 变更、复现交互或布局 Bug、为 PR 留存截图时使用;做基于 ADB 的设备校准、UI dump 取坐标、点击/滑动/输入交互、截图与 logcat 双重验证,产出 artifacts/ 下的截图与视图快照;不适用于真机集群测试、iOS、纯单元/E2E 框架(Espresso/Detox)。触发词:adb、uiautomator、模拟器 UI 验证

3 stars
0 votes
0 copies
1 views
Added 9/19/2026
ai-agentsshellbashreacttesting

Works with

cursorcli

Security Analysis

A100/100

Scanned 9/19/2026

$npx -y skills add findscripter/everything-skills --skill android-ui-verification --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Android Ui Verification?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Android Ui Verification
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/findscripter-android-ui-verification/badge)](https://www.skillsdirectory.com/skills/findscripter-android-ui-verification)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: android-ui-verification
title: Android 模拟器 UI 端到端验证
description: 当需要在 Android 模拟器上自主验证 RN/原生 App 的 UI 变更、复现交互或布局 Bug、为 PR 留存截图时使用;做基于 ADB 的设备校准、UI dump 取坐标、点击/滑动/输入交互、截图与 logcat 双重验证,产出 artifacts/ 下的截图与视图快照;不适用于真机集群测试、iOS、纯单元/E2E 框架(Espresso/Detox)。触发词:adb、uiautomator、模拟器 UI 验证
domain: 研发/testing
triggers: [adb, uiautomator dump, Android 模拟器, input tap, screencap 截图验证, ReactNativeJS logcat, UI 端到端验证, 模拟器点击坐标]
tags: [android, adb, ui-testing, e2e, react-native, emulator, testing, automation]
level: 进阶
status: stable
agents: [claude-code, codex, cursor, gemini-cli]
tools: [adb, uiautomator, logcat, Bash]
requires: []
related: [webapp-testing, playwright-e2e-testing, browserstack-cross-browser-test, react-native-architecture]
combines_with: [react-native-architecture, jetpack-compose-expert, test-coverage-gap-finder]
license: MIT
source: sickn33/agentic-awesome-skills
source_license: MIT
---
## 何时使用

适用:
- 验证 React Native 或原生 Android App 的 UI 变更是否生效。
- 自主排查布局错位、交互失效等 Bug,无需人工反复点。
- 手动测试太慢、希望脚本化跑通某条功能路径。
- 为 PR/文档自动抓取截图作为证据。

前置条件:
- Android 模拟器已启动;`adb` 已安装并在 PATH 中。
- App 以 debug 模式运行(否则 logcat 拿不到 JS 日志)。

不该用(负边界):
- 真机/设备农场的大规模兼容性测试。
- iOS 端验证。
- 已有成熟 E2E 框架(Espresso、Detox、Maestro)的项目——优先用框架而非裸 ADB。
- 缺少必要输入、权限、安全边界或成功判据时,先停下问清楚,不要盲点。

## 步骤

### 1. 设备校准(取真实分辨率)
交互前先确认屏幕尺寸,保证点击坐标准确。布局常被缩放,以返回的物理尺寸为坐标计算基准。
```bash
adb shell wm size
```

### 2. UI 探查(发现状态)
dump 当前界面树,定位按钮/输入框的精确边界:
```bash
adb shell uiautomator dump /sdcard/view.xml && adb pull /sdcard/view.xml ./artifacts/view.xml
```
在 `view.xml` 中按 `text`、`content-desc` 或 `resource-id` 搜索元素;`bounds="[x1,y1][x2,y2]"` 即可点击区域。

### 3. 交互指令
- 点击:`adb shell input tap <x> <y>`(取元素 bounds 的中心点)。
- 滑动/滚动:`adb shell input swipe <x1> <y1> <x2> <y2> <duration_ms>`。
- 文本输入:`adb shell input text "<message>"`(特殊字符支持有限)。
- 按键事件:`adb shell input keyevent <code_id>`(如 66 = Enter)。

### 4. 验证与报告
视觉验证——交互后截图确认 UI 变化:
```bash
adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png ./artifacts/test_result.png
```
分析验证——实时查 JS 控制台日志,捕获报错或成功标记:
```bash
adb logcat -d | grep "ReactNativeJS" | tail -n 20
```
清理:所有生成文件统一放进 `artifacts/` 目录,满足项目组织规范。

## 指令

- 中心点坐标:对 `[x1,y1][x2,y2]` 取算术平均,`cx=(x1+x2)/2, cy=(y1+y2)/2`,命中最稳。
- 交互与验证之间插入 1-2 秒等待,避免动画未结束就截图/读日志。
- 在代码里打独特日志标记(如 `✅ Action Successful`),方便 `grep` 精确匹配验证结果。

## 示例

验证「点击登录按钮后出现首页」一条路径:
```bash
# 1. 校准
adb shell wm size
# 2. dump 取登录按钮 bounds,例如 [432,1200][648,1320] → 中心 (540,1260)
adb shell uiautomator dump /sdcard/view.xml && adb pull /sdcard/view.xml ./artifacts/view.xml
# 3. 点击并等待动画
adb shell input tap 540 1260
sleep 2
# 4. 截图 + 日志双重验证
adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png ./artifacts/test_result.png
adb logcat -d | grep "ReactNativeJS" | tail -n 20
```

## 注意事项

- 快速失败:若 `uiautomator dump` 失败或找不到预期文本,立刻停下排查,不要凭猜测盲点坐标。
- 坐标随分辨率/缩放变化,换设备或换 emulator 配置后务必重新校准,不要复用硬编码坐标。
- `input text` 对中文及特殊字符支持有限,必要时改用粘贴或 ADB IME 方案。
- 不要把本技能输出当作环境特定校验、专家评审的替代品。

## 互见

- 研发/testing 域内其他 E2E 与回归验证技能。
- 截图/日志分析类技能可与本技能的 artifacts 产物串联。

---
采编自 sickn33/antigravity-awesome-skills(MIT License)。

Attribution

findscripterfindscripter
View sourceSee grades on GitHubMore from findscripter →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698461 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →