/supergraph:browser-agentfrom supergraph
Controls browsers autonomously via native Rust CDP (agent-browser) for QA/QC testing. Generates ISTQB test matrices, executes test cases, traces console/network errors, and reports defects with human-like emulation.
Ships in supergraph. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Autonomous human-like browser control and professional QA/QC testcase execution without Playwright.
Powered by native Rust agent-browser (Chrome DevTools Protocol direct, zero bot-detection footprint).
Announce: "🌐 /supergraph:browser-agent — professional QA testing with real user emulation (Rust CDP)..."
navigator.webdriver and disables Blink automation flags.--input-mode human): Natural Bezier mouse curves, randomized typing cadence, natural dwell times.@ref identifiers (~100-300 tokens vs 20,000 HTML tokens), supporting --delta for incremental updates.--auto-connect to running Chrome on port 9222.CRITICAL RULE: In multi-agent environments (Supergraph Team DAG, parallel workers), never run without an isolated session. The default unnamed session is shared globally across the machine. Unnamed sessions will hijack tabs, overwrite cookies, and crash concurrent worker tests.
Before running any test or browser action, establish an isolated session:
# Derive isolated session ID scoped to current worktree / task
export AGENT_BROWSER_SESSION="$(agent-browser session id --scope worktree --prefix sg-task)"
# When connecting to shared Chrome (--cdp), ALWAYS pass --pin-tab
# to lock session to its dedicated tab and prevent tab hijacking
agent-browser --session "$AGENT_BROWSER_SESSION" --pin-tab open "$TARGET_URL"
For MCP tool calls: pass session: AGENT_BROWSER_SESSION or use pinTab: true with agent_browser_connect.
Can be invoked via MCP (mcp__supergraph-browser__*) or CLI (agent-browser):
| Action | MCP Tool | CLI Command | Purpose |
|---|---|---|---|
| Open URL | agent_browser_open | agent-browser open <url> | Navigate to page (checks WebMCP) |
| Read State | agent_browser_snapshot | agent-browser snapshot -i | Accessibility tree with @ref |
| Delta Snapshot | agent_browser_snapshot | agent-browser snapshot -i --delta | Compact incremental changes only |
| Find Target | agent_browser_find | agent-browser find role button click | Locate elements semantically |
| Click | agent_browser_click | agent-browser click @ref | Click element by ref |
| Type/Fill | agent_browser_fill | agent-browser fill @ref <text> | Fill input with human keystrokes |
| Key Press | agent_browser_press | agent-browser press Enter | Send keyboard event |
| Wait | agent_browser_wait_for_text | agent-browser wait --text <text> | Wait for condition (no bare sleep) |
| Screenshot | agent_browser_screenshot | agent-browser screenshot <path> | Capture visual evidence |
| If-Changed Capture | agent_browser_screenshot | agent-browser screenshot --if-changed | Skip unchanged pixels to save tokens |
| Video Repro Start | agent_browser_record_start | agent-browser record start <path>.webm --cursor | Record video with pointer overlay |
| Video Repro Stop | agent_browser_record_stop | agent-browser record stop | Stop video recording |
| Accessibility Audit | agent_browser_a11y | agent-browser a11y --tags wcag2a,wcag2aa | axe-core WCAG 2.1 AA audit |
| Web Vitals | agent_browser_vitals | agent-browser vitals --json | LCP, CLS, TTFB & React hydration |
| Console Logs | agent_browser_console | agent-browser console | View browser console logs |
| Page Errors | agent_browser_errors | agent-browser errors | Catch unhandled exceptions |
| Network Requests | agent_browser_network_requests | agent-browser network requests | Inspect network traffic & failures |
| Network Mock | agent_browser_network_route | agent-browser network route <pattern> --abort | Mock 500 / fault injection |
| Visual Diff | agent_browser_diff_screenshot | agent-browser diff screenshot <baseline> | Compare pixel regression |
| Viewport Size | agent_browser_set_viewport | agent-browser set viewport 375 812 | Mobile/responsive emulation |
| Media / Theme | agent_browser_set_media | agent-browser set media --color-scheme dark | Dark mode & reduced motion |
| React Tree | agent_browser_react_tree | agent-browser react tree | React component tree (DevTools) |
| WebMCP List | agent_browser_webmcp_list | agent-browser webmcp list --json | Discover page-provided tools |
| WebMCP Invoke | agent_browser_webmcp_invoke | agent-browser webmcp invoke <tool> | Call page tool directly |
| Close Session | agent_browser_close | agent-browser close | Terminate session & free resources |
When opening a page, check if the application exposes WebMCP tools before attempting manual DOM interaction:
[1. Open Page] ────> [2. WebMCP Available?] ──┬──> (Yes) ──> [Invoke WebMCP Tool directly]
webmcp list --json │ webmcp invoke <tool> --params '{...}'
└──> (No) ──> [Fallback: Snapshot & DOM Actions]
snapshot -i ──> click/fill @ref
If a relevant WebMCP tool exists matching the test case (e.g., create_item, checkout), invoke it directly. This avoids brittle DOM selectors and tests the application's native agentic API interface.
[1. Open] ───────> [2. Initial Snapshot] ───> [3. Action] ──────────> [4. Delta Snapshot]
open <url> snapshot -i -c click @e2 / fill @e3 snapshot -i --delta
Call snapshot -i -c (interactive + compact) to get verified element references (@e1, @e2, ...).
For subsequent actions on the same page, always use snapshot -i --delta to capture only altered nodes, saving ~80% context tokens.
When testing an isolated component, scope the snapshot: agent-browser snapshot -i -s "#checkout-modal".
wait @ref or wait --text "Submission Complete".wait --url "**/dashboard".wait --fn "window.__APP_READY__ === true".wait --load networkidle on applications with SSE, WebSockets, or polling — it will hang until timeout (25s).sleep 2000 / wait 2000) except when pacing actions during video recording.Connect directly to your active browser using either method:
Method A: Supergraph Chrome Relay Extension (Zero restart, 100% human profile)
# 1. Start relay server
node plugins/supergraph/extensions/chrome-relay/relay-server.js
# 2. Attach agent
export SG_BROWSER_CDP="http://127.0.0.1:9333"
Method B: Chrome Remote Debugging Port
# Attach to existing Chrome
export SG_BROWSER_CDP="http://127.0.0.1:9222"
# Or auto-discover running Chrome instance
export SG_BROWSER_AUTO_CONNECT="true"
Uses your real user session, cookies, extensions, canvas fingerprints, and hardware profile.
When tasked with testing a feature or application, the agent acts as a Senior QA Automation Engineer:
Query codebase graph to prioritize coverage on changed paths:
Use CBM_PROJECT: call detect_changes, search_graph for changed routes/pages, then trace_path for inbound/outbound call and data-flow paths. Run validated test-gaps recipes. If results are unavailable, fall back to filesystem inspection.
Generate a comprehensive test matrix covering 7 dimensions and save to docs/qa/test-matrix-<feature>.md (scaffold quickly with scripts/init-qa.sh matrix <feature> [ui|api|fullstack] [target-url]):
<script>, ' OR 1=1).network route <url> --abort).For each testcase in the matrix:
agent-browser --session "$AGENT_BROWSER_SESSION" open <url>.agent-browser --session "$AGENT_BROWSER_SESSION" fill @ref <data>.agent-browser --session "$AGENT_BROWSER_SESSION" click @ref.agent-browser --session "$AGENT_BROWSER_SESSION" get urlagent-browser --session "$AGENT_BROWSER_SESSION" is visible <selector> or agent-browser --session "$AGENT_BROWSER_SESSION" get text @refagent-browser --session "$AGENT_BROWSER_SESSION" snapshot -i --deltaAssert that no silent runtime bugs were introduced:
agent-browser --session "$AGENT_BROWSER_SESSION" console --clear → Detect React hydration warnings, runtime console.error.agent-browser --session "$AGENT_BROWSER_SESSION" errors → Unhandled Promise rejections.agent-browser --session "$AGENT_BROWSER_SESSION" network requests → Identify failed HTTP 4xx/500 endpoints.agent-browser --session "$AGENT_BROWSER_SESSION" vitals --json → Assert LCP < 2.5s, CLS < 0.1, TTFB < 800ms.Run embedded accessibility audit on key interactive views:
agent-browser --session "$AGENT_BROWSER_SESSION" a11y --tags wcag2a,wcag2aa --json
Ensure 0 critical/serious violations (color contrast, missing accessible names on buttons/inputs, keyboard traps).
If defects are found, generate a formal Bug Report at docs/qa/bug-report-<timestamp>.md (scaffold quickly with scripts/init-qa.sh bug <feature> <defect-id> <defect-title>):
BUG-AUTH-001: Missing password validation triggers unhandled 500 error.agent-browser --session "$AGENT_BROWSER_SESSION" screenshot --annotate docs/qa/evidence/<defect-id>.png
.webm video recording with cursor overlay and contact sheet:
agent-browser --session "$AGENT_BROWSER_SESSION" record start docs/qa/evidence/<defect-id>-repro.webm --cursor --contact-sheet
# Walk through repro steps at human pace with 1s pauses
agent-browser --session "$AGENT_BROWSER_SESSION" record stop
console, errors, and failing HTTP response bodies directly into the report.# 1. Establish isolated session
export AGENT_BROWSER_SESSION="$(agent-browser session id --scope worktree --prefix test)"
# 2. Open and inspect
agent-browser --session "$AGENT_BROWSER_SESSION" open http://localhost:3000
agent-browser --session "$AGENT_BROWSER_SESSION" snapshot -i -c
# 3. Interact with refs
agent-browser --session "$AGENT_BROWSER_SESSION" fill @e1 "[email protected]"
agent-browser --session "$AGENT_BROWSER_SESSION" click @e2
agent-browser --session "$AGENT_BROWSER_SESSION" wait --url "**/dashboard"
# 4. Audit A11y & Vitals
agent-browser --session "$AGENT_BROWSER_SESSION" a11y --tags wcag2a,wcag2aa
agent-browser --session "$AGENT_BROWSER_SESSION" vitals
# 5. Capture & Clean up
agent-browser --session "$AGENT_BROWSER_SESSION" screenshot --if-changed docs/qa/evidence/verify.png
agent-browser --session "$AGENT_BROWSER_SESSION" close
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub datit309/supergraph --plugin supergraph44 skills in this plugin
/analyzeRisk analysis and approach selection before planning. Use when requirements are ambiguous, approaches vary, or work touches hub/bridge nodes. Skip for typo fixes./architectureProactive architecture review — explore codebase structure, generate a self-contained HTML report with Mermaid diagrams and candidate improvements, then grill the findings. Use when planning a large refactor, onboarding to an unfamiliar codebase, or before a major architectural change./cavemanPersistent token-compression mode (~75% reduction) — now always-on by default. Strips filler while keeping code exact./database-migrationsDatabase migration best practices for schema changes, data migrations, rollbacks, and zero-downtime deployments across PostgreSQL, MySQL, and common ORMs (Prisma, Drizzle, Kysely, Django, TypeORM, golang-migrate)./design-taste-frontendAnti-slop frontend skill for landing pages, portfolios, and redesigns. The agent reads the brief, infers the right design direction, and ships interfaces that do not look templated. Real design systems when applicable, audit-first on redesigns, strict pre-flight check./diagnoseStructured 6-phase debugging. Build feedback loop first, reproduce deterministically, hypothesize with ranked falsifiable theories, instrument one variable at a time, fix with regression test, cleanup. Use when a bug exists, tests fail unexpectedly, or behavior is wrong and cause is unknown.Other plugins' skills for the same job