phone_query — Claude Code prompt: what it does, how to install
The phone_query Claude Code prompt finds controls in an Android accessibility tree. It filters nodes by text, resource ID, or role and returns refs for later actions.
Apache-2.0 ★ 9,488 updated 2026-11-16
.claude/commands/phone_query.mdWhat phone_query does
phone_query searches the current Android accessibility tree for controls matching text, a resource ID, or a role. Results include matching nodes, parent labels, bounds, and refs that can be used in later actions. Filters can be combined.
With no filters, it returns the first nodes up to the limit. Each result includes a snapshotId, which is paired with a node ref for a subsequent action. The prompt reads tree text only; it does not capture a screenshot. Request a screenshot if the tree lacks enough detail.
What it helps with
- find an Android control by its text
- filter accessibility nodes by resource ID or role
- get a node ref for a later action
Example prompts for the agent
- Find the “Continue” button in the Android accessibility tree.
- Find nodes with resource ID
com.example:id/submit. - Show nodes whose role is a text input.
How to install phone_query
Manually: put the files in place
.claude/commands/phone_query.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about phone_query
How do I install phone_query in Claude Code?
Place phone_query.md in the project’s .claude/commands/ directory.
What does phone_query do?
It searches the Android accessibility tree and returns matching nodes with parent labels, bounds, and refs for later actions.
Does phone_query capture a screenshot?
No. It reads text from the accessibility tree. Request a screenshot if the tree does not provide enough detail.
Source text
phone_query.md · Apache-2.0
Find controls in the current Android accessibility tree by text, resource ID, or role. Returns matching nodes with their parent labels, bounds, and usable refs. You may combine filters; with no filter it lists the first nodes up to limit. This reads text only and does not capture a screenshot. Use the returned snapshotId together with a ref for a later action. If the tree lacks enough information, request a screenshot.
© wangzan101 · Apache-2.0 · wangzan101/Mika