phone_observe — Claude Code prompt: phone screen and setup
The phone_observe Claude Code prompt reads a phone’s virtual display and its accessibility tree. The agent can locate a control or dialog before tapping it.
Apache-2.0 ★ 9,488 updated 2026-11-16
.claude/commands/phone_observe.mdWhat phone_observe does
The prompt reports the foreground app, visible elements, and the phone screen’s accessibility tree. It groups the tree by window and includes parent-child links and control states.
The agent passes a control’s ref and snapshotId to tap. When the tree misses part of the screen, treeQuality flags the gap and visibleText adds on-device OCR text with tap centers. If the target remains unclear, the agent can request screenshot or find_visually.
What it helps with
- locate a control on the phone screen
- identify the window that contains a dialog
- read screen text missing from the accessibility tree
- get a control reference for a tap
Example prompts for the agent
- Show the open phone app and its accessibility tree.
- Find the confirmation dialog and list its controls.
- Read the screen text and locate the sign-in button.
How to install phone_observe
Manually: put the files in place
.claude/commands/phone_observe.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about phone_observe
How do I install phone_observe in Claude Code?
Save the prompt file as .claude/commands/phone_observe.md.
What does phone_observe do?
It reports the foreground app, visible elements, and the accessibility tree for the virtual phone display. A control’s ref and snapshotId can then be passed to tap.
What happens when the accessibility tree misses part of the screen?
treeQuality flags the gap, while visibleText adds OCR text and tap centers. If the target is still unclear, the prompt can request screenshot or find_visually.
Source text
phone_observe.md · Apache-2.0
Look at the phone's current screen (the virtual display). Returns the foreground app, all visible elements, and the full accessibility tree grouped by window, with parent-child relationships and control states. Use the tree to identify which item or dialog owns a control, then pass that control's ref and snapshotId to {{tap}}. When the tree is missing much of the screen, treeQuality says so and visibleText adds on-device OCR text with tap centers (a screenshot too, if you can view images); if the target is still missing or ambiguous, request {{screenshot}} or {{find_visually}}.
© wangzan101 · Apache-2.0 · wangzan101/Mika