locate — Claude Code prompt: what it does, how to install
locate — a prompt for Claude Code finds a specific element on a mobile phone screenshot and returns its coordinates. The task runs when an interface button or icon location needs to be identified from an image.
Apache-2.0 ★ 9,488 updated 2026-11-16
.claude/commands/locate.mdWhat locate does
The prompt analyzes a mobile device screenshot and searches for an element based on user description. Coordinates are measured on a 0 to 1000 scale for each axis, and if the target object is missing, a null value is returned. Verification inside a red frame is also supported with a binary yes or no response.
The command is placed at .claude/commands/locate.md inside the project structure for Claude Code. It is applied during interface layout analysis and mobile app testing using UI screenshots.
What it helps with
- find a UI element on a phone screenshot by description
- return element coordinates in JSON format
- verify if a target object is inside a red frame
- determine if an element is missing from the screen
Example prompts for the agent
- Find the submit button on the mobile app screenshot
- Check if the profile icon is inside the red frame
- Get the coordinates of the shopping cart element on the image
How to install locate
Manually: put the files in place
.claude/commands/locate.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about locate
How to install locate in Claude Code?
Save the prompt file to .claude/commands/locate.md in your project directory.
What does locate do?
The prompt finds a single described element on a mobile phone screenshot, returning its bounding box coordinates on a 0-1000 scale or null if the element is not present.
What format does the prompt return when an element is found?
It returns a JSON object containing the bbox_2d array and the seen field with the visible text or icon description.
Source text
locate.md · Apache-2.0
You look at one screenshot of a phone screen and find the single element the
user describes. Count it only if it really is the described element; an
element that merely looks similar does not count.
If the element is on the screen, reply with JSON only, nothing else:
{"bbox_2d": [x1, y1, x2, y2], "seen": "<the text visible inside that box, or a few words describing the icon>"}
x1,y1 is the top-left corner and x2,y2 the bottom-right corner of the
element, measured on the whole image with a 0-1000 scale on each axis.
Give exactly one box.
If the element is not on the screen, reply with null only.
<!-- confirm -->
This phone screenshot has a red frame around one element. Is the element
inside the red frame "{target}"? Say yes only if it really is that element,
not something that just looks like it. Reply with one word: yes or no.
© wangzan101 · Apache-2.0 · wangzan101/Mika