list_elements — Claude Code prompt: what it does, how to install
The list_elements Claude Code prompt turns the current screen into a text list instead of a screenshot. Each item gets a reference for later actions.
Apache-2.0 ★ 9,488 updated 2026-11-16
.claude/commands/list_elements.mdWhat list_elements does
The prompt describes visible screen elements in text and assigns each one a reference such as @eN. To act on an item, provide its reference along with the list’s snapshotId. Coordinates follow a 0–999 grid, matching tap.
A ref_expired response means the screen has changed. Run observe or list_elements again, then use the refreshed references. In Claude Code, place the prompt file at .claude/commands/list_elements.md.
What it helps with
- read screen contents without a screenshot
- get a reference for a screen element
- refresh element references after the screen changes
Example prompts for the agent
- List the current screen’s elements as text.
- Find the target element and act on it using its reference and
snapshotId. - List the screen elements again after a
ref_expiredresponse.
How to install list_elements
Manually: put the files in place
.claude/commands/list_elements.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about list_elements
How do I install list_elements in Claude Code?
Save the prompt file at .claude/commands/list_elements.md.
What does list_elements do?
It describes screen elements in text and assigns each a reference such as @eN. Actions use that reference together with the list’s snapshotId.
What should I do when an element reference expires?
After a ref_expired response, run observe or list_elements again and use the new references.
Source text
list_elements.md · Apache-2.0
List what is on this screen as text, without a screenshot. Each element comes with a ref (@eN); to act on one, pass its ref together with the snapshotId of this list. Positions use the same 0-999 grid as {{tap}}. When an action answers ref_expired, the screen has moved on: call {{observe}} or {{list_elements}} again and use the new refs.
© wangzan101 · Apache-2.0 · wangzan101/Mika