diff --git a/skills/openclaw-trae-control b/skills/openclaw-trae-control new file mode 100644 index 00000000..66e67bef --- /dev/null +++ b/skills/openclaw-trae-control @@ -0,0 +1 @@ +---\nname: openclaw-trae-control\ndescription: Control Trae AI IDE via CDP for OpenClaw agents. Send messages, execute code, and get AI assistance through natural language commands.\n---\n\n# OpenClaw Trae Control\n\nControl Trae AI IDE desktop application through CDP (Chrome DevTools Protocol).\n\n## When to Use\n\nWhen the user wants to:\n- Send messages to Trae AI chat\n- Execute code with Trae AI\n- Get AI assistance for development tasks\n- Control Trae IDE programmatically\n\n## Connection\n\n- **CDP Port**: 9222 (default)\n- **WebSocket URL**: ws://localhost:9222/devtools/page/\n- **Browser Debugger**: http://localhost:9222/json\n\n## UI Selectors\n\n| Element | Selector |\n|---------|----------|\n| Chat Input | .chat-input-v2-input-box-editable |\n| Send Button | .chat-input-v2-send-button |\n| AI Response | [data-role="assistant"] |\n\n## Input Method (Critical)\n\n**Use page.keyboard.type() - this is the working method!**\n\n`javascript\nawait page.click('.chat-input-v2-input-box-editable');\nawait page.keyboard.type('Hello Trae!');\nawait page.click('.chat-input-v2-send-button');\n`\n\n## Prerequisites\n\n1. Trae desktop app is running\n2. CDP debugging enabled (Settings → System → Enable debugging)\n3. Port 9222 is available\n\n## Troubleshooting\n\n| Issue | Solution |\n|-------|----------|\n| Cannot connect | Check if Trae is running with CDP enabled |\n| Input not appearing | Use keyboard.type() instead of direct manipulation |\n| No response | Wait longer (up to 60s) or check network |\n \ No newline at end of file diff --git a/skills/trae-control b/skills/trae-control new file mode 100644 index 00000000..01363141 --- /dev/null +++ b/skills/trae-control @@ -0,0 +1 @@ +---\nname: trae-control\ndescription: Control Trae AI IDE via CDP protocol.\n---\n\n# Trae Control\n\nControl Trae AI IDE via CDP.\n\n## When to Use\n- Send messages to Trae AI chat\n- Execute code with Trae AI\n- Get AI assistance for development tasks\n\n## How to Use\n\n`javascript\nconst TraeController = require('./trae-controller.js');\nconst controller = new TraeController();\nawait controller.connect();\nconst response = await controller.chat('Help me write a Python hello world');\n`\n\n## Prerequisites\n\n1. Trae desktop app is running\n2. CDP debugging enabled\n3. Port 9222 is available\n\n## UI Selectors\n\n| Element | Selector |\n|---------|----------|\n| Chat Input | .chat-input-v2-input-box-editable |\n| Send Button | .chat-input-v2-send-button |\n\n## Input Method\n\nMust use page.keyboard.type() - Direct textContent won't work.\n \ No newline at end of file