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.
npx claudepluginhub kinginyellows/yellow-plugins --plugin yellow-browser-testThis skill uses the workspace's default tool permissions.
Reference patterns and conventions for agent-browser (Vercel's AI-optimized
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.
Provides CLI for headless browser automation: navigate, snapshot interactive elements, click, type, fill forms, scroll, and extract data for AI agents and web testing.
Applies Acme Corporation brand guidelines including colors, fonts, layouts, and messaging to generated PowerPoint, Excel, and PDF documents.
Share bugs, ideas, or general feedback.
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 "user@example.com"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 "test@example.com"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 |