/godot-editor-tools:godot-editor-toolsfrom godot-editor-tools
Godot 4 editor plugins and addons. Use when writing or fixing an EditorPlugin, plugin.cfg, @tool script, inspector plugin, EditorDock, 3D gizmo, tool menu, undoable scene edits or an addon that runs a server inside the editor, or when a project has addons/*/plugin.cfg.
Ships in godot-editor-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
An editor plugin is an addon folder addons/<name>/ with a plugin.cfg and a @tool script extending EditorPlugin. It runs inside the editor process, so a bug in it can freeze or crash the editor; build it in small steps and keep every registration reversible. Examples are GDScript; C#-specific rules are marked.
Start by reading the project's Godot version from config/features in project.godot and follow that version, not the newest; per-version changes are in the godot plugin's references/version-notes.md, if installed.
addons/my_tool/
plugin.cfg
plugin.gd # extends EditorPlugin
my_dock.tscn
inspector_plugin.gd
icons/
[plugin]
name="My Tool"
description="One line shown in Project Settings → Plugins."
author="Your Name"
version="0.1.0"
script="plugin.gd"
Those five keys are the whole format. script is relative to the plugin folder. Enabling writes res://addons/my_tool/plugin.cfg into project.godot under [editor_plugins] enabled=PackedStringArray(...); editing that list by hand (preserving other entries) is how to enable a plugin without the UI.
@tool. That includes helpers the plugin preloads; a non-tool GDScript used from the editor acts like an empty file. A script that extends a @tool script needs @tool itself. Static variables of non-tool scripts read as null from tool code (static methods, constants and enums work).@tool scripts ship in exports and run in the game too. Only editor classes (EditorPlugin, EditorInterface, EditorInspectorPlugin, ...) are absent from exports. Guard editor-only logic in runtime node scripts with Engine.is_editor_hint(), and keep the plugin's own scripts out of runtime scenes.EditorPlugin, inspector and gizmo plugins) in #if TOOLS ... #endif. Never wrap a runtime [Tool] node class; that strips it from exports and breaks every scene that uses it._enter_tree and _exit_tree are mirror images. Everything added (custom types, docks, inspector, gizmo, import and export plugins, tool menu items, Engine.register_singleton entries, loggers, servers, threads) is removed and freed in _exit_tree, in reverse order. A plugin that leaks registrations duplicates them on the next enable._enable_plugin / _disable_plugin. These run only when the user toggles the plugin: add or remove autoloads with add_autoload_singleton/remove_autoload_singleton, or default project settings.EditorInterface.get_editor_undo_redo() (EditorUndoRedoManager), one action per user-visible change, and set owner to EditorInterface.get_edited_scene_root() on new nodes or they won't be saved. Direct property writes from tool code can't be undone. Recipes: references/scene-editing-and-services.md._process, or run work on WorkerThreadPool/Thread and hand results back with call_deferred. Join threads in _exit_tree.preload("http_server.gd")) and find the plugin folder with (get_script() as Script).resource_path.get_base_dir(), so the addon works if someone moves or renames its folder.| Want | Use | Read |
|---|---|---|
| A dock or bottom panel | add_dock(EditorDock) / remove_dock (Godot 4.6+; add_control_to_dock and add_control_to_bottom_panel are deprecated) | references/docks-and-ui.md |
| A Project → Tools menu entry | add_tool_menu_item(name, callable) / remove_tool_menu_item(name) | docks-and-ui.md |
| A full main-screen editor (like 2D/3D/Script) | _has_main_screen, _make_visible, _get_plugin_name, _get_plugin_icon | docks-and-ui.md |
| Custom Inspector widgets | add_inspector_plugin(EditorInspectorPlugin) with EditorProperty | references/inspector-plugins.md |
| 3D handles and overlays | add_node_3d_gizmo_plugin(EditorNode3DGizmoPlugin) | references/gizmos.md |
| 2D viewport tools | _handles(object), _edit(object), _forward_canvas_gui_input, _forward_canvas_draw_over_viewport, update_overlays() | gizmos.md |
| Act when the user presses Play | _build() returning false cancels the run | scene-editing-and-services.md |
| A new node type in Create Node | Prefer class_name plus @icon("res://addons/my_tool/icons/x.svg") in the node script; add_custom_type is the older way | |
| Importers, exporters, translation parsers | add_import_plugin, add_export_plugin, add_translation_parser_plugin | |
| A server, logger or job runner inside the editor | TCPServer polled in _process, OS.add_logger (4.5+) | scene-editing-and-services.md |
Godot 4.7 additions worth knowing: EditorInterface.get_unsaved_scenes(); ScriptEditor.get_unsaved_files(), save_all_scripts(), reload_open_files(), close_file(path); static EditorInspector.create_default_inspector(filter_line_edit); EditorContextMenuPlugin.CONTEXT_SLOT_INSPECTOR_PROPERTY; EditorNode3DGizmoPlugin._can_commit_handle_on_click().
addons/<name>/plugin.cfg and plugin.gd (@tool, extends EditorPlugin, empty _enter_tree/_exit_tree), enable it, and confirm it loads with no errors in the Output._exit_tree written in the same edit.godot --headless --editor --path <project> loads enabled plugins. Run godot --headless --import --path <project> once first on a fresh checkout so resources are imported. Recipes in references/testing-plugins.md.version in plugin.cfg, commit .uid sidecars, and test a fresh copy of the folder in an empty project.| Symptom | Cause | Fix |
|---|---|---|
| A helper behaves like an empty script in the editor (methods missing, values null) | That helper lacks @tool | Add @tool to every script the plugin uses |
| Duplicate docks or menu entries after re-enable | _exit_tree missed a removal | Mirror every add; null the reference after freeing |
| Scene edits vanish on save | New nodes have no owner | Set owner = EditorInterface.get_edited_scene_root() (also for children) |
| Ctrl+Z doesn't undo the tool's change | Direct writes instead of undo/redo | Wrap in EditorUndoRedoManager actions |
| Editor freezes while the tool works | Blocking I/O or OS.execute on the main thread | Poll from _process or use a thread; for processes use OS.create_process or OS.execute_with_pipe and poll |
C#: Could not find type "MyPlugin" | The C# project didn't build | Build (MSBuild panel shows errors), then re-enable |
| Runtime scene breaks only in exports (C#) | A runtime [Tool] class wrapped in #if TOOLS | Unwrap it; wrap only editor-only classes |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin godot-editor-tools