/debug-bridge:debug-bridgefrom debug-bridge
Zero-instrumentation browser sidecar, visual feedback annotation, and in-browser Design Mode for AI agents
Ships in debug-bridge. 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.
None: SKILL.md is the whole skill.
Debug Bridge provides autonomous browser control, visual feedback annotations, and in-browser Design Mode for AI agents.
┌─────────────────┐ CDP / WS ┌─────────────────┐ CDP / DOM ┌─────────────────┐
│ AI Agent │ ◄──────────────────► │ Debug Bridge │ ◄──────────────────► │ Target Browser │
│ (Claude/Codex) │ │ (Server+Sidecar)│ │ (Pure Sidecar) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
Whenever this skill opens a page, the agent MUST be listening for change requests sent from the Design Mode dock (Send). The user should never have to come back to the chat and ask "did you get it?". Starting the bridge without arming the inbox counts as an incomplete run.
┌──────────┐ Send ┌──────────────┐ submit ┌────────────────────────┐
│ dock │───────▶│ bridge :PORT │─────────▶│ browser wait (agent) │
└──────────┘ └──────────────┘ │ exits 0, wakes agent │
└───────────┬────────────┘
▼
apply change, re-arm wait
wait loop is how requests reach you, so injection would only duplicate them. Worse, in auto mode the sidecar picks any sibling pane and types the prompt into it (for example a dev server's stdin). Harness shells usually don't keep env vars between commands, so set it on the same command line:
AGENT_BRIDGE_TMUX_TARGET=none debug-bridge connect --port 4000 --session default --cdp --browser managed
Run connect in its own tmux window or background job (it holds the terminal), then browser open in another.browser open, as a background job the harness tracks (Claude Code: Bash run_in_background: true; other harnesses: a background shell whose exit you are notified of):
debug-bridge browser wait --port 4000 --session default --timeout 1800000
Exit codes: 0 request received (change, page URL, screenshot and context paths printed), 1 timeout, 2 bridge down, 64 bad arguments (fix the command, don't re-arm it unchanged).context_json_path, which holds the selected element's selector, XPath and DOM snippet), apply the change in source, and verify with browser screenshot.
The dock shows Working from the moment the user presses Send. Close the loop so it doesn't stay on Working:
debug-bridge browser design-mode done "Made the CTA larger" --port 4000 --session default
# or, if you could not apply it:
debug-bridge browser design-mode error "Selector not found in source" --port 4000 --session default
wait command is wrong; fix it.The watcher is single-shot by design: one request, one wake. If a Send arrives between runs, the bridge keeps the latest one for your next wait. Re-arm before doing anything slow, because only the latest unclaimed Send is kept.
No changes needed in target webapp. Playwright automatically detects and launches system Google Chrome (or Chromium fallback) with a visible desktop window, attaches via CDP, and exposes interactive element handles (@e1, @e2, ...), live CSS injection, and full console/network observation.
Chrome Auto-Launch: Automatically detects and opens system Google Chrome (
/Applications/Google Chrome.appon macOS, or standard paths on Windows/Linux) in headed mode by default. Override via--channel <name>or--headless.
# 1. Start bridge server with CDP browser sidecar
PORT=$(shuf -i 4000-4999 -n 1)
SESSION="dev-session-$(date +%s)"
debug-bridge connect --port $PORT --session $SESSION --cdp --browser managed &
# 2. Open page in sidecar browser
debug-bridge browser open "http://localhost:3000" --port $PORT --session $SESSION
# 3. Take interactive snapshot (returns @e handles, roles, selectors, and XPaths)
debug-bridge browser snapshot --port $PORT --session $SESSION
# 4. Click or fill interactive elements
debug-bridge browser click @e1 --port $PORT --session $SESSION
debug-bridge browser fill @e2 "[email protected]" --port $PORT --session $SESSION
# 5. Capture screenshot
debug-bridge browser screenshot --out ./screenshot.png --port $PORT --session $SESSION
# 6. Apply live temporary CSS preview patch
debug-bridge browser preview-patch --css "button { background: #2563eb !important; }" --port $PORT --session $SESSION
Design Mode enables users and agents to click elements, tweak styles live, inspect anchored XPaths, batch multiple element tweaks, draw annotations (pen, rect, region, arrow), quick render live preview patches, and copy paste-ready prompts for agents with generated screenshot artifacts.
Auto-Show by Default: Whenever a page is opened or navigated via
debug-bridge browser open, the Design Mode floating feedback overlay automatically shows on page load without requiring manual activation.
bottom: 24px; left: 50%) with mode toggles, chips, inline change description, and action controls.👆 Interact / Browse: Click input fields, type text, navigate links, and interact with the page normally without click interception. Press Escape to toggle between Interact and Select.↖ Pointer: Element inspection, highlighting, and multi-selection (@e1, @e2, ...).✏ Freehand Pen: Smooth polyline drawing directly on the page canvas.◰ Region Box: Dashed purple bounding box for region-level changes.↗ Directional Arrow: Point arrows directly at elements or areas to change.▢ <tag>): Colored to match element border. Clicking opens style tweakers; ✕ removes selection.◰ region, ↗ arrow, ✏ pen): Colored badges with quick removal.Describe the change text input embedded right in the floating pill.<style id="__agent_bridge_live_preview__"> with !important rules directly into the page so visual adjustments appear instantaneously.⚙ Tweak button to modify padding, margin, font-size, color, background-color, border-radius, text content, and view unified CSS batch diff./tmp/debug-bridge-design-mode/process-<pid>-<session>/:
surface-...-screenshot.png)surface-...-live-context-<session>.png)surface-...-context.json)<Describe the change>
Page: <URL>
<path/to/surface-...-screenshot.png>
<path/to/surface-...-live-context.png>
Details: <path/to/surface-...-context.json>
# Open page (automatically shows Design Mode overlay)
debug-bridge browser open "http://localhost:3000" --port $PORT --session $SESSION
# Check status and current selections
debug-bridge browser design-mode status --port $PORT --session $SESSION
# Set active tool (select, pen, rect, arrow, region)
debug-bridge browser design-mode tool pen --port $PORT --session $SESSION
# Trigger Quick Render from CLI
debug-bridge browser design-mode quick-render --port $PORT --session $SESSION
# Copy formatted prompt and generate screenshot artifacts
debug-bridge browser design-mode copy-prompt -r "Make header dark navy and enlarge CTA" --port $PORT --session $SESSION
# Retrieve structured handoff payload
debug-bridge browser design-mode handoff -r "Apply visual adjustments" --json --port $PORT --session $SESSION
# Clear live preview and selections
debug-bridge browser design-mode clear --port $PORT --session $SESSION
# Disable design mode
debug-bridge browser design-mode disable --port $PORT --session $SESSION
The Feedback MCP Server exposes tools to Claude Code and other agent runners over stdio:
# Start MCP server
npx debug-bridge-feedback-mcp --bridge-port 4000 --session default
browser_control:
open, click, fill, screenshot, snapshot, preview_patch, evaluate@e1 ref, CSS selector, or XPath.design_mode_control:
enable, disable, status, quick_render, copy_prompt, get_handoff, clear_preview, clear_selectionsrequestedChange, cssPatchfeedback_annotation:
list_batches, get_batch, create_mark, add_suggestionFor projects that choose to include runtime telemetry inside their source tree:
npm install debug-bridge-browser
import { createDebugBridge } from 'debug-bridge-browser';
// Auto-connects in DEV without requiring query parameters:
if (import.meta.env.DEV) {
const bridge = createDebugBridge({
url: 'ws://localhost:4000/debug?role=app&sessionId=default',
sessionId: 'default',
appName: 'My App',
appVersion: '1.0.0',
});
bridge.connect();
}
Note: Page URLs stay clean (
http://localhost:5173/). Query parameters like?session=or?port=are never required.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub stevengonsalvez/agent-bridge --plugin debug-bridge3 skills in this plugin
/agentic-e2e-testFull-stack agentic end-to-end test suite and dual-agent delegation runbook for Agent Bridge. Validates live app spin-up, AI Quick Render style synthesis, human developer simulation (selecting elements, drawing annotations, prompt batch submission), and reactive agent feedback loops (dock status pill, target DOM shimmer, agent broadcast completion)./test-design-modeAutomated end-to-end testing suite and subagent protocol for validating Agent Bridge Design Mode across mobile (phone) and desktop viewports, testing toolbar visibility, tool switching, info popovers, AI quick render, manual tweaks, and batch submissions.