| name | debug-bridge-scaffold |
| description | Meta-skill for creating debug bridges for new technologies |
Debug Bridge Scaffold
When to Use
When you need runtime inspection of an application built with a technology that has no existing debug bridge.
Step 1: Check Existing Solutions First
Before building a custom bridge, check if a standard tool already works:
| Technology | Existing Solution |
|---|
| Web/Electron/browser apps | Playwright MCP, browser DevTools |
| Native apps with standard UI toolkit | Accessibility API MCP |
| Any app with visible UI | Computer Use (screenshot + click) |
| OpenFL/hxcpp | debug-bridge-openfl skill (already exists) |
If an existing solution covers your needs — use it. Don't build a bridge.
Step 2: Build a Custom Bridge
If no existing tool works, create an HTTP bridge following this pattern:
Architecture
[Background Thread] HTTP Server (127.0.0.1:PORT)
↓ accept()
[Worker Thread] Parse request → dispatch to main thread
↓ runOnMainThread(fn)
[Main Thread] Execute handler → return result
↑ result via Lock/Mutex
[Worker Thread] Send HTTP response
Required Endpoints
| Endpoint | Method | Purpose |
|---|
/ping | GET | Health check |
/screenshot | GET | Capture visual state → save to /tmp → return path |
/shutdown |