| name | controlling-the-browser |
| description | MUST be used when you need to control the user's real Chrome browser — inspect pages, take screenshots, click elements, fill forms, read content, or execute JavaScript on live tabs with existing auth and cookies. Uses DOMINATRIX browser control through Anima's gateway extension. Triggers on: control browser, inspect page, browser automation, chrome tab, read page content, get page text, page screenshot, DOM snapshot, fill form in browser, click in browser, browser cookies, console logs, network requests, control tab, dominatrix. |
| allowed-tools | Bash(anima dominatrix:*) |
Browser Control with DOMINATRIX
Control the user's real Chrome browser — live tabs with existing auth, cookies, and profiles. Unlike headless automation (agent-browser), this controls the actual browser the user has open.
When to Use This vs browsing-the-web
| This skill (controlling-the-browser) | browsing-the-web (agent-browser) |
|---|
| Control user's real Chrome tabs | Headless/isolated Playwright browser |
| Existing auth, cookies, sessions | Clean sessions, state files |
| Inspect what user is looking at | Automate new browsing tasks |
| Debug live pages | Scrape, test, fill forms from scratch |
Core Workflow: Snapshot → Ref → Act → Re-snapshot
anima dominatrix snapshot
anima dominatrix click --ref @e3
anima dominatrix fill --ref @e5 --value "user@example.com"
anima dominatrix snapshot
Key principle: Always snapshot before interacting. Refs are invalidated on page navigation or dynamic changes — re-snapshot to get fresh refs.
Commands
All commands go through anima dominatrix <method>. When --tab-id is omitted, the active tab is used.
Snapshot & Page Info
anima dominatrix snapshot
anima dominatrix snapshot --full
anima dominatrix snapshot --scope "#main"
anima dominatrix snapshot --sources
anima dominatrix get_text
anima dominatrix get_text --ref @e5
anima dominatrix get_markdown
anima dominatrix get_markdown --ref @e5
anima dominatrix get_url
anima dominatrix get_title
anima dominatrix get_html
anima dominatrix get_html --selector "div.main"
Interaction (ref-based — preferred)
anima dominatrix click --ref @e3
anima dominatrix click --selector "button.submit"
anima dominatrix fill --ref @e10 --value "hello"
anima dominatrix fill --selector "input[name=email]" --value "user@example.com"
anima dominatrix check --ref @e7
anima dominatrix uncheck --ref @e7
anima dominatrix select --ref @e5 --value "option-1"
Semantic Find (locate + act in one call)
anima dominatrix find_text --text "Posts" --perform click
anima dominatrix find_text --text "Email" --perform fill --value "user@example.com"
anima dominatrix find_label --label "Password" --perform fill --value "secret"
anima dominatrix find_role --role button --name "Submit" --perform click
anima dominatrix find_placeholder --placeholder "Search..." --perform fill --value "query"
Navigation & Scrolling
anima dominatrix navigate --url "https://example.com"
anima dominatrix scroll_down --value 500
anima dominatrix scroll_up --value 300
anima dominatrix scroll_to --ref @e5
anima dominatrix scroll_to --position top
anima dominatrix scroll_to --position bottom
Wait
anima dominatrix wait_for_element --selector "div.loaded"
anima dominatrix wait_for_text --text "Success"
anima dominatrix wait_for_url --pattern "**/posts"
anima dominatrix wait --ms 2000
React Source Inspection
anima dominatrix get_source --ref @e12
anima dominatrix get_source --selector ".my-button"
Debugging
anima dominatrix exec --script "document.title = 'hi'"
anima dominatrix eval --expression "document.title"
anima dominatrix get_console
anima dominatrix get_network
anima dominatrix get_storage
anima dominatrix get_cookies
anima dominatrix screenshot
React Source Mapping
Map DOM elements back to React component source files. Works on any React dev app — no additional libraries needed.
anima dominatrix get_source --ref @e12
anima dominatrix snapshot --sources
Workflow: UI bug → source file
anima dominatrix snapshot --sources — see elements with component names
- Identify the problematic element by its ref
anima dominatrix get_source --ref @eN — get full ancestry chain
- Open the source file and fix the issue
Requirements
- React app running in dev mode (
_debugSource info is stripped in production builds)
- No additional libraries needed — reads React fiber internals directly from DOM
- Production builds will still show component names but without file paths
Content Reading Strategy
| Method | When to use | Output size |
|---|
snapshot | Default — find interactive elements with @refs | ~200-400 tokens |
snapshot --sources | Elements + React component names & source files | ~300-600 tokens |
get_text | Quick content reading, search results | Medium |
get_markdown | Structured content (articles, docs) | Medium |
snapshot --full | Deep DOM inspection (rarely needed) | ~50,000+ tokens |
get_html | Specific element inspection | Variable |
screenshot | Visual verification, layout issues | PNG data URL |
Ref Lifecycle
- Refs (
@e1, @e2, ...) map directly to DOM element references in the content script
- Invalidated when the page navigates or content changes significantly
- Always re-snapshot after: clicking links, submitting forms, or waiting for dynamic content
- The ancestor walking system handles cases like clicking a
<span> inside an <a> — it finds the nearest interactive parent automatically
Notes
- Real browser: Controls actual Chrome with real profiles, cookies, and auth — not sandboxed
- CSP bypass: Script execution uses JailJS (AST interpreter) for sites with strict CSP
- Resilient injection: If the content script isn't loaded (page reload, manual navigation), it's automatically injected on demand
- Console/Network: Collected passively from content script load — retrieve history anytime
- Side panel context: When the Anima side panel is open, commands without
--tabId target that tab