tap — Claude Code prompt: what it does, how to install
This prompt for Claude Code and ChatGPT taps interface elements by reference, name, or coordinates.
Apache-2.0 ★ 9,488 updated 2026-11-16
.claude/commands/tap.mdWhat tap does
The tap prompt simulates clicks on UI elements using a snapshot reference, exact name with role, or normalized coordinates. It matches names in order of exact match, prefix match, and substring match for tappable items. When multiple elements match, it returns a selection list, and if nothing matches, it requires running an observation step first.
The action result reports the interface state as done, small_change, no_effect, or place_changed. Set clicks=2 for double taps, specify the target for coordinate taps, and avoid repeating identical coordinate clicks without interface changes.
What it helps with
- tap interface elements by reference or snapshot id
- click elements by exact name and role
- tap normalized x and y coordinates on the screen
- perform double taps with clicks equal to two
Example prompts for the agent
- tap the Save button by its name
- tap element
@e1from the screen snapshot - double tap the zoom icon with clicks=2
How to install tap
Manually: put the files in place
.claude/commands/tap.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about tap
How to install tap in Claude Code?
Create a file named .claude/commands/tap.md in your project directory.
What does tap do?
It taps screen interface elements by reference, name, or coordinates and reports the resulting interface state.
What parameters does tap accept?
It accepts snapshot references @eN and @vN, element names, x and y coordinates, target descriptions, and clicks=2 for double taps.
Source text
tap.md · Apache-2.0
Tap an element with ref plus snapshotId (@eN from {{observe}}/{{list_elements}}, or @vN from {{find_visually}}), or name the element in element (its text or accessible name exactly as listed, plus role if several share it) when you have no fresh ref, or tap normalized x/y coordinates from the latest screen. element is matched against the screen as it is now and must hit exactly one element, preferring ones that can be tapped. A full-name match is used first; failing that, a name that starts with it, then (for tappable elements only) one that contains it, and then the result shows resolvedFrom and matched so you can check it was the one you meant. If several match, the result lists them (ref, place, nearby text) to pick from; if none, observe first. For a coordinate tap, say in target what you are tapping. Do not repeat an unchanged coordinate tap. clicks=2 double-taps (for things that open or zoom only on a double tap). The result's effect says what the action did to the interface: done (a clear change), small_change (only focus, a toggle or one or two elements changed, or it may still be loading: check it), no_effect (nothing in the interface changed: try another way instead of repeating) or place_changed (now somewhere else, given in effect.to).
© wangzan101 · Apache-2.0 · wangzan101/Mika