Skip to content

02engine/02engine-02agent-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

02engine 02Agent Skill Bridge

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.

Start

npm install
npm run start

Manual 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 start

If 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.

HTTP API

  • GET /health
  • GET /manifest
  • GET /tools
  • GET /prompts
  • POST /call

Call body:

{
  "name": "getProjectOverview",
  "arguments": {}
}

CLI

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 --stdin

Use --stdin or --base64 <utf8-json-base64> for Chinese/non-ASCII arguments to avoid Windows command-line encoding issues.

Security

  • 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.

About

skill for AI to write scratch projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors