agent-browser

Automates browser interactions for AI agents using snapshot-driven navigation, locking, and CDP-based verification.

15|3|Updated Jul 9, 2026
One-click install
npx skills add https://github.com/kiurakku/cursor-kit-for-ai --skill agent-browser-kiurakku
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agent-browser
Source: https://github.com/kiurakku/cursor-kit-for-ai/tree/main/plugins/frontend/skills/agent-browser
Command: npx skills add https://github.com/kiurakku/cursor-kit-for-ai --skill agent-browser-kiurakku

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Browser automation by AI agents often fails due to random clicking, stale element references, and input routed to the wrong target. This Skill provides a disciplined navigate-lock-snapshot-act workflow that makes UI testing, bug reproduction, and web interaction reliable and recoverable. ## Core Features & Use Cases - Lock/Unlock Protocol: Enforces correct lock ordering so input reaches the page instead of the Cursor UI, with distinct flows for new and existing tabs. - Snapshot-Driven Actions: Every click, type, or fill uses fresh element refs from a snapshot, with CDP polling for wait conditions instead of blind sleeps. - Failure Recovery: A structured 4-attempt retry protocol with escalating diagnostics, plus a blocker report template for auth walls, CAPTCHAs, and iframes. - Use Case: Reproduce a reported UI bug on localhost: verify the dev server responds, navigate, lock the tab, snapshot the page, interact with the failing form, capture a screenshot as evidence, and report the confirmed bug. ## Quick Start Use the agent-browser skill to open http://localhost:3000, reproduce the checkout form bug, and take a screenshot of the result.

Frequently Asked Questions about agent-browser

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate browser interactions with an AI agent?▼

Use a snapshot-driven workflow: navigate to the URL, lock the tab, take a snapshot to get element refs, then click or type using those refs. Re-snapshot after every DOM change and poll with CDP instead of using fixed sleeps.

How to wait for page elements in browser automation without sleep?▼

Poll for state changes using CDP Runtime.evaluate with a JavaScript condition, checking every 500ms to 1s until the condition is true or a 10-30s timeout. Wait on document.readyState, element presence, or spinner disappearance rather than fixed delays.

Why does browser automation click the wrong element or window?▼

Input routes to the wrong target when the lock/unlock order is violated or stale refs are used after DOM changes. Lock the tab before any interaction, always use refs from the latest snapshot, and unlock when finished.

Can browser automation handle iframes and CAPTCHAs?▼

No. Elements inside iframes do not appear in snapshots and cannot be interacted with, and CAPTCHAs or passkeys require manual user completion. The correct behavior is to stop after retries and report the blocker with the current URL and page state.

What CDP methods are safe for browser automation debugging?▼

Safe methods include Runtime.evaluate, DOM.getDocument, DOM.querySelector, CSS.getComputedStyleForNode, Log.enable, and Network.enable. Avoid Input.* methods because they are focus-sensitive and route input to the editor UI instead of the page.