用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/sepivip/android-harness --skill android-harness命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | android-harness |
| description | Drive an Android phone over ADB — tap, type, read. |
| when_to_use | Use whenever the user wants something done ON their phone — open an app on my phone, what's on my phone screen, check my phone, tap that, type that on the phone, swipe, take a phone screenshot, navigate to somewhere in Maps, read my notifications or an SMS, or any task that only exists in a mobile-only app. Needs a USB-connected Android with USB debugging authorised. |
| version | 0.1.0 |
| license | MIT |
| platforms | ["windows"] |
| allowed-tools | Bash(android-harness *) |
| metadata | {"hermes":{"tags":["android","adb","phone","device-control","automation"],"requires_toolsets":["terminal"]}} |
Drive a real Android phone from this PC over ADB. Nothing is installed on the phone.
Don't use for: anything achievable on the desktop or the web — those are faster, cheaper and need no device. This is for phone-only work.
Pipe a Python program in; helpers are already in scope. One turn = one script = one screenshot, so do several steps per invocation rather than one call per tap:
android-harness <<'PY'
launch("com.android.settings")
wait_stable()
obs = observe(rung=2)
print(obs.compact)
tap_text("Network & internet")
PY
Check the connection first if anything looks wrong: android-harness --doctor
observe(rung=1) — pixels + state. Cheap (~800 tokens). This is the default.tap_text(...), tap(x, y, frame), type_text(...), launch(pkg, uri).wait_stable() — never sleep().observe() again to verify. The capture is the ground truth.Escalate with observe(rung=2) for numbered tappable elements, rung=3 for the
full tree, rung=4 for OCR. Every observation reports its cost in
obs.receipt — check it, and do not escalate without a reason.
launch(pkg, uri="...") deep links over tapping through menus: they
skip whole sequences and are immune to layout drift.tap_text rather than raw coordinates when a label exists. It resolves
the label to its nearest clickable ancestor, which is usually a different
node than the one holding the text.obs.capture_protected, then use the tree or ask the human.type_text is ASCII-only on this version. Non-ASCII (Georgian, emoji) raises
a clear error — ask the human to type it. Reading non-ASCII works fine.agent-workspace/agent_helpers.py; they
are auto-loaded into every later script.The harness never enables debugging or authorises itself. If --doctor reports
the device is unauthorized, STOP and ask the user to tap "Allow" on the phone
(ticking "Always allow from this computer"). Never retry it in a loop.
ANDROID_HARNESS_UNATTENDED=1 when no human is watching (an agent
tool call, cron, CI). Gated actions then deny immediately instead of waiting
out the approval timeout.GateDeniedError in an
unattended run is the gate working — relay it to the human, do NOT retry in
a loop and do NOT try to route around it.--doctor first whenever behaviour looks strange; it names the cause rather
than leaving you guessing.After any action, observe() again and confirm the screen changed as expected.
The capture is the ground truth — never assume a tap landed. Each run also
writes a self-contained HTML replay under runs/ showing what was seen and done.