数据分析

Openclaw Godot Skill

通过 30 个内置工具驱动 Godot 4.x 编辑器,覆盖场景、节点、变换、输入模拟、截图和日志。

它能做什么

通过插件的 `godot_execute` 接口向运行中的 Godot 4.x 编辑器发送命令。可创建和删除场景与节点(支持 80+ 种节点类型)、读写属性(自动转换为 Vector2/Vector3)、设置变换、在 Play 模式下模拟键鼠和 Input Map 操作、截取视口、查看场景树与控制台日志。两种连接方式:通过 WebSocket 连接 OpenClaw Gateway(Telegram、Discord 等远程通道),或本地 MCP HTTP 桥接(端口 27183,配合 Claude Code、Cursor 等本地 AI 工具)。返回编辑器状态、项目元数据、截图与日志内容;涉及修改、删除、保存等操作需先与用户确认。

什么时候用它

  • 脚本化创建场景并添加节点
  • 在 Play 模式下模拟输入驱动自动化测试
  • 查看场景树、捕获视口截图辅助调试
  • 读取 Godot 控制台中的错误与警告

技能文档

Godot Plugin Skill

Control Godot 4.x Editor through 30 built-in tools. Supports 80+ node types.

Connection Modes

Mode A: OpenClaw Gateway (Remote)

For Telegram, Discord, and other OpenClaw channels:

  • Plugin connects TO Gateway via WebSocket
  • Gateway URL: configurable in Godot dock UI
  • Best for: remote access, mobile messaging

Mode B: MCP Bridge (Local)

For Claude Code, Cursor, and local AI tools:

  • Built-in HTTP server in Godot Plugin
  • Start: Click "Start MCP" in dock UI (port 27183)
  • Add to Claude Code: claude mcp add godot -- node /MCP~/index.js

First-Time Setup

If godot_execute tool is not available, install the gateway extension:

# From skill directory
./scripts/install-extension.sh

# Restart gateway
openclaw gateway restart

The extension files are in extension/ directory.

Quick Reference

Core Tools

CategoryKey Tools
Scenescene.create, scene.getCurrent, scene.open, scene.save
Nodenode.find, node.create, node.delete, node.getData
Transformtransform.setPosition, transform.setRotation, transform.setScale
Debugdebug.tree, debug.screenshot, console.getLogs
Inputinput.keyPress, input.mouseClick, input.actionPress
Editoreditor.play, editor.stop, editor.getState

Common Workflows

1. Scene Creation

Use godot_execute tool:

  • godot_execute(tool="scene.create", parameters={rootType: "Node2D", name: "Level1"})
  • godot_execute(tool="node.create", parameters={type: "CharacterBody2D", name: "Player"})
  • godot_execute(tool="scene.save")

2. Find & Modify Nodes

  • godot_execute(tool="node.find", parameters={name: "Player"})
  • godot_execute(tool="node.getData", parameters={path: "Player"})
  • godot_execute(tool="transform.setPosition", parameters={path: "Player", x: 100, y: 200})

3. Game Testing with Input

  • godot_execute(tool="editor.play")
  • godot_execute(tool="input.keyPress", parameters={key: "W"})
  • godot_execute(tool="input.actionPress", parameters={action: "jump"})
  • godot_execute(tool="debug.screenshot")
  • godot_execute(tool="editor.stop")

4. Check Logs

  • godot_execute(tool="console.getLogs", parameters={limit: 50})
  • godot_execute(tool="console.getLogs", parameters={type: "error", limit: 20})

Tool Categories

