From yellow-browser-test
agent-browser usage patterns and conventions reference. Use when agents or commands need agent-browser context, ref-based workflow, session persistence, semantic locator fallbacks, or error handling patterns.
How this skill is triggered — by the user, by Claude, or both
Slash command
/yellow-browser-test:agent-browser-patternsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Reference patterns and conventions for agent-browser (Vercel's AI-optimized
Reference patterns and conventions for agent-browser (Vercel's AI-optimized browser CLI). Provides shared context for all yellow-browser-test commands and agents.
Use when yellow-browser-test plugin commands or agents need shared context for ref-based element targeting, session management, error recovery, or safety rules.
This skill is not user-invokable. It provides shared context for the yellow-browser-test plugin's commands and agents.
agent-browser uses @e1, @e2 refs instead of CSS selectors. Always follow
this cycle:
agent-browser open "$BASE_URL/dashboard"agent-browser snapshot -iagent-browser fill @e2 "[email protected]"agent-browser wait --load networkidleagent-browser snapshot -iKey rule: Always re-snapshot after any action that changes the DOM. Refs are ephemeral — they only apply to the current snapshot.
Save and restore auth state to avoid re-login between test runs:
# Save after successful login
agent-browser state save .claude/browser-test-auth.json
# Restore in subsequent tests
agent-browser state load .claude/browser-test-auth.json
State includes cookies, localStorage, sessionStorage, and IndexedDB. The state file should be gitignored.
When refs are unavailable or DOM changes frequently, use semantic locators:
agent-browser find text "Submit Order" clickagent-browser find label "Email Address" fill "[email protected]"agent-browser find role button click --name "Continue"agent-browser find testid "submit-btn" clickUse semantic locators as fallback when snapshot -i refs don't match expected
elements.
Agents using agent-browser MUST follow these rules:
baseURL. Never follow links to external domains./delete|remove|destroy|drop|reset|purge|erase|clear all/i| Error | Recovery |
|---|---|
| Element ref not found | Re-snapshot with snapshot -i, use semantic fallback |
| Navigation timeout | Increase timeout: agent-browser wait --timeout 15000 |
| Session state expired | Re-run login flow, save new state |
| Browser not installed | Run agent-browser install to download Chromium |
| agent-browser not found | Run /browser-test:setup to install |
| Page shows CAPTCHA | Report error: "CAPTCHA detected — disable in test environment" |
| Blank page after navigation | Take screenshot, check console for errors |
| Connection refused | Verify dev server is running at expected URL |
npx claudepluginhub kinginyellows/yellow-plugins --plugin yellow-browser-testAutomates browser tasks like E2E testing, form filling, screenshots, and scraping using Vercel's agent-browser CLI with ref-based element targeting.
Automates headless browser tasks with Vercel's agent-browser CLI: navigate URLs, snapshot interactive elements with refs (@e1), click/fill/type, scroll, test web pages.
Automates browser interactions via the agent-browser CLI: navigation, form filling, clicking, screenshotting, and UI state checking. Use AI snapshot workflow to interact with elements by reference.