agent-browser

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

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

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 with proper waiting strategies and failure recovery so web interactions succeed reliably. ## 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 page snapshot, with CDP polling for wait conditions instead of blind sleeps. - Failure Recovery: A structured 4-attempt retry protocol with CDP-based diagnosis and a blocker report template for auth walls, CAPTCHAs, and iframes. - Use Case: Reproduce a reported UI bug on localhost:3000 by navigating, locking the tab, snapshotting the page, clicking through the failing flow, and capturing a screenshot as evidence. ## Quick Start Use the agent-browser skill to open http://localhost:3000, reproduce the checkout bug, and take a screenshot of the failing state.

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?▼

Follow a snapshot-driven loop: navigate to the URL, lock the tab, take a snapshot to get element refs, act on those refs, then re-snapshot to verify. Never click without a fresh snapshot in the same lock session.

How to wait for page elements in browser automation?▼

Poll for state changes using CDP Runtime.evaluate every 500ms to 1s until a condition is true, such as document.readyState === 'complete' or a target element appearing. Avoid fixed sleep calls, which waste time or fail on slow networks.

Why does browser automation click the wrong element in Cursor?▼

Input routes to the Cursor UI instead of the page when the lock/unlock protocol is violated. Lock the tab before any interaction on existing tabs, lock only after navigating on new tabs, and always unlock when finished.

Can browser automation interact with elements inside iframes?▼

No, iframe content is not accessible through page snapshots; only elements outside iframes appear. If the target is inside an iframe, stop and report the blocker with an alternative approach for the user.

What are the limitations of CDP-based browser automation?▼

CDP Input.* methods are denied because they are focus-sensitive and route to the wrong target in Electron webviews. Cookie, storage, permission, and navigation commands are also restricted; use the dedicated browser tools for input and navigation instead.