Skip to main content
prompt GP ChatGPT

web_interact — Claude Code prompt for browser actions

The web_interact prompt for Claude Code and ChatGPT adds mouse and keyboard actions beyond web_tap and web_type_text. Use it to open hover menus, drag items, choose native dropdown options, or handle page dialogs.

Apache-2.0 ★ 9,488 updated 2026-11-16

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/web_interact.md
Open on GitHub

What web_interact does

The prompt defines mouse and keyboard actions for web pages: hovering over an element or coordinate, dragging, choosing an option in a native dropdown, and pressing a key or key combination. It can also accept or dismiss alerts, confirmations, prompts, and leave-page checks; prompt dialogs can receive text.

While a dialog is open, other actions fail until it gets an answer. Hover, drag, and dropdown selection need a DevTools connection for the tab. Without one, those actions fail, and the prompt directs the agent to use web_tap instead. To install it in Claude Code, put the file at .claude/commands/web_interact.md.

What it helps with

  • open a hover menu or tooltip
  • drag an item or move a slider
  • choose an option from a native dropdown
  • press a key or shortcut on the focused element
  • respond to a page dialog before continuing

Example prompts for the agent

  • Hover over the menu button to reveal its options.
  • Drag the card to the position shown on the page.
  • Dismiss the confirmation dialog, then continue on the page.

How to install web_interact

Manually: put the files in place

.claude/commands/web_interact.md

Questions about web_interact

How do I install web_interact in Claude Code?

Place the prompt file at .claude/commands/web_interact.md.

What does web_interact do?

It defines browser actions for mouse and keyboard input, including hovering, dragging, selecting dropdown options, pressing keys, and responding to dialogs.

What does web_interact need to work?

Hover, drag, and dropdown selection require a DevTools connection for the tab. Without it, use web_tap for those interactions.

Source text

web_interact.md · Apache-2.0
Mouse and keyboard actions on the web page that web_tap and web_type_text cannot do. hover: move the mouse onto an element (ref+snapshotId) or point (x,y) to open hover menus and tooltips. drag: press at the element or point, move in steps and release over toRef (same snapshotId) or toX,toY (sliders, drag-to-sort, drag and drop). select: pick an option of a native drop-down (role combobox from a <select>) by its shown text or value. key: press a key or combination on the focused element, e.g. Escape, Shift+Tab, Control+A, ArrowDown. dialog: answer the dialog the page opened (alert, confirm, prompt or leave-page check, shown as dialog in the screen read): answer accept or dismiss, and text for a prompt. While a dialog is open the page is paused and every other action fails with dialog_open; it stays open until you answer it. hover, drag and select fail with devtools_unavailable when this tab has no DevTools connection; then use web_tap instead. 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

Similar prompts

All prompts for Browser and scraping →

From the same set132

The whole set →
identity The identity Claude Code prompt gives Mika the role of a personal assistant on a phone. It sorts current requests from conversation, acts in the user’s apps, then reports what happened. GP ChatGPT ★ 9,488repo stars device_files device_files — a prompt for Claude Code and ChatGPT coordinates how the model locates and copies local files through a device bridge. Runs when an agent needs to retrieve a file from the user machine. GP ChatGPT ★ 9,488repo stars root This Claude Code prompt sets rules for running Android shell commands as root. It applies to tasks involving system files or another app’s private data. GP ChatGPT ★ 9,488repo stars tap This prompt for Claude Code and ChatGPT taps interface elements by reference, name, or coordinates. GP ChatGPT ★ 9,488repo stars web_evaluate_js web_evaluate_js — a prompt for Claude Code runs JavaScript code on the current web page and returns the collected data as JSON. GP ChatGPT ★ 9,488repo stars outcome_judge The outcome_judge Claude Code prompt checks whether an assistant’s final reply fulfils the user’s request. It labels the result done, partial, or not_possible. GP ChatGPT ★ 9,488repo stars describe Prompt for Claude Code and ChatGPT that describes phone screenshots for an assistant without visual input. Converts mobile UI layouts into structured text with normalised tap coordinates. GP ChatGPT ★ 9,488repo stars do_steps The do_steps Claude Code prompt batches known actions on one screen into a single call. It stops when a step fails or the next result needs visual inspection. GP ChatGPT ★ 9,488repo stars

Project sponsors

Companies that keep this analytics open