Console (2 tools)

  • console.getLogs - Get logs from Godot log file {limit: 100, type: "error"|"warning"|""}
  • console.clear - Placeholder (logs can't be cleared programmatically)

Scene (5 tools)

  • scene.getCurrent - Get current scene info
  • scene.list - List all .tscn/.scn files
  • scene.open - Open scene by path
  • scene.save - Save current scene
  • scene.create - Create new scene {rootType: "Node2D"|"Node3D"|"Control", name: "SceneName"}

Node (6 tools)

  • node.find - Find by name, type, or group
  • node.create - Create node (80+ types: CSGBox3D, MeshInstance3D, ColorRect, etc.)
  • node.delete - Delete node by path
  • node.getData - Get node info, children, transform
  • node.getProperty - Get property value
  • node.setProperty - Set property value (Vector2/3 auto-converted)

Transform (3 tools)

  • transform.setPosition - Set position {x, y} or {x, y, z}
  • transform.setRotation - Set rotation (degrees)
  • transform.setScale - Set scale

Editor (4 tools)

  • editor.play - Play current or custom scene
  • editor.stop - Stop playing
  • editor.pause - Toggle pause
  • editor.getState - Get playing state, version, project name

Debug (3 tools)

  • debug.screenshot - Capture viewport
  • debug.tree - Get scene tree as text
  • debug.log - Print message

Input (7 tools) - For Game Testing

  • input.keyPress - Press and release key {key: "W"}
  • input.keyDown - Hold key down
  • input.keyUp - Release key
  • input.mouseClick - Click at position {x, y, button: "left"|"right"|"middle"}
  • input.mouseMove - Move mouse to position {x, y}
  • input.actionPress - Press input action {action: "jump"}
  • input.actionRelease - Release input action

Script (2 tools)

  • script.list - List .gd files
  • script.read - Read script content

Resource (1 tool)

  • resource.list - List files by extension

Supported Keys for Input

A-Z, 0-9, SPACE, ENTER, ESCAPE, TAB, BACKSPACE, DELETE
UP, DOWN, LEFT, RIGHT
SHIFT, CTRL, ALT
F1-F12

Node Types for Creation

TypeDescription
Node2D2D spatial
Node3D3D spatial
Sprite2D2D sprite
CharacterBody2D2D character
CharacterBody3D3D character
RigidBody2D/3DPhysics body
Area2D/3DTrigger area
Camera2D/3DCamera
Label, ButtonUI elements

Tips

Input Simulation

  • Only works during Play mode
  • Use input.actionPress for mapped actions (from Input Map)
  • Use input.keyPress for direct key simulation

Finding Nodes

node.find {name: "Player"}      # By name substring
node.find {type: "Sprite2D"}    # By exact type
node.find {group: "enemies"}    # By group

Vector Properties

node.setProperty auto-converts dictionaries to Vector2/Vector3:

{path: "Cam", property: "zoom", value: {x: 2, y: 2}}  # → Vector2(2, 2)

Console Logs

console.getLogs {limit: 50}           # Last 50 lines
console.getLogs {type: "error"}       # Errors only
console.getLogs {type: "warning"}     # Warnings only

🔐 Security: Model Invocation Setting

When publishing to ClawHub, you can configure disableModelInvocation:

SettingAI Auto-InvokeUser Explicit Request
false (default)✅ Allowed✅ Allowed
true❌ Blocked✅ Allowed

Recommendation: true

Reason: During Godot development, it's useful for AI to autonomously perform supporting tasks like checking scene tree, taking screenshots, and inspecting nodes.

When to use true: For sensitive tools (payments, deletions, message sending, etc.)

As of v1.2.10 this skill ships with disableModelInvocation: true — it runs only on explicit user request.

Security & Privacy Disclosure

This skill drives a live Godot Editor. Full disclosure of capabilities and current limitations:

  • Local HTTP bridge has no authentication (current limitation): the MCP bridge (port 27183) accepts requests without auth or origin restriction. Keep it bound to localhost and never expose the port on shared or public networks — any local process could otherwise send editor commands. Token authentication and origin allow-listing are on the roadmap.
  • Destructive operations — confirm with the user before: modifying/deleting nodes, saving scenes, simulating input. Keep the project under version control before automation sessions.
  • Data visibility: tools can read and transmit project name, engine version, scene structure, script contents, and viewport screenshots to the connected agent. Don't use on projects whose contents must not leave the machine.
  • Trigger scope: routine-sounding requests ("clean up the scene", "save everything") map to state-changing editor operations — confirm once before the first state-changing call in a session.

License

Apache-2.0 — See LICENSE.md

常见问题

非 Play 模式下能模拟输入吗?
不能。文档明确说明 input 模拟(按键、鼠标、Input Map 操作)只在 Play 模式下生效。
本地 MCP 桥接有身份验证吗?
没有。文档披露 27183 端口的 MCP 桥接不校验请求来源,建议仅绑定 localhost,不要暴露到共享或公网环境。
AI 代理会自动调用这些工具吗?
不会。截至 v1.2.10,该技能默认 disableModelInvocation: true,仅在用户明确请求时执行。

相关技能

通过 MCP 客户端驱动正在运行的 Unreal Engine 编辑器,管理关卡、Actor、PIE 与控制台命令。

71 次安装

通过约 100 个工具控制 Unity 编辑器,覆盖场景、GameObject、输入模拟与 C# 代码执行。

116 次安装3 星标

按命令族和 profile 选择合适的 OpenClaw CLI 命令,并校验执行结果。

334 次安装6 星标

用一条 CLI 命令管理 Nextcloud 的笔记、任务、日历、文件、联系人和 Deck 看板。

187 次安装9 星标

通过托管 OAuth 调用 Google Docs API,实现文档创建、读写与样式管理。

278 次安装8 星标