Debug Bridge

Let an AI coding agent see, drive, and receive visual change requests directly from your web app with zero code changes.
Debug Bridge launches a managed Chrome browser via a CDP sidecar, exposes interactive element handles (@e1, @e2), and mounts a Design Mode dock directly in the page. When you click elements, draw annotations, and hit Send, your agent receives the exact prompt, DOM context, clean full-page screenshot, and an isolated screenshot crop of only the target element.
1. Agent Skill (Recommended)
Point your agent to the skill and go.
Get the Skill
Give your agent the skill from this repo using any of these methods:
Method A: Point directly to the skill (Fastest)
Point your agent directly at skills/debug-bridge/SKILL.md in this repo, or include it in your agent prompt instructions.
Method B: Install via skills CLI
Installs into Claude Code, Antigravity / Gemini CLI, Cursor, Codex, and OpenCode:
# Global (links all installed agents automatically):
npx skills add stevengonsalvez/agent-bridge --skill debug-bridge -g -y
# Or install into current project repo:
npx skills add stevengonsalvez/agent-bridge --skill debug-bridge -y
Method C: Claude Code plugin marketplace
/plugin marketplace add stevengonsalvez/agent-bridge
/plugin install debug-bridge@agent-bridge-marketplace
Start the Agent
Prompt your agent:
"Debug the app on http://localhost:5173 with debug-bridge and listen for visual changes."
How the Agent Loop Works
The agent runs the entire loop autonomously:
┌───────────────────┐ opens managed browser ┌────────────────────────┐
│ Agent Session │──────────────────────────────▶│ Target Web App │
│ (Claude / agy) │◀──────────────────────────────│ + Design Mode Dock │
└─────────┬─────────┘ arms inbox: `browser wait` └───────────┬────────────┘
│ │
│◀────────────────────────────────────────────────────┘
│ User selects element & presses "Send"
▼
Wakes agent with:
• Element screenshot crop (image/component only)
• Full-page clean screenshot
• DOM selector, XPath, and coordinates
• Natural language request
▼
1. Re-arms inbox (`debug-bridge browser wait &`)
2. Reads element screenshot and applies code edit
3. Verifies change with screenshot
4. Closes loop: `debug-bridge browser design-mode done "Updated button styles"`
The user never has to leave the browser or ask the agent "did you get it?".
2. Manual Use (CLI)
Use the CLI directly from your terminal without an agent runner.
1. Open your app in managed Chrome
debug-bridge browser open "http://localhost:5173" --port 4000
Launches Chrome with CDP sidecar and activates Design Mode dock. No app instrumentation required.
2. Inspect and control the page
debug-bridge browser snapshot --port 4000 # numbered handles @e1, @e2, ...
debug-bridge browser click @e1 --port 4000
debug-bridge browser fill @e2 "[email protected]" --port 4000
debug-bridge browser screenshot --out ./screenshot.png --port 4000
debug-bridge browser preview-patch --css "button { background: #2563eb !important; }" --port 4000
3. Block for change requests
In a second terminal, listen for the dock's Send button:
debug-bridge browser wait --port 4000
Select an element in the browser, type a change, and click Send. wait prints the captured prompt, saves visual artifacts, and exits 0:
Waiting for Design Mode request on session "default"...
DESIGN MODE REQUEST
Change: make hero illustration 3D glowing isometric
Page: http://localhost:5173
Element: .hero-illustration (@e3)
Image: /tmp/debug-bridge/demo-element-image.png
Context: /tmp/debug-bridge/context.json
Prompt:
/tmp/debug-bridge/demo-element-image.png make hero illustration 3D glowing isometric
Page: http://localhost:5173
Details: /tmp/debug-bridge/context.json
Captured Visual Artifacts
Debug Bridge generates isolated element crops so models inspect exact component pixels:
| Artifact | Type | Description |
|---|
demo-element-image.png | Element Crop (Image Only) | Focused crop containing only the selected target element |
demo-page-screenshot.png | Full Viewport | Full-page screenshot without overlays |