jame581/godotprompter/addon-development
Claude Code and agent skill by jame581/godotprompter
- community
- ext:[{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
Use when creating Godot editor plugins — EditorPlugin, @tool scripts, custom inspectors, and dock panels
Install
npx vskill@latest install jame581/godotprompter/addon-developmentSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as jame581/godotprompter/addon-development.
Addon Development in Godot 4.3+
Editor plugins extend the Godot editor itself: custom node types, inspector panels, dock widgets, 3D gizmos, and toolbar buttons. All examples target Godot 4.3+ with no deprecated APIs.
Related skills: resource-pattern for custom Resource editors, godot-ui for editor panel UI, csharp-godot for C# plugin development.
1. Plugin Structure
Every plugin lives inside addons/ at the project root. Godot discovers plugins by scanning for plugin.cfg files.
plugin.cfg is a plain INI file. Godot reads it when scanning addons/. The script key must point to the main plugin script relative to the plugin folder.
Enable the plugin: Project → Project Settings → Plugins (Project Settings → Addons → Plugins on 4.8) → tick the checkbox next to your plugin name.
2. @tool Annotation
@tool makes a GDScript (or its C# equivalent) run inside the editor process as well as at runtime. Without it, the script only runs when the game is playing.
GDScript
C#
TOOLSis defined only in editor builds, so#if TOOLSremoves a class from exported games: use it for editor-only classes (EditorPlugin, inspector plugins), never for a[Tool]node that also runs in the game. Exports include@toolscripts like any other script unless the preset's filters exclude them.
Key rules:
- Add
@tool/[Tool]at the top of every script that needs editor access. - Always guard runtime-only code with
Engine.is_editor_hint()to avoid crashing the editor when processing begins before the scene is fully loaded. - Call
update_configuration_warnings()whenever a property changes that might affect the warning state.
3. EditorPlugin Base
The main plugin script extends EditorPlugin. Godot calls _enter_tree() when the plugin is enabled and _exit_tree() when it is disabled or the project is closed. Everything added in `_enter_tree()` must be removed in `_exit_tree()`.
GDScript
C#
add_custom_type parameters:
| Parameter | Description | |
|---|---|---|
name | The name shown in the Add Node dialog | |
base | String name of the Godot base class | |
script | The GDScript / C# script resource | |
icon | A Texture2D, typically a 16×16 SVG |
add_tool_menu_item adds an entry under Project → Tools in the top menu bar. Pass a Callable that takes no arguments.
Unsaved-State & Script Editor Control (Godot 4.7+)
Godot 4.7 adds file-management APIs useful for build/export tooling — check for unsaved work before running an action, or refresh scripts changed by an external tool.
4. Custom Inspector Plugin
When you want a custom widget for an exported property of a specific type, register an EditorInspectorPlugin from your main EditorPlugin. The inspector plugin overrides _can_handle to opt in and _parse_property (or _parse_begin) to inject custom widgets. Pair with an EditorProperty subclass for the actual UI.
See references/inspector-plugins.md for the full GDScript and C# scaffold (custom inspector + EditorProperty + registration boilerplate).
Godot 4.7+: the staticEditorInspector.create_default_inspector(filter_line_edit: LineEdit = null)returns an inspector with the same configuration as the editor's Inspector dock, ready to embed in plugin UIs — pass aLineEditfor live property filtering (see references/inspector-plugins.md).EditorContextMenuPluginalso gainsCONTEXT_SLOT_INSPECTOR_PROPERTYinContextMenuSlot, so context-menu plugins can extend the inspector property right-click menu:_popup_menu()receives[object ID, property name]and the option callback receives theEditorPropertydirectly.
Changed in Godot 4.8:_popup_menu()is deprecated; override_get_menu_options(data: Dictionary[StringName, Variant]), whose item callbacks receive the same dictionary. For the inspector slot it holds&"property"(theEditorProperty),&"object"(the edited object) and&"property_name". 4.8 calls both methods, so a plugin that also supports 4.7 returns early from_popup_menuon 4.8 (keys for every slot and the cross-version scaffold: references/inspector-plugins.md).
5. Custom Dock Panel
Add a custom dock to the editor by calling add_control_to_dock(slot, control) from your EditorPlugin._enter_tree. Free the control on _exit_tree. Useful for project-wide tooling UIs (level browser, asset summary, build dashboard).
Godot 4.6+:add_control_to_dockis deprecated; wrap your control in anEditorDockand calladd_dock(dock), thenremove_dock(dock)on exit.add_dockdoes not exist in 4.3 to 4.5, whereadd_control_to_dockis the only option, so a plugin that supports both guards on the version (see references/dock-panels.md).
Changed in Godot 4.8: main screens are docks._has_main_screen()and_get_plugin_icon()are deprecated: add anEditorDock(still experimental) withdefault_slot = EditorDock.DOCK_SLOT_MAIN_SCREEN.EditorInterface.get_editor_main_screen()no longer returns the real main screen; a legacy main-screen plugin works only if it adds its panel there from_enter_tree(). Scaffold for 4.3 to 4.8 in references/dock-panels.md.
See references/dock-panels.md for the full GDScript and C# dock scaffold.
6. Custom Resource Editors
EditorResourcePicker lets you constrain a property to a specific Resource subclass with a tooltip and base-type filter. EditorResourcePreviewGenerator provides custom thumbnails for resources in the FileSystem dock and Inspector.
See references/inspector-plugins.md for the full GDScript and C#EditorResourcePickerandEditorResourcePreviewGeneratorscaffolds.
7. Gizmos
EditorNode3DGizmoPlugin adds visual handles for 3D nodes in the editor — wireframe shapes, draggable handles, rotation rings. Implement _init (materials), _get_gizmo_name, _has_gizmo, _redraw (draw lines/handles), and _get_handle_value / _set_handle / _commit_handle for interactive editing.
See references/gizmos-deep-dive.md for the full GDScript and C# gizmo plugin (with undo/redo wiring for handle commits).
Godot 4.7+: override_can_commit_handle_on_click() -> bool(returnsfalseif not overridden) to commit a handle action even when the final handle position is the same as the initial one — i.e. on a plain click.
8. Testing Plugins
Toggle the plugin off and on in Project Settings → Plugins (Project Settings → Addons → Plugins on 4.8) to reload it; saving a @tool script hot-reloads automatically, but new class registrations and dock changes need the full cycle. print() / push_warning() / push_error() go to the Output panel. C# plugins must recompile first — "Unable to load addon script from path … This might be due to a code error in that script" usually means the assembly failed to build, so check the MSBuild panel before anything else.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/addon-development/SKILL.md
Popularity
- Repository stars
- 964
- Repository forks
- 63
- 7-day trend score
- 29
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
pluginCustom plugin integration
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jame581/godotprompter/addon-development)