godot-editor-tooling

Installation
SKILL.md

Editor tooling (4.7)

Check editor APIs with ../godot-core/scripts/api_lookup.py. It flags deprecations, for example EditorPlugin.add_control_to_dock says "Use add_dock instead".

@tool scripts (code that runs inside the editor)

  • @tool (GDScript) / [Tool] (C#) at the top. The script runs in the editor and in the game. Guard game logic with if Engine.is_editor_hint(): return, and guard editor-only code with the opposite check.
  • Every class the tool script calls on must also be @tool, or it runs as a placeholder. Errors in tool scripts can crash the editor, so keep them small and defensive.
  • Nodes created by a tool must get node.owner = get_tree().edited_scene_root to be saved with the scene.
  • Configuration warnings: override _get_configuration_warnings() -> PackedStringArray and call update_configuration_warnings() when inputs change. They show as a ⚠ icon in the Scene dock.
  • Inspector buttons: @export_tool_button("Bake", "Bake") var bake := _bake (C#: [ExportToolButton]).
  • Dynamic properties: _get_property_list(), _get(name), _set(name, v), _validate_property(prop) (hide or readonly per state), then notify_property_list_changed().
  • Changes made by tools should be undoable: EditorInterface.get_editor_undo_redo() → create_action, add_do_property/add_undo_property, commit_action.

EditorScript (one-off automation)

@tool extends EditorScript with func _run():. Run it from the Script editor (File → Run, Ctrl+Shift+X) or from the command palette (4.5+). It's good for batch-renaming nodes, fixing resources and generating scenes. For headless automation outside the editor, use ../godot-core/scripts/run_godot.py script or scene_edit.py.

Installs
9
GitHub Stars
54
First Seen
8 days ago