This project exposes the currently open browser-side 02Agent addon to local coding agents such as OpenCode, Codex, and Claude Code.
Architecture:
OpenCode/Codex/Claude skill -> HTTP on 127.0.0.1:40202 -> bridge server -> WebSocket -> browser 02Agent addon -> Scratch VM/tools
The skill does not hard-code Scratch tools. It reads /manifest from the running bridge, then maps the current 02Agent tool schemas, prompts, and project context dynamically.
npm install
npm run startManual start is optional. The skill client auto-starts src/bridge-server.js if it is not already running. Then open 02engine with the 02Agent addon enabled and click 连接Skill next to the 02Agent title in the sidebar.
Default endpoint:
http://127.0.0.1:40202
Optional env:
$env:PORT="40202"
$env:BRIDGE_TOKEN="optional-shared-token"
npm run startIf BRIDGE_TOKEN is omitted, browser agents may connect with any non-empty token. HTTP callers must use the current browser token only if you set BRIDGE_TOKEN.
GET /healthGET /manifestGET /toolsGET /promptsPOST /call
Call body:
{
"name": "getProjectOverview",
"arguments": {}
}node src/client.js health
node src/client.js manifest
node src/client.js tools
node src/client.js call getProjectOverview {}
@'{"query":"中文积木"}'@ | node src/client.js call searchBlocks --stdinUse --stdin or --base64 <utf8-json-base64> for Chinese/non-ASCII arguments to avoid Windows command-line encoding issues.
- The bridge listens only on
127.0.0.1. - API keys and model settings are not exposed by the addon manifest.
- The browser addon must be explicitly connected from the UI.
- Tool schemas and prompts are fetched from the live addon, so newly added 02Agent tools are available without editing this skill.