---
name: "browser-agent-dom-action-tree"
description: "Control web browsers autonomously using accessibility DOM trees and click coordinates."
metadata:
  author: "Browserbase"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "control web browser with ai"
  - "extract accessibility tree for agent"
  - "click button in browser agent"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Web Browser Agent Accessibility Tree & Actions

Powers autonomous browser agents: extracting simplified accessibility trees (a11y), mapping interactive elements to numeric click IDs, executing clicks, typing text, and observing page updates.

## When to Invoke
Invoke this skill whenever you need to:
- control web browser with ai
- extract accessibility tree for agent
- click button in browser agent

## Execution SOP & Rules
1. Prune raw DOM trees into concise accessibility trees containing only interactive, visible nodes.
2. Assign unique integer IDs to clickable elements (buttons, links, inputs) to simplify model actions.
3. Execute actions via Playwright or Puppeteer: click(id), fill(id, text), scroll(direction).
4. Observe DOM state changes and screenshot changes after each browser action before proceeding.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
