Get the FREE Ultimate OpenClaw Setup Guide →
T

Godot Skill

Scanned

@TomLeeLive

npx machina-cli add skill @TomLeeLive/openclaw-godot-skill --openclaw
Files (1)
SKILL.md
5.8 KB

Godot Plugin Skill

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

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

Source

git clone https://clawhub.ai/TomLeeLive/openclaw-godot-skillView on GitHub

Overview

Automate Godot 4.x editor tasks using the OpenClaw Godot plugin. It exposes 30 built-in tools for scene management, node manipulation, input simulation, debugging, and editor control, enabling hands-free inspection, node creation, screenshots, and gameplay testing.

How This Skill Works

The skill issues godot_execute tool calls to the Godot editor via the gateway extension. Each command specifies a tool name and parameters (scene, node, transform, input, editor actions) to perform actions and return results.

When to Use It

  • Automate scene inspection and modification inside a Godot project
  • Programmatically create, find, or modify nodes and transforms
  • Run automated gameplay tests with scripted inputs and editor control
  • Capture screenshots and inspect logs during debugging
  • Manage editor state: play, stop, pause, and project info

Quick Start

  1. Step 1: Ensure godot_execute is available via the gateway extension
  2. Step 2: Use godot_execute with tool names and parameters, e.g., scene.create
  3. Step 3: Verify results and logs with console.getLogs or debug.screenshot

Best Practices

  • Start with scene.create to bootstrap a clean level, then save the scene
  • Always verify node existence with node.find before modifications
  • Batch actions by combining related tools in a single script
  • Capture logs with console.getLogs and compare to expectations
  • Use editor.getState to confirm editor status after play/stop

Example Use Cases

  • Auto-create a new Level scene, spawn a Player node, and position it
  • Run a quick playtest by pressing 'W' and 'space' via input and capture logs
  • Open a scene, modify a Transform, and save changes
  • Take a screenshot of the viewport after automated steps
  • Dump the scene tree to verify hierarchy during debugging

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers