# Addon Development

Use when creating Godot editor plugins, EditorPlugin, @tool scripts, custom...

- Repository: https://github.com/jame581/GodotPrompter (914 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add jame581/GodotPrompter --skill addon-development -g -a claude-code -y`
Codex: `npx skills add jame581/GodotPrompter --skill addon-development -g -a codex -y`
Cursor: `npx skills add jame581/GodotPrompter --skill addon-development -g -a cursor -y`
Gemini CLI: `npx skills add jame581/GodotPrompter --skill addon-development -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add jame581/GodotPrompter`

## Description

Use when creating Godot editor plugins, EditorPlugin, @tool scripts, custom inspectors, and dock panels

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

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

```
res://
└── addons/
    └── my_plugin/
        ├── plugin.cfg          # required, plugin metadata
        ├── plugin.gd           # main EditorPlugin script (named in plugin.cfg)
        ├── my_inspector.gd     # optional, EditorInspectorPlugin
        ├── my_dock.tscn        # optional, dock panel scene
        └── icons/
            └── my_node.svg     # optional, custom node icons
```

`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** → 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

```gdscript
@tool
extends Sprite2D

# Engine.is_editor_hint() is true when running inside the editor,
# false during a running game. Use it to guard editor-only logic.
func _process(delta: float) -> void:
    if Engine.is_editor_hint():
        # This block runs in the editor viewport, safe to call editor APIs.
        update_configuration_warnings()
    else:
        # Normal game logic here.
        pass

The rest: https://github.com/jame581/GodotPrompter/blob/HEAD/skills/addon-development/SKILL.md